OpenCL mxm: fix chunk pool estimation and multi-segment row-list pointers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- backend, performance
Research direction
Start with src/opencl/cl_mxm_chunk_estimate.hpp and trace how estimate_chunk_pool accounts for chunk storage, including the 48-byte header. Then follow row-list pointers in src/opencl/kernels/chunk.cl and the mxm_merge_* paths in cl_mxm_pipeline.hpp and the mxm_merge_*.cl files. Check how CHUNK_MULTI_SEGMENT is passed as 0 or 1; done means pool estimates include headers and row-list pointers work across pool segments.
Written by the indexing model from the issue text.
Description
Problem: OpenCL mxm breaks on larger matrices whenever CL_MXM_POOL_FAIL allocates a second pool segment: mxm_merge_* and spla_chunk_add_potentially_shared_row (output_row_list_heads / next_*) only address the latest single chunks buffer without segment index, while estimate_chunk_pool underestimates pool bytes by ignoring chunk headers.
Fix:
- Account for chunk header/prefix overhead (48 bytes per chunk) in estimate_chunk_pool (src/opencl/cl_mxm_chunk_estimate.hpp) to avoid unnecessary CL_MXM_POOL_FAIL restarts.
- Add multi-segment support to row-list pointers (src/opencl/kernels/chunk.cl) and mxm_merge_* (cl_mxm_pipeline.hpp, mxm_merge_*.cl), gated by -D CHUNK_MULTI_SEGMENT=0/1.
- Dominant language
- C++
- Stars
- 37
- Forks
- 21
- Avg merge
- 11h 3m
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SparseLinearAlgebra/spla
-
task
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SparseLinearAlgebra/spla#316 · 1 comment ·
Maintainers usually reply within 1 day
-
task
Difficulty 1/5 Under an hour Newbie friendliness 88/100
SparseLinearAlgebra/spla#249 · 1 comment ·
Maintainers usually reply within 1 day
-
task
Difficulty 3/5 1-2 days Newbie friendliness 70/100
SparseLinearAlgebra/spla#314 · 1 comment ·
Maintainers usually reply within 1 day
-
Optimize compute_spgemm_part chunk flushes, atomics, radix sort, SLM, restrict, and subgroup shuffleOpentask
Difficulty 5/5 Over a week Newbie friendliness 35/100
SparseLinearAlgebra/spla#313 · 1 comment ·
Maintainers usually reply within 1 day
-
task
Difficulty 4/5 3-5 days Newbie friendliness 35/100
SparseLinearAlgebra/spla#312 · 1 comment ·
Maintainers usually reply within 1 day
All issues in SparseLinearAlgebra/spla
Similar issues
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itselfPossibly taken @fedonman claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gofractally/psibase#2379 ·
Maintainers usually reply within 3 days