CUDAapi.jl: DEPRECATED, use CUDA.jl instead!
Reusable components for CUDA development.
Build Status | Coverage |
---|---|
This package provides some reusable functionality for working with CUDA or NVIDIA APIs. It is intended for package developers, and does not provide concrete application functionality.
To check if a CUDA GPU is available, CUDAapi provides and exports the has_cuda
and has_cuda_gpu
functions. These functions are useful to query whether you
will be able to import a package that requires CUDA to be available, such as
CuArrays.jl (CUDAapi.jl itself will always import without an error):
using CUDAapi # this will NEVER fail
if has_cuda()
try
using CuArrays # we have CUDA, so this should not fail
catch ex
# something is wrong with the user's set-up (or there's a bug in CuArrays)
@warn "CUDA is installed, but CuArrays.jl fails to load" exception=(ex,catch_backtrace())
end
end
The file src/discovery.jl
defines helper methods for discovering the NVIDIA
driver and CUDA toolkit, as well as some more generic methods to find libraries
and binaries relative to, e.g., the location of the driver or toolkit.
The file src/compatibility.jl
contains hard-coded databases with software and hardware
compatibility information that cannot be queried from APIs.
When a new version of CUDA is released, CUDAapi.jl needs to be updated accordingly:
discovery.jl
: update thecuda_versions
dictionarycompatibility.jl
: update each_db
variable (refer to the comments for more info)travis.linux
andtravis.osx
: provide a link to the installersappveyor.ps1
: provide a link to the installer, and list the components that need to be installedtravis.yml
andappveyor.yml
: add the version to the CI rosters
Update the gcc_major_versions
and gcc_minor_versions
ranges in
discovery.jl
to cover the new version.