pub fn sparse_to_dense(
ctx: &Context,
matrix_a: &SparseMatrixDescriptor<'_>,
matrix_b: &mut DenseMatrixDescriptor<'_>,
algorithm: SparseToDenseAlgorithm,
external_buffer: Option<DevicePtr>,
) -> Result<()>Expand description
Converts matrix_a in CSR, CSC, or COO format into its dense representation matrix_b.
Blocked-ELL is not currently supported.
sparse_to_dense_buffer_size returns the size of the workspace needed by sparse_to_dense.
sparse_to_dense supports the following index type for representing matrix_a:
- 32-bit indices (
IndexType::I32) - 64-bit indices (
IndexType::I64)
sparse_to_dense supports the following data types:
A/B | Notes |
|---|---|
DataType::I8 | |
DataType::F16 | |
DataType::Bf16 | |
DataType::F32 | |
DataType::F64 | |
DataType::ComplexF16 | Deprecated. |
DataType::ComplexBf16 | Deprecated. |
DataType::ComplexF32 | |
DataType::ComplexF64 |
sparse_to_dense supports the following algorithm:
| Algorithm | Notes |
|---|---|
SparseToDenseAlgorithm::Default | Default algorithm. |
sparse_to_dense has the following properties:
- Requires no extra storage.
- Supports asynchronous execution.
- Provides deterministic (bitwise) results for each run.
- Allows the indices of
matrix_ato be unsorted.
sparse_to_dense supports the following optimizations:
- CUDA graph capture.
- Hardware Memory Compression.