Skip to content

Commit 3892c32

Browse files
authored
We should not call cudaGetErrorString on device (NVIDIA#3062)
but its fine on host
1 parent 48d307e commit 3892c32

File tree

1 file changed

+1
-1
lines changed
  • libcudacxx/test/libcudacxx/cuda/annotated_ptr

1 file changed

+1
-1
lines changed

libcudacxx/test/libcudacxx/cuda/annotated_ptr/utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ __device__ __host__ void assert_rt_wrap(cudaError_t code, const char* file, int
3535
if (code != cudaSuccess)
3636
{
3737
#ifndef TEST_COMPILER_NVRTC
38-
NV_IF_ELSE_TARGET(NV_IS_DEVICE,
38+
NV_IF_ELSE_TARGET(NV_IS_HOST,
3939
(printf("assert: %s %s %d\n", cudaGetErrorString(code), file, line);),
4040
(printf("assert: error=%d %s %d\n", code, file, line);))
4141
#endif // !TEST_COMPILER_NVRTC

0 commit comments

Comments
 (0)