Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alloc zero size memory on old model GPU may fail. #870

Closed
optman opened this issue Sep 30, 2023 · 0 comments · Fixed by #876
Closed

Alloc zero size memory on old model GPU may fail. #870

optman opened this issue Sep 30, 2023 · 0 comments · Fixed by #876

Comments

@optman
Copy link
Contributor

optman commented Sep 30, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant