File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
lib/gc/ExecutionEngine/GPURuntime/ocl Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,3 @@ FetchContent_Declare(
99FetchContent_MakeAvailable(PTIGPU)
1010
1111set_property (GLOBAL PROPERTY GC_PTIGPU_BINARY_DIR ${ptigpu_BINARY_DIR} )
12-
13- target_compile_options (GcInterface INTERFACE -DGC_ENABLE_GPU_PROFILE)
14-
Original file line number Diff line number Diff line change @@ -12,5 +12,6 @@ target_link_libraries(GcGpuOclRuntime PUBLIC ${OpenCL_LIBRARIES})
1212if (GC_ENABLE_GPU_PROFILE)
1313 include (ptigpu)
1414 get_property (GC_PTIGPU_BINARY_DIR GLOBAL PROPERTY GC_PTIGPU_BINARY_DIR )
15- target_link_libraries (GcGpuOclRuntime PUBLIC ${GC_PTIGPU_BINARY_DIR} /lib/libonetrace_tool.so)
15+ target_link_libraries (GcGpuOclRuntime PRIVATE ${GC_PTIGPU_BINARY_DIR} /lib/libonetrace_tool.so)
16+ add_definitions (-DGC_ENABLE_GPU_PROFILE)
1617endif ()
Original file line number Diff line number Diff line change 2525void EnableProfiling ();
2626void DisableProfiling ();
2727
28- class tracer_t {
28+ class GPUKernelTracer {
2929public:
30- static std::shared_ptr<tracer_t > getInstance () {
31- std::shared_ptr<tracer_t > instance = std::make_shared<tracer_t >();
30+ static std::shared_ptr<GPUKernelTracer> getInstance () {
31+ std::shared_ptr<GPUKernelTracer> instance =
32+ std::make_shared<GPUKernelTracer>();
3233 return instance;
3334 }
3435
35- tracer_t () {
36- gcLogD (" Enable Profiling.\n " );
36+ GPUKernelTracer () {
37+ gcLogD (" Enable Profiling." );
3738 EnableProfiling ();
3839 }
3940
40- ~tracer_t () {
41- gcLogD (" Profiling is finished.\n " );
41+ ~GPUKernelTracer () {
42+ gcLogD (" Profiling is finished." );
4243 DisableProfiling ();
4344 }
4445};
4546
46- static std::shared_ptr<tracer_t > trace = tracer_t ::getInstance();
47+ static std::shared_ptr<GPUKernelTracer> tracer = GPUKernelTracer ::getInstance();
4748
4849#endif
4950
You can’t perform that action at this time.
0 commit comments