Skip to content

Commit

Permalink
Added CUDA version detect (#24)
Browse files Browse the repository at this point in the history
* version detect

* Update CuTropicalGEMM.jl
  • Loading branch information
ArrogantGao authored Oct 17, 2023
1 parent f635981 commit b4b08d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/CuTropicalGEMM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ module CuTropicalGEMM
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"
return nothing
end

const Symbol_FP32 = (:FP32, "FP32")
const Symbol_FP64 = (:FP64, "FP64")
const Symbol_INT32 = (:INT32, "INT32")
Expand All @@ -13,4 +19,4 @@ const CTranspose{T} = Transpose{T, <:CuVecOrMat{T}}

include("tropical_gemms.jl")

end
end

0 comments on commit b4b08d3

Please sign in to comment.