Skip to content

Commit

Permalink
Merge pull request #26 from TensorBFS/0.1.1
Browse files Browse the repository at this point in the history
Add device detector
  • Loading branch information
ArrogantGao authored Oct 19, 2023
2 parents d0066a4 + 62f24b1 commit dfa895f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/CuTropicalGEMM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ using CUDA, TropicalNumbers, LinearAlgebra, TropicalGemmC_jll
export matmul!

function __init__()
@assert CUDA.driver_version() >= v"11.4" "Error: CUDA.driver_version < v11.4"
@assert CUDA.driver_version() <= v"12.2" "Error: CUDA.driver_version > v12.2"
if CUDA.functional() == true
if CUDA.driver_version() < v"11.4"
@warn "CUDA.driver_version < v11.4! CuTropicalGEMM may not be available."
elseif CUDA.driver_version() > v"12.2"
@warn "CUDA.driver_version > v12.2! CuTropicalGEMM may not be available."
end
elseif CUDA.functional() == false
@warn "CUDA Driver not found! CuTropicalGEMM will not be available."
end
return nothing
end

Expand Down

2 comments on commit dfa895f

@ArrogantGao
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/93697

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.1 -m "<description of version>" dfa895f0c98064b866eea338241a4918f0371ec0
git push origin v0.1.1

Please sign in to comment.