Skip to content
This repository was archived by the owner on Sep 21, 2019. It is now read-only.

replace __CUDA_ARCH__ with __HIP_DEVICE_COMPILE__ #12

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cub/util_debug.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ __host__ __device__ __forceinline__ cudaError_t Debug(
template <class... Args>
inline __host__ __device__ void va_printf(char const* format, Args const&... args)
{
#ifdef __CUDA_ARCH__
#ifdef __HIP_DEVICE_COMPILE__
printf(format, blockIdx.z, blockIdx.y, blockIdx.x, threadIdx.z, threadIdx.y, threadIdx.x, args...);
#else
printf(format, args...);
#endif
}
#ifndef __CUDA_ARCH__
#ifndef __HIP_DEVICE_COMPILE__
#define _CubLog(format, ...) thrust::cuda_cub::cub::va_printf(format,__VA_ARGS__);
#else
#define _CubLog(format, ...) thrust::cuda_cub::cub::va_printf("[block (%d,%d,%d), thread (%d,%d,%d)]: " format, __VA_ARGS__);
Expand Down