File tree 2 files changed +8
-5
lines changed 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1178,5 +1178,12 @@ constexpr inline bool silence_msvc_c4127(bool cond) { return cond; }
1178
1178
# define PYBIND11_DETAILED_ERROR_MESSAGES
1179
1179
#endif
1180
1180
1181
+ #if defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ == 11) && (__CUDACC_VER_MINOR__ >= 4) \
1182
+ && (__CUDACC_VER_MINOR__ <= 8 ) && !defined(PYBIND11_USING_WORKAROUND_FOR_CUDA_11_4_THROUGH_8)
1183
+ // Nvidia's NVCC is broken between 11.4.0 and 11.8.0
1184
+ // https://github.com/pybind/pybind11/issues/4193
1185
+ # define PYBIND11_USING_WORKAROUND_FOR_CUDA_11_4_THROUGH_8
1186
+ #endif
1187
+
1181
1188
PYBIND11_NAMESPACE_END (detail)
1182
1189
PYBIND11_NAMESPACE_END (PYBIND11_NAMESPACE)
Original file line number Diff line number Diff line change @@ -84,11 +84,7 @@ struct op_impl {};
84
84
// / Operator implementation generator
85
85
template <op_id id, op_type ot, typename L, typename R>
86
86
struct op_ {
87
- #if defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ == 11) && (__CUDACC_VER_MINOR__ >= 4) \
88
- && (__CUDACC_VER_MINOR__ <= 8 )
89
- // Nvidia's NVCC is broken between 11.4.0 and 11.8.0
90
- // https://github.com/pybind/pybind11/issues/4193
91
- # define PYBIND11_USING_WORKAROUND_FOR_CUDA_11_4_THROUGH_8
87
+ #if defined(PYBIND11_USING_WORKAROUND_FOR_CUDA_11_4_THROUGH_8)
92
88
static constexpr bool op_enable_if_hook = true ;
93
89
#endif
94
90
template <typename Class, typename ... Extra>
You can’t perform that action at this time.
0 commit comments