coreylowman / dfdx

Deep learning in Rust, with shape checked tensors and neural networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alloc zero size memory on old model GPU may fail.

optman opened this issue · comments

https://github.com/coreylowman/dfdx/blob/9a208d928b92dd77d4b2fa79144bdc8b872aa7f0/src/tensor/cuda/device.rs#L94C2-L94C2

        let workspace = Arc::new(Mutex::new(dev.alloc_zeros::<u8>(0)?));

On my old GTX 960, it would cause panic with the below error.

Driver(DriverError(CUDA_ERROR_INVALID_VALUE, "invalid argument"))

I have installed the Nvidia 535 driver and Cuda Toolkit 12.2.0, which is mostly recent.

Replace 0 with a non-zero value will fix it.

Maybe the old card doesn't support alloc zero size memory.