Skip to content

Commit

Permalink
Update libcudss.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Jul 4, 2024
1 parent 2f2d6c0 commit 88674af
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions src/libcudss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const cudssConfig_t = Ptr{cudssConfig}
CUDSS_CONFIG_PIVOT_THRESHOLD = 8
CUDSS_CONFIG_PIVOT_EPSILON = 9
CUDSS_CONFIG_MAX_LU_NNZ = 10
CUDSS_CONFIG_HYBRID_MODE = 11
CUDSS_CONFIG_HYBRID_DEVICE_MEMORY_LIMIT = 12
CUDSS_CONFIG_USE_CUDA_REGISTER_MEMORY = 13
end

@cenum cudssDataParam_t::UInt32 begin
Expand All @@ -46,6 +49,8 @@ end
CUDSS_DATA_PERM_COL = 7
CUDSS_DATA_DIAG = 8
CUDSS_DATA_USER_PERM = 9
CUDSS_DATA_HYBRID_DEVICE_MEMORY_MIN = 10
CUDSS_DATA_COMM = 11
end

@cenum cudssPhase_t::UInt32 begin
Expand All @@ -64,10 +69,8 @@ end
CUDSS_STATUS_ALLOC_FAILED = 2
CUDSS_STATUS_INVALID_VALUE = 3
CUDSS_STATUS_NOT_SUPPORTED = 4
CUDSS_STATUS_ARCH_MISMATCH = 5
CUDSS_STATUS_EXECUTION_FAILED = 6
CUDSS_STATUS_INTERNAL_ERROR = 7
CUDSS_STATUS_ZERO_PIVOT = 8
CUDSS_STATUS_EXECUTION_FAILED = 5
CUDSS_STATUS_INTERNAL_ERROR = 6
end

@cenum cudssMatrixType_t::UInt32 begin
Expand Down Expand Up @@ -146,8 +149,7 @@ end
sizeInBytes::Csize_t, sizeWritten::Ptr{Csize_t})::cudssStatus_t
end

@checked function cudssExecute(handle, phase, solverConfig, solverData, inputMatrix,
solution, rhs)
@checked function cudssExecute(handle, phase, solverConfig, solverData, inputMatrix, solution, rhs)
initialize_context()
@gcsafe_ccall libcudss.cudssExecute(handle::cudssHandle_t, phase::cudssPhase_t,
solverConfig::cudssConfig_t, solverData::cudssData_t,
Expand All @@ -160,6 +162,12 @@ end
@gcsafe_ccall libcudss.cudssSetStream(handle::cudssHandle_t, stream::cudaStream_t)::cudssStatus_t
end

@checked function cudssSetCommLayer(handle, commLibFileName)
initialize_context()
@gcsafe_ccall libcudss.cudssSetCommLayer(handle::cudssHandle_t,
commLibFileName::Cstring)::cudssStatus_t
end

@checked function cudssConfigCreate(solverConfig)
initialize_context()
@gcsafe_ccall libcudss.cudssConfigCreate(solverConfig::Ptr{cudssConfig_t})::cudssStatus_t
Expand Down Expand Up @@ -206,9 +214,8 @@ end
layout::cudssLayout_t)::cudssStatus_t
end

@checked function cudssMatrixCreateCsr(matrix, nrows, ncols, nnz, rowStart, rowEnd,
colIndices, values, indexType, valueType, mtype,
mview, indexBase)
@checked function cudssMatrixCreateCsr(matrix, nrows, ncols, nnz, rowStart, rowEnd, colIndices,
values, indexType, valueType, mtype, mview, indexBase)
initialize_context()
@gcsafe_ccall libcudss.cudssMatrixCreateCsr(matrix::Ptr{cudssMatrix_t}, nrows::Int64,
ncols::Int64, nnz::Int64, rowStart::CuPtr{Cvoid},
Expand Down Expand Up @@ -277,3 +284,22 @@ end
@gcsafe_ccall libcudss.cudssSetDeviceMemHandler(handle::cudssHandle_t,
handler::Ptr{cudssDeviceMemHandler_t})::cudssStatus_t
end

@cenum cudssOpType_t::UInt32 begin
CUDSS_SUM = 0
CUDSS_MAX = 1
CUDSS_MIN = 2
end

struct cudssDistributedInterface_t
cudssCommRank::Ptr{Cvoid}
cudssCommSize::Ptr{Cvoid}
cudssSend::Ptr{Cvoid}
cudssRecv::Ptr{Cvoid}
cudssBcast::Ptr{Cvoid}
cudssReduce::Ptr{Cvoid}
cudssAllreduce::Ptr{Cvoid}
cudssScatterv::Ptr{Cvoid}
cudssCommSplit::Ptr{Cvoid}
cudssCommFree::Ptr{Cvoid}
end

0 comments on commit 88674af

Please sign in to comment.