Skip to content

Commit

Permalink
Support cuDSS v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Dec 11, 2024
1 parent 19defac commit 06b57d1
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gen/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"

[compat]
CUDA_SDK_jll = "12.5.1"
CUDSS_jll = "0.3.0"
CUDA_SDK_jll = "12.6.3"
CUDSS_jll = "0.4.0"
julia = "1.6"
79 changes: 79 additions & 0 deletions src/libcudss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ end
CUDSS_DATA_USER_PERM = 9
CUDSS_DATA_HYBRID_DEVICE_MEMORY_MIN = 10
CUDSS_DATA_COMM = 11
CUDSS_DATA_MEMORY_ESTIMATES = 12
end

@cenum cudssPhase_t::UInt32 begin
Expand Down Expand Up @@ -255,6 +256,35 @@ end
indexBase::cudssIndexBase_t)::cudssStatus_t
end

@checked function cudssMatrixCreateBatchDn(matrix, batchCount, nrows, ncols, ld, values,
valueType, layout)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixCreateBatchDn(matrix::Ptr{cudssMatrix_t},
batchCount::Int64, nrows::Ptr{Cvoid},
ncols::Ptr{Cvoid}, ld::Ptr{Cvoid},
values::Ptr{Ptr{Cvoid}},
valueType::cudaDataType_t,
layout::cudssLayout_t)::cudssStatus_t
end

@checked function cudssMatrixCreateBatchCsr(matrix, batchCount, nrows, ncols, nnz, rowStart,
rowEnd, colIndices, values, indexType,
valueType, mtype, mview, indexBase)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixCreateBatchCsr(matrix::Ptr{cudssMatrix_t},
batchCount::Int64, nrows::Ptr{Cvoid},
ncols::Ptr{Cvoid}, nnz::Ptr{Cvoid},
rowStart::Ptr{Ptr{Cvoid}},
rowEnd::Ptr{Ptr{Cvoid}},
colIndices::Ptr{Ptr{Cvoid}},
values::Ptr{Ptr{Cvoid}},
indexType::cudaDataType_t,
valueType::cudaDataType_t,
mtype::cudssMatrixType_t,
mview::cudssMatrixViewType_t,
indexBase::cudssIndexBase_t)::cudssStatus_t
end

@checked function cudssMatrixDestroy(matrix)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixDestroy(matrix::cudssMatrix_t)::cudssStatus_t
Expand Down Expand Up @@ -300,6 +330,55 @@ end
values::CuPtr{Cvoid})::cudssStatus_t
end

@checked function cudssMatrixGetBatchDn(matrix, batchCount, nrows, ncols, ld, values, type,
layout)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixGetBatchDn(matrix::cudssMatrix_t,
batchCount::Ptr{Int64},
nrows::Ptr{Ptr{Cvoid}},
ncols::Ptr{Ptr{Cvoid}},
ld::Ptr{Ptr{Cvoid}},
values::Ptr{Ptr{Ptr{Cvoid}}},
type::Ptr{cudaDataType_t},
layout::Ptr{cudssLayout_t})::cudssStatus_t
end

@checked function cudssMatrixGetBatchCsr(matrix, batchCount, nrows, ncols, nnz, rowStart,
rowEnd, colIndices, values, indexType, valueType,
mtype, mview, indexBase)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixGetBatchCsr(matrix::cudssMatrix_t,
batchCount::Ptr{Int64},
nrows::Ptr{Ptr{Cvoid}},
ncols::Ptr{Ptr{Cvoid}},
nnz::Ptr{Ptr{Cvoid}},
rowStart::Ptr{Ptr{Ptr{Cvoid}}},
rowEnd::Ptr{Ptr{Ptr{Cvoid}}},
colIndices::Ptr{Ptr{Ptr{Cvoid}}},
values::Ptr{Ptr{Ptr{Cvoid}}},
indexType::Ptr{cudaDataType_t},
valueType::Ptr{cudaDataType_t},
mtype::Ptr{cudssMatrixType_t},
mview::Ptr{cudssMatrixViewType_t},
indexBase::Ptr{cudssIndexBase_t})::cudssStatus_t
end

@checked function cudssMatrixSetBatchValues(matrix, values)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixSetBatchValues(matrix::cudssMatrix_t,
values::Ptr{Ptr{Cvoid}})::cudssStatus_t
end

@checked function cudssMatrixSetBatchCsrPointers(matrix, rowOffsets, rowEnd, colIndices,
values)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixSetBatchCsrPointers(matrix::cudssMatrix_t,
rowOffsets::Ptr{Ptr{Cvoid}},
rowEnd::Ptr{Ptr{Cvoid}},
colIndices::Ptr{Ptr{Cvoid}},
values::Ptr{Ptr{Cvoid}})::cudssStatus_t
end

@checked function cudssMatrixGetFormat(matrix, format)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixGetFormat(matrix::cudssMatrix_t,
Expand Down

0 comments on commit 06b57d1

Please sign in to comment.