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

Abierto
#291 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C++
Estrellas
37
Forks
21
Merge medio
11 h 3 min
PR fusionados (30 d)
13

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SparseLinearAlgebra/spla

Todos los issues de SparseLinearAlgebra/spla

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.