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(
9
9
FetchContent_MakeAvailable (PTIGPU )
10
10
11
11
set_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})
12
12
if (GC_ENABLE_GPU_PROFILE )
13
13
include (ptigpu )
14
14
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 )
16
17
endif ()
Original file line number Diff line number Diff line change 25
25
void EnableProfiling ();
26
26
void DisableProfiling ();
27
27
28
- class tracer_t {
28
+ class GPUKernelTracer {
29
29
public:
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>();
32
33
return instance;
33
34
}
34
35
35
- tracer_t () {
36
- gcLogD (" Enable Profiling.\n " );
36
+ GPUKernelTracer () {
37
+ gcLogD (" Enable Profiling." );
37
38
EnableProfiling ();
38
39
}
39
40
40
- ~tracer_t () {
41
- gcLogD (" Profiling is finished.\n " );
41
+ ~GPUKernelTracer () {
42
+ gcLogD (" Profiling is finished." );
42
43
DisableProfiling ();
43
44
}
44
45
};
45
46
46
- static std::shared_ptr<tracer_t > trace = tracer_t ::getInstance();
47
+ static std::shared_ptr<GPUKernelTracer> tracer = GPUKernelTracer ::getInstance();
47
48
48
49
#endif
49
50
You can’t perform that action at this time.
0 commit comments