| @@ -291,7 +291,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::Profilin | |||||
| #endif | #endif | ||||
| } | } | ||||
| FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfileStepInfo( | |||||
| FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfileStepInfo( | |||||
| uint64_t index_id, uint64_t model_id, uint16_t tag_id, rtStream_t stream, int32_t device_id) { | uint64_t index_id, uint64_t model_id, uint16_t tag_id, rtStream_t stream, int32_t device_id) { | ||||
| #ifdef DAVINCI_SUPPORT_PROFILING | #ifdef DAVINCI_SUPPORT_PROFILING | ||||
| rtError_t rt_ret = RT_ERROR_NONE; | rtError_t rt_ret = RT_ERROR_NONE; | ||||
| @@ -338,7 +338,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfileStepInfo( | |||||
| } | } | ||||
| reported_data.append(",") | reported_data.append(",") | ||||
| .append("\n"); | .append("\n"); | ||||
| ProfilingManager::Instance().ReportData(device_id, reported_data, "step_info"); | |||||
| ReportData(device_id, reported_data, "step_info"); | |||||
| #endif | #endif | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| @@ -27,6 +27,7 @@ | |||||
| #include "framework/common/ge_types.h" | #include "framework/common/ge_types.h" | ||||
| #include "external/register/register_types.h" | #include "external/register/register_types.h" | ||||
| #include "toolchain/prof_callback.h" | #include "toolchain/prof_callback.h" | ||||
| #include "runtime/stream.h" | |||||
| using std::map; | using std::map; | ||||
| using std::string; | using std::string; | ||||
| @@ -840,7 +840,6 @@ add_library(ge_ut_common STATIC ${COMMON_SRC_FILES} ${PROTO_HDRS}) | |||||
| target_compile_definitions(ge_ut_common PRIVATE | target_compile_definitions(ge_ut_common PRIVATE | ||||
| google=ascend_private | google=ascend_private | ||||
| DAVINCI_SUPPORT_PROFILING | |||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | ||||
| ) | ) | ||||
| @@ -862,7 +861,6 @@ add_library(ge_ut_common_format STATIC ${COMMON_SRC_FILES} ${COMMON_FORMAT_SRC_F | |||||
| target_compile_definitions(ge_ut_common_format PRIVATE | target_compile_definitions(ge_ut_common_format PRIVATE | ||||
| google=ascend_private | google=ascend_private | ||||
| DAVINCI_SUPPORT_PROFILING | |||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | ||||
| ) | ) | ||||
| @@ -1113,7 +1111,6 @@ target_compile_options(ut_libge_distinct_load_utest PRIVATE | |||||
| target_compile_definitions(ut_libge_distinct_load_utest PRIVATE | target_compile_definitions(ut_libge_distinct_load_utest PRIVATE | ||||
| google=ascend_private | google=ascend_private | ||||
| DAVINCI_SUPPORT_PROFILING | |||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | ||||
| ) | ) | ||||
| @@ -78,9 +78,3 @@ TEST_F(UtestGeProfilinganager, plungin_init_) { | |||||
| EXPECT_EQ(ret, INTERNAL_ERROR); | EXPECT_EQ(ret, INTERNAL_ERROR); | ||||
| ProfilingManager::Instance().prof_cb_.msprofReporterCallback = nullptr; | ProfilingManager::Instance().prof_cb_.msprofReporterCallback = nullptr; | ||||
| } | } | ||||
| TEST_F(UtestGeProfilinganager, test_step_info) { | |||||
| ProfilingManager::Instance().prof_cb_.msprofReporterCallback = ReporterCallback; | |||||
| EXPECT_EQ(ProfilingManager::Instance().ProfileStepInfo(0, 0, 0, nullptr, 0), SUCCESS); | |||||
| ProfilingManager::Instance().prof_cb_.msprofReporterCallback = nullptr; | |||||
| } | |||||