Skip to content

Commit 42ab119

Browse files
authored
Merge pull request #8361 from chainer-ci/bp-8353-v13-nvtx_colors
[backport] Re-enable NVTX range coloring for NVTX3.
2 parents f9fb49a + 02d7f37 commit 42ab119

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cupy_backends/cuda/libs/nvtx.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ cpdef MarkC(message, uint32_t color=0):
104104
color (uint32): Color code for a marker.
105105
"""
106106
cdef bytes b_message = message.encode()
107-
if NVTX_VERSION != 1 and NVTX_VERSION != 2:
107+
if NVTX_VERSION < 1:
108108
nvtxMarkA(<const char*>b_message)
109109
return
110110

@@ -132,7 +132,7 @@ cpdef Mark(message, int id_color=-1):
132132
id_color (int): ID of color for a marker.
133133
"""
134134
cdef bytes b_message = message.encode()
135-
if id_color < 0 or (NVTX_VERSION != 1 and NVTX_VERSION != 2):
135+
if id_color < 0 or NVTX_VERSION < 1:
136136
nvtxMarkA(<const char*>b_message)
137137
return
138138

@@ -166,7 +166,7 @@ cpdef RangePushC(message, uint32_t color=0):
166166
color (uint32): ARGB color for a range.
167167
"""
168168
cdef bytes b_message = message.encode()
169-
if NVTX_VERSION != 1 and NVTX_VERSION != 2:
169+
if NVTX_VERSION < 1:
170170
nvtxRangePushA(<const char*>b_message)
171171
return
172172

@@ -208,7 +208,7 @@ cpdef RangePush(message, int id_color=-1):
208208
id_color (int): ID of color for a range.
209209
"""
210210
cdef bytes b_message = message.encode()
211-
if id_color < 0 or (NVTX_VERSION != 1 and NVTX_VERSION != 2):
211+
if id_color < 0 or NVTX_VERSION < 1:
212212
nvtxRangePushA(<const char*>b_message)
213213
return
214214

0 commit comments

Comments
 (0)