Browse Source

Fix bug.

tags/v1.3.0
zhaozhixuan 3 years ago
parent
commit
d47d7b378a
4 changed files with 3 additions and 11 deletions
  1. +2
    -2
      ge/common/profiling/profiling_manager.cc
  2. +1
    -0
      ge/common/profiling/profiling_manager.h
  3. +0
    -3
      tests/ut/ge/CMakeLists.txt
  4. +0
    -6
      tests/ut/ge/profiling/ge_profiling_manager_unittest.cc

+ 2
- 2
ge/common/profiling/profiling_manager.cc View File

@@ -291,7 +291,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::Profilin
#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) {
#ifdef DAVINCI_SUPPORT_PROFILING
rtError_t rt_ret = RT_ERROR_NONE;
@@ -338,7 +338,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfileStepInfo(
}
reported_data.append(",")
.append("\n");
ProfilingManager::Instance().ReportData(device_id, reported_data, "step_info");
ReportData(device_id, reported_data, "step_info");
#endif
return SUCCESS;
}


+ 1
- 0
ge/common/profiling/profiling_manager.h View File

@@ -27,6 +27,7 @@
#include "framework/common/ge_types.h"
#include "external/register/register_types.h"
#include "toolchain/prof_callback.h"
#include "runtime/stream.h"

using std::map;
using std::string;


+ 0
- 3
tests/ut/ge/CMakeLists.txt View File

@@ -840,7 +840,6 @@ add_library(ge_ut_common STATIC ${COMMON_SRC_FILES} ${PROTO_HDRS})

target_compile_definitions(ge_ut_common PRIVATE
google=ascend_private
DAVINCI_SUPPORT_PROFILING
$<$<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
google=ascend_private
DAVINCI_SUPPORT_PROFILING
$<$<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
google=ascend_private
DAVINCI_SUPPORT_PROFILING
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)



+ 0
- 6
tests/ut/ge/profiling/ge_profiling_manager_unittest.cc View File

@@ -78,9 +78,3 @@ TEST_F(UtestGeProfilinganager, plungin_init_) {
EXPECT_EQ(ret, INTERNAL_ERROR);
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;
}

Loading…
Cancel
Save