Skip to content

Commit b0a6e21

Browse files
committed
raise an exception when attempting to use CoopVecs on unsupported drivers
1 parent a6fd226 commit b0a6e21

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/coop_vec.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "op.h"
1515
#include "optix_api.h"
1616
#include "optix.h"
17+
#include "cuda.h"
1718
#include <drjit-core/nanostl.h>
1819

1920
uint32_t jitc_coop_vec_pack(uint32_t n, const uint32_t *in) {
@@ -28,6 +29,15 @@ uint32_t jitc_coop_vec_pack(uint32_t n, const uint32_t *in) {
2829
}
2930

3031
const Variable *arg_v = jitc_var(in[0]);
32+
if (arg_v->backend == (uint32_t) JitBackend::CUDA) {
33+
bool coop_vec_supported =
34+
(jitc_cuda_version_major == 12 && jitc_cuda_version_minor >= 8) ||
35+
jitc_cuda_version_major > 12;
36+
if (!coop_vec_supported)
37+
jitc_raise("jit_coop_vec_pack(): The use of cooperative vectors on "
38+
"the CUDA/OptiX backend requires CUDA 12.8 or newer "
39+
"(driver R570+).");
40+
}
3141

3242
Variable v;
3343
v.kind = (uint32_t) VarKind::CoopVecPack;

0 commit comments

Comments
 (0)