Skip to content

Commit e55ed7e

Browse files
Merge pull request #24 from flagos-ai/cuda_v1
merge
2 parents e9054ff + 5667465 commit e55ed7e

13 files changed

Lines changed: 1073 additions & 237 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ python tests/test_spsv.py <dir/> --csv-coo out.csv # same CSV columns as CS
128128
**test_spsm.py** - SpSM (triangular matrix-matrix solve; **square** matrices only):
129129

130130
```bash
131-
python tests/test_spsm.py --synthetic --n 512 --rhs 32
132-
python tests/test_spsm.py <dir/> --csv-csr spsm_csr.csv --rhs 32
133-
python tests/test_spsm.py <dir/> --csv-coo spsm_coo.csv --rhs 32
131+
python tests/test_spsm.py --synthetic --n 512 --rhs 1024
132+
python tests/test_spsm.py <dir/> --csv-csr spsm_csr.csv --rhs 1024
133+
python tests/test_spsm.py <dir/> --csv-coo spsm_coo.csv --rhs 1024
134134
```
135135

136136
**test_gather.py** / **test_scatter.py** - gather/scatter benchmarks (pytest or `python tests/test_gather.py`).

README_cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ python tests/test_spsv.py <目录/> --csv-coo out.csv # 列与 CSR 相同
126126
**test_spsm.py** - SpSM(三角矩阵-稠密矩阵求解;**仅方阵**):
127127

128128
```bash
129-
python tests/test_spsm.py --synthetic --n 512 --rhs 32
130-
python tests/test_spsm.py <目录/> --csv-csr spsm_csr.csv --rhs 32
131-
python tests/test_spsm.py <目录/> --csv-coo spsm_coo.csv --rhs 32
129+
python tests/test_spsm.py --synthetic --n 512 --rhs 1024
130+
python tests/test_spsm.py <目录/> --csv-csr spsm_csr.csv --rhs 1024
131+
python tests/test_spsm.py <目录/> --csv-coo spsm_coo.csv --rhs 1024
132132
```
133133

134134
**test_gather.py** / **test_scatter.py** - gather/scatter 基准(pytest 或 `python tests/test_gather.py`)。

