@@ -9284,7 +9284,8 @@ __urdlllocal ur_result_t UR_APICALL urTensorMapEncodeIm2ColExp(
92849284 getContext ()->notify_begin (UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP,
92859285 " urTensorMapEncodeIm2ColExp" , ¶ms);
92869286
9287- getContext ()->logger .info (" ---> urTensorMapEncodeIm2ColExp" );
9287+ auto &logger = getContext ()->logger ;
9288+ logger.info (" ---> urTensorMapEncodeIm2ColExp\n " );
92889289
92899290 ur_result_t result = pfnEncodeIm2ColExp (
92909291 hDevice, TensorMapType, TensorRank, GlobalAddress, GlobalDim,
@@ -9296,10 +9297,13 @@ __urdlllocal ur_result_t UR_APICALL urTensorMapEncodeIm2ColExp(
92969297 " urTensorMapEncodeIm2ColExp" , ¶ms, &result,
92979298 instance);
92989299
9299- std::ostringstream args_str;
9300- ur::extras::printFunctionParams (
9301- args_str, UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP, ¶ms);
9302- getContext ()->logger .info (" ({}) -> {};\n " , args_str.str (), result);
9300+ if (logger.getLevel () <= logger::Level::INFO) {
9301+ std::ostringstream args_str;
9302+ ur::extras::printFunctionParams (
9303+ args_str, UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP, ¶ms);
9304+ logger.info (" <--- urTensorMapEncodeIm2ColExp({}) -> {};\n " ,
9305+ args_str.str (), result);
9306+ }
93039307
93049308 return result;
93059309}
@@ -9354,7 +9358,8 @@ __urdlllocal ur_result_t UR_APICALL urTensorMapEncodeTiledExp(
93549358 getContext ()->notify_begin (UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP,
93559359 " urTensorMapEncodeTiledExp" , ¶ms);
93569360
9357- getContext ()->logger .info (" ---> urTensorMapEncodeTiledExp" );
9361+ auto &logger = getContext ()->logger ;
9362+ logger.info (" ---> urTensorMapEncodeTiledExp\n " );
93589363
93599364 ur_result_t result = pfnEncodeTiledExp (
93609365 hDevice, TensorMapType, TensorRank, GlobalAddress, GlobalDim,
@@ -9365,10 +9370,13 @@ __urdlllocal ur_result_t UR_APICALL urTensorMapEncodeTiledExp(
93659370 " urTensorMapEncodeTiledExp" , ¶ms, &result,
93669371 instance);
93679372
9368- std::ostringstream args_str;
9369- ur::extras::printFunctionParams (
9370- args_str, UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP, ¶ms);
9371- getContext ()->logger .info (" ({}) -> {};\n " , args_str.str (), result);
9373+ if (logger.getLevel () <= logger::Level::INFO) {
9374+ std::ostringstream args_str;
9375+ ur::extras::printFunctionParams (
9376+ args_str, UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP, ¶ms);
9377+ logger.info (" <--- urTensorMapEncodeTiledExp({}) -> {};\n " ,
9378+ args_str.str (), result);
9379+ }
93729380
93739381 return result;
93749382}
0 commit comments