Fix OpenCL mxm sort-mode fallback, pinned staging and batched status readback

Aperta
#291 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Read spla/AGENTS.md and Algorithm Semantics.md first, then inspect spla/src/opencl/cl_mxm_compute_spgemm_part.hpp around line 143 and cl_mxm_pipeline.hpp around lines 153–196, 557, 587, 750, and 780. Compare the staging and status transfer approach with GALATIC’s Multiply.cuh lines 569–571, following the linked source references in Algorithm Semantics.md. Done means large-column cases such as cols = 227320 select 64-bit mode, pinned staging is reused, and the four status values are read together.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

task

You are porting step by step the multiplication algorithm from GALATIC and integrating it into the spla library, following spla architecture. Its semantics are given to you. The "HOW" of implementing it is in the GALATIC sources (links to the specific ones are in Algorithm Semantics.md). Read spla/AGENTS.md, then Algorithm Semantics.md. Simplifying the implementation without a reason is not allowed. If you have doubts, uncertainty, or ambiguity, ask immediately. If you see are cub primitives,which don't have a direct OpenCL or spla direct analog, you need to observe how they work(in cub/), so that you don’t end up writing a naive or inefficient implementation. Right now you need to fix this critical bugs:
Fix the sort-mode selection in spla/src/opencl/cl_mxm_compute_spgemm_part.hpp:143 so that 32-bit mode is chosen only when row_bits + col_bits <= 32, with large-column cases such as cols = 227320 falling back to 64-bit mode.
- Persistent pinned staging: create one host-visible/pinned buffer (CL_MEM_ALLOC_HOST_PTR) once and reuse it, instead of cl_mxm_read/write allocating staging and doing a blocking copy every time (cl_mxm_pipeline.hpp:153-196).
- Batched readback: write flags, shared_rows, counters, and output_count into one status buffer, then read/map it once instead of 5 separate blocking reads (:557,587,750,780).
Goal: remove repeated queue drains, so the CPU does not wait after every small scalar. GALATIC does something similar with one cudaMemcpy for flags+counters: Multiply.cuh:569-571.

Lingua principale
C++
Stelle
37
Fork
21
Merge medio
11h 3m
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SparseLinearAlgebra/spla

Tutte le issue di SparseLinearAlgebra/spla

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.