From 68eb706ae741d37ea8517d66ad90fa87512eecd1 Mon Sep 17 00:00:00 2001 From: minmingzhu Date: Wed, 13 Nov 2024 14:22:54 +0800 Subject: [PATCH] update --- mllib-dal/src/main/native/OneCCL.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mllib-dal/src/main/native/OneCCL.cpp b/mllib-dal/src/main/native/OneCCL.cpp index 18944649b..fea46ca3f 100644 --- a/mllib-dal/src/main/native/OneCCL.cpp +++ b/mllib-dal/src/main/native/OneCCL.cpp @@ -123,9 +123,13 @@ JNIEXPORT jint JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1init( JNIEXPORT void JNICALL Java_com_intel_oap_mllib_OneCCL_00024_c_1cleanup(JNIEnv *env, jobject obj) { logger::printerrln(logger::INFO, "OneCCL (native): cleanup"); - g_comms.pop_back(); + if (!g_comms.empty()) { + g_comms.pop_back(); + } #ifdef CPU_GPU_PROFILE - g_dal_comms.pop_back(); + if (!g_dal_comms.empty()) { + g_dal_comms.pop_back(); + } #endif }