Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Allow CuArrays to initialise if there is no CUDA/GPU on the system #371

Closed
tanhevg opened this issue Jul 14, 2019 · 1 comment
Closed

Allow CuArrays to initialise if there is no CUDA/GPU on the system #371

tanhevg opened this issue Jul 14, 2019 · 1 comment

Comments

@tanhevg
Copy link

tanhevg commented Jul 14, 2019

Currently an attempt to using CuArrays on a system that has no CUDA/GPU will result in an error. As a consequence, if one has a module that uses CuArrays, and wants to use some of its functions on a system without a GPU (e.g. debug a model training loop on a toy data set on a laptop on a plane), a separate .toml without CuArrays has to be created. This can be avoided by wrapping a few lines in the initialiser in a simple try/catch.

@maleadt
Copy link
Member

maleadt commented Jul 18, 2019

Trying a different approach: #375 and JuliaGPU/CUDAapi.jl#84

@maleadt maleadt closed this as completed Jul 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants