This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,11 @@ namespace code {
31
31
namespace c {
32
32
33
33
constexpr auto types = R"C(
34
+ #ifndef __CUDACC_RTC__
34
35
// Can't include system dependencies with NVRTC
35
36
// Can't include cuda_fp16.h with NVRTC due to transitive system dependencies
36
- // #include <cuda_fp16.h>
37
+ #include <cuda_fp16.h>
38
+ #endif
37
39
)C" ;
38
40
39
41
constexpr auto defines = R"C(
@@ -211,7 +213,12 @@ struct SegmentedReducer {
211
213
212
214
constexpr auto cubBlockReduce = R"CUDA(
213
215
216
+ #if __CUDACC_RTC__
214
217
#include "cub/nvrtc_cub.cuh"
218
+ #else
219
+ #include <assert.h>
220
+ #include "cub/cub.cuh"
221
+ #endif
215
222
216
223
namespace __tc {
217
224
Original file line number Diff line number Diff line change @@ -128,7 +128,6 @@ static std::string llvmCompile(
128
128
std::string (" -I" ) + TC_STRINGIFY (TC_CUDA_INCLUDE_DIR),
129
129
std::string (" -I" ) + TC_STRINGIFY (TC_CUB_INCLUDE_DIR),
130
130
tc::FLAGS_llvm_flags,
131
- " -DNVRTC_CUB=1" ,
132
131
" -nocudalib" ,
133
132
" -S" ,
134
133
" -emit-llvm" ,
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ DEFINE_string(
49
49
" compiler flags to set when llvm is used" );
50
50
DEFINE_string (
51
51
nvcc_flags,
52
- " -std=c++11 -ptx -DNVRTC_CUB=1 - -use_fast_math" ,
52
+ " -std=c++11 -ptx --use_fast_math" ,
53
53
" compiler flags to set when nvcc is used" );
54
54
55
55
// CPU codegen options
You can’t perform that action at this time.
0 commit comments