OpenCL mxm: move output_count and sample_ids to private memory in MergeMaxChunks
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- data, performance
Research direction
Read src/opencl/kernels/mxm_merge_max_chunks.cl, focusing on MxMMergeMaxChunksSample and the spla_mxm_merge_max_chunks_kernel propagation loop. Move output_count and sample_ids into the per-thread scope described in the issue, then run the affected OpenCL mxm test on a larger graph. Done when the kernel completes without the hang and produces the expected nonzero result.
Written by the indexing model from the issue text.
Description
Problem:
spla_mxm_merge_max_chunks_kernel (src/opencl/kernels/mxm_merge_max_chunks.cl) hangs in the do { ... } while (true) propagation loop (lines 642–662) on larger graphs (triggering i915 GPU reset after ~12s and nnz(R)=0). In MxMMergeMaxChunksSample (lines 266–267), output_count and sample_ids are declared in __local memory sized for a single thread (LM_SIZE(MMC_LENGTH_SAMPLES_PER_THREAD)), so all threads overwrite the same scratch.sample.output_count[0] / sample_ids[0] instead of keeping per-thread values (unlike GALATIC, where both are thread-private).
Fix:
Move output_count and sample_ids out of __local MxMMergeMaxChunksSample into __private per-thread arrays (uint output_count[MMC_LENGTH_SAMPLES_PER_THREAD]; uint sample_ids[MMC_LENGTH_SAMPLES_PER_THREAD];) inside if (!common.completed) in src/opencl/kernels/mxm_merge_max_chunks.cl.
- 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 1/5 Under an hour Newbie friendliness 88/100
SparseLinearAlgebra/spla#249 · 1 comment ·
Maintainers usually reply within 1 day
-
task
Difficulty 4/5 3-5 days Newbie friendliness 52/100
SparseLinearAlgebra/spla#315 · 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