Skip to content

Commit

Permalink
Compatibility with CUDA 12.0 (fixes issue #939)
Browse files Browse the repository at this point in the history
  • Loading branch information
biochem-fan committed Dec 22, 2022
1 parent 138b9c7 commit 39c3538
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/acc/cuda/cuda_utils_cub.cuh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef CUDA_UTILS_CUB_CUH_
#define CUDA_UTILS_CUB_CUH_

#include <cuda.h> // For CUDA_VERSION
#include <cuda_runtime.h>
#include "src/acc/cuda/cuda_settings.h"
#include "src/acc/cuda/cuda_mem_utils.h"
Expand All @@ -13,11 +14,15 @@
#undef CubLog
#endif

#define CUB_NS_QUALIFIER ::cub // for compatibility with CUDA 11.5
#include "src/acc/cuda/cub/device/device_radix_sort.cuh"
#include "src/acc/cuda/cub/device/device_reduce.cuh"
#include "src/acc/cuda/cub/device/device_scan.cuh"
#include "src/acc/cuda/cub/device/device_select.cuh"
#if (CUDA_VERSION >= 11000)
#include <cub/cub.cuh>
#else
// #define CUB_NS_QUALIFIER ::cub // for compatibility with CUDA 11.5
#include "src/acc/cuda/cub/device/device_radix_sort.cuh"
#include "src/acc/cuda/cub/device/device_reduce.cuh"
#include "src/acc/cuda/cub/device/device_scan.cuh"
#include "src/acc/cuda/cub/device/device_select.cuh"
#endif

namespace CudaKernels
{
Expand Down

0 comments on commit 39c3538

Please sign in to comment.