Currently, __dlpack__ and __dlpack_device__ are potentially inconsistent. This fix favors jit_cuda_device_raw over jit_var_device, because the latter will throw an error for JIT variables that point to memory regions allocated by other frameworks (jit_var_mem_map).
Fixes https://github.com/mitsuba-renderer/mitsuba3/issues/1229
Currently,
__dlpack__
and__dlpack_device__
are potentially inconsistent. This fix favorsjit_cuda_device_raw
overjit_var_device
, because the latter will throw an error for JIT variables that point to memory regions allocated by other frameworks (jit_var_mem_map
).