Skip to content

Commit e8dcd98

Browse files
committed
[rocprofiler-sdk] Add hip stream enum and update ops
Add rocprofiler_hip_stream_operation_t to enum_string utils, and update some ops as operations.
1 parent b509e9b commit e8dcd98

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

projects/rocprofiler-sdk/source/include/rocprofiler-sdk/cxx/enum_string.hpp

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,22 +1353,27 @@ ROCPROFILER_ENUM_INFO(rocprofiler_code_object_operation_t,
13531353
ROCPROFILER_CODE_OBJECT_NONE,
13541354
ROCPROFILER_CODE_OBJECT_LAST,
13551355
false,
1356-
not_operation);
1356+
is_operation);
1357+
ROCPROFILER_ENUM_INFO(rocprofiler_hip_stream_operation_t,
1358+
ROCPROFILER_HIP_STREAM_NONE,
1359+
ROCPROFILER_HIP_STREAM_LAST,
1360+
false,
1361+
is_operation);
13571362
ROCPROFILER_ENUM_INFO(rocprofiler_memory_copy_operation_t,
13581363
ROCPROFILER_MEMORY_COPY_NONE,
13591364
ROCPROFILER_MEMORY_COPY_LAST,
13601365
false,
1361-
not_operation);
1366+
is_operation);
13621367
ROCPROFILER_ENUM_INFO(rocprofiler_memory_allocation_operation_t,
13631368
ROCPROFILER_MEMORY_ALLOCATION_NONE,
13641369
ROCPROFILER_MEMORY_ALLOCATION_LAST,
13651370
false,
1366-
not_operation);
1371+
is_operation);
13671372
ROCPROFILER_ENUM_INFO(rocprofiler_kernel_dispatch_operation_t,
13681373
ROCPROFILER_KERNEL_DISPATCH_NONE,
13691374
ROCPROFILER_KERNEL_DISPATCH_LAST,
13701375
false,
1371-
not_operation);
1376+
is_operation);
13721377
ROCPROFILER_ENUM_INFO(rocprofiler_pc_sampling_method_t,
13731378
ROCPROFILER_PC_SAMPLING_METHOD_NONE,
13741379
ROCPROFILER_PC_SAMPLING_METHOD_LAST,
@@ -1661,6 +1666,14 @@ ROCPROFILER_ENUM_LABEL(ROCPROFILER_CODE_OBJECT_DEVICE_KERNEL_SYMBOL_REGISTER);
16611666
ROCPROFILER_ENUM_LABEL(ROCPROFILER_CODE_OBJECT_HOST_KERNEL_SYMBOL_REGISTER);
16621667
static_assert(ROCPROFILER_CODE_OBJECT_LAST == 4);
16631668

1669+
// rocprofiler_hip_stream_operation_t
1670+
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_STREAM_NONE);
1671+
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_STREAM_CREATE);
1672+
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_STREAM_DESTROY);
1673+
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_STREAM_SET);
1674+
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_STREAM_LAST);
1675+
static_assert(ROCPROFILER_CODE_OBJECT_LAST == 4);
1676+
16641677
// rocprofiler_memory_copy_operation_t
16651678
ROCPROFILER_ENUM_LABEL(ROCPROFILER_MEMORY_COPY_NONE);
16661679
ROCPROFILER_ENUM_LABEL(ROCPROFILER_MEMORY_COPY_HOST_TO_HOST);

projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/tests/enum_string.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ TEST(enum_string, fwd_h)
115115
TEST_STR(ROCPROFILER_BUFFER_TRACING_ROCDECODE_API);
116116
TEST_STR(ROCPROFILER_BUFFER_TRACING_KFD_QUEUE);
117117

118+
// rocprofiler_hip_stream_operation_t
119+
TEST_STR(ROCPROFILER_HIP_STREAM_NONE);
120+
TEST_STR(ROCPROFILER_HIP_STREAM_DESTROY);
121+
118122
// rocprofiler_code_object_operation_t
119123
TEST_STR(ROCPROFILER_CODE_OBJECT_NONE);
120124
TEST_STR(ROCPROFILER_CODE_OBJECT_LOAD);

0 commit comments

Comments
 (0)