benchmark/benchmark_spsm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Run SpSM synthetic benchmark. From project root: python benchmark/benchmark_spsm.py [--n 512 --rhs 32]."""
1+
"""Run SpSM synthetic benchmark. From project root: python benchmark/benchmark_spsm.py [--n 512 --rhs 1024]."""
22

33
import sys
44
from pathlib import Path

conf/operators.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,38 @@ ops:
261261
stages:
262262
- beta: "1.0"
263263

264+
- id: spsv_descriptor_api
265+
description: |
266+
Provides descriptor, buffer-size, analysis, preprocess, and solve APIs for SpSV workflows.
267+
for:
268+
- flagsparse_create_spsv_handle
269+
- flagsparse_create_dnvec
270+
- flagsparse_create_spmat_csr
271+
- flagsparse_create_spmat_coo
272+
- flagsparse_spsv_buffer_size
273+
- flagsparse_spsv_buffer_size_ex
274+
- flagsparse_spsv_create_workspace
275+
- flagsparse_spsv_analysis_csr
276+
- flagsparse_spsv_analysis_coo
277+
- flagsparse_spsv_analysis_ex
278+
- flagsparse_spsv_preprocess_csr
279+
- flagsparse_spsv_preprocess_coo
280+
- flagsparse_spsv_solve_csr
281+
- flagsparse_spsv_solve_coo
282+
- flagsparse_spsv_solve_ex
283+
labels:
284+
- flagsparse
285+
- sparse
286+
- csr
287+
- coo
288+
- descriptor
289+
- public-api
290+
kind:
291+
- SparseSolver
292+
- Utility
293+
stages:
294+
- beta: "1.0"
295+
264296
- id: spsm_csr
265297
description: |
266298
Solves sparse triangular systems with dense matrix right-hand sides in CSR format.
@@ -292,3 +324,31 @@ ops:
292324
- SparseSolver
293325
stages:
294326
- beta: "1.0"
327+
328+
- id: sparse_format_constructors
329+
description: |
330+
Creates sparse matrix containers and converts COO data into supported sparse formats.
331+
for:
332+
- create_csr_matrix
333+
- create_coo_matrix
334+
- create_csc_matrix
335+
- create_bsr_matrix
336+
- create_sell_matrix
337+
- create_blocked_ell_matrix
338+
- coo_to_csr
339+
- coo_to_csc
340+
- coo_to_bsr
341+
- coo_to_sell
342+
- coo_to_blocked_ell
343+
- generate_random_sparse_matrix
344+
- read_mtx_file
345+
labels:
346+
- flagsparse
347+
- sparse
348+
- format
349+
- public-api
350+
kind:
351+
- SparseFormat
352+
- Utility
353+
stages:
354+
- beta: "1.0"

ops_support.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ spmv,CSR,int64,complex128,trans,triton,SUPPORTED
163163
spmv,CSR,int64,complex128,conj,triton,SUPPORTED
164164
spsm,COO,int32,float32,non,triton,SUPPORTED
165165
spsm,COO,int32,float64,non,triton,SUPPORTED
166-
spsm,COO,int64,float32,non,triton,SUPPORTED
167-
spsm,COO,int64,float64,non,triton,SUPPORTED
166+
spsm,COO,int32,complex64,non,triton,SUPPORTED
167+
spsm,COO,int32,complex128,non,triton,SUPPORTED
168168
spsm,CSR,int32,float32,non,triton,SUPPORTED
169169
spsm,CSR,int32,float64,non,triton,SUPPORTED
170-
spsm,CSR,int64,float32,non,triton,SUPPORTED
171-
spsm,CSR,int64,float64,non,triton,SUPPORTED
170+
spsm,CSR,int32,complex64,non,triton,SUPPORTED
171+
spsm,CSR,int32,complex128,non,triton,SUPPORTED
172172
spsv,COO,int32,float32,non,triton,SUPPORTED
173173
spsv,COO,int32,float32,trans,triton,SUPPORTED
174174
spsv,COO,int32,float64,non,triton,SUPPORTED

ops_support.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ def registry(modules: dict[str, SourceModule]) -> tuple[ApiSpec, ...]:
268268
ApiSpec("sddmm", "flagsparse_sddmm_csr", "sddmm_csr", "CSR", "triton", value_const="SUPPORTED_SDDMM_VALUE_DTYPES", index_const="SUPPORTED_INDEX_DTYPES", ops=("non",)),
269269
ApiSpec("spsv", "flagsparse_spsv_csr", "spsv", "CSR", "triton", value_const="SUPPORTED_SPSV_VALUE_DTYPES", index_const="SUPPORTED_SPSV_INDEX_DTYPES", ops=("NON_TRANS", "TRANS"), notes="TRANS support is narrower than NON_TRANS; see combo constants"),
270270
ApiSpec("spsv", "flagsparse_spsv_coo", "spsv", "COO", "triton", value_const="SUPPORTED_SPSV_VALUE_DTYPES", index_const="SUPPORTED_SPSV_INDEX_DTYPES", ops=("NON_TRANS", "TRANS"), notes="TRANS support is narrower than NON_TRANS; see combo constants"),
271-
ApiSpec("spsm", "flagsparse_spsm_csr", "spsm", "CSR", "triton", value_const="SUPPORTED_SPSM_VALUE_DTYPES", index_const="SUPPORTED_SPSM_INDEX_DTYPES", ops=("NON_TRANS",), notes="opA/opB must both be NON_TRANS; row-major dense layout only"),
272-
ApiSpec("spsm", "flagsparse_spsm_coo", "spsm", "COO", "triton", value_const="SUPPORTED_SPSM_VALUE_DTYPES", index_const="SUPPORTED_SPSM_INDEX_DTYPES", ops=("NON_TRANS",), notes="opA/opB must both be NON_TRANS; row-major dense layout only"),
271+
ApiSpec("spsm", "flagsparse_spsm_csr", "spsm", "CSR", "triton", value_const="SUPPORTED_SPSM_VALUE_DTYPES", index_const="SUPPORTED_SPSM_INDEX_DTYPES", values=("float32", "float64", "complex64", "complex128"), indices=("int32",), ops=("NON_TRANS",), notes="opA/opB must both be NON_TRANS; row-major dense layout only"),
272+
ApiSpec("spsm", "flagsparse_spsm_coo", "spsm", "COO", "triton", value_const="SUPPORTED_SPSM_VALUE_DTYPES", index_const="SUPPORTED_SPSM_INDEX_DTYPES", values=("float32", "float64", "complex64", "complex128"), indices=("int32",), ops=("NON_TRANS",), notes="opA/opB must both be NON_TRANS; row-major dense layout only"),
273273
)
274274

275275

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ readme = "README.md"
1010
requires-python = ">=3.10"
1111
dependencies = []
1212
authors = [{ name = "Your Name", email = "your.email@example.com" }]
13-
license = "Apache-2.0"
14-
license-files = ["LICENSE"]
13+
license = { file = "LICENSE" }
1514
classifiers = [
1615
"Development Status :: 4 - Beta",
1716
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)