Skip to content

Commit

Permalink
[rocSPARSE] Add a function version
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Jan 24, 2025
1 parent 98fdeb6 commit 27062bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/sparse/rocSPARSE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ lib_state() = library_state(
handle() = lib_state().handle
stream() = lib_state().stream

function version()
ver = Ref{Cint}()
rocsparse_get_version(handle(), ver)
major = ver[] ÷ 100000
minor = (ver[] ÷ 100) % 1000
patch = ver[] % 100
return VersionNumber(major, minor, patch)
end

include("array.jl")
include("util.jl")
include("types.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function versioninfo()
_status(functional(:hip)) "HIP" _ver(:hip, HIP.runtime_version) _libpath(libhip);
_status(functional(:rocblas)) "rocBLAS" _ver(:rocblas, rocBLAS.version) _libpath(librocblas);
_status(functional(:rocsolver)) "rocSOLVER" _ver(:rocsolver, rocSOLVER.version) _libpath(librocsolver);
_status(functional(:rocsparse)) "rocSPARSE" "-" _libpath(librocsparse);
_status(functional(:rocsparse)) "rocSPARSE" _ver(:rocsparse, rocSPARSE.version) _libpath(librocsparse);
_status(functional(:rocrand)) "rocRAND" _ver(:rocrand, rocRAND.version) _libpath(librocrand);
_status(functional(:rocfft)) "rocFFT" _ver(:rocfft, rocFFT.version) _libpath(librocfft);
_status(functional(:MIOpen)) "MIOpen" _ver(:MIOpen, MIOpen.version) _libpath(libMIOpen_path);
Expand Down

0 comments on commit 27062bc

Please sign in to comment.