Several 2.x device wrappers have update()/operator() paths that never compile or silently apply stale state
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
Description
Description
A cluster of 2.x-era device-level wrappers has broken or silently stale update() / convenience operator() paths. None of these are reachable from in-tree callers (the profiler and examples use initialize/run), so they only surface when a user calls them directly.
Never compiles
-
gemm/device/gemm_array.h:404-408- both specializations'update()callthreadblock_swizzle.get_tiled_shape(args.problem_size, args.batch_count, {kM, kN, kK});i.e.
(GemmCoord, int, GemmCoord). The swizzle only offers(GemmCoord, GemmCoord, int)(plus conv variants); there is no matching overload. (initialize()uses the correct order.) -
gemm/device/gemm_splitk_parallel.h:620- the ColumnMajor-output specialization'soperator()(args, workspace, stream)callsinitialize(args, workspace, stream), but both specializations declareStatus initialize(Arguments const&, void*). The RowMajor path calls the 2-arg form. -
gemm/device/gemm_universal_with_broadcast.h:348,gemm_universal_streamk_with_broadcast.h,gemm/device/gemm_with_k_reduction.h:377,gemm/device/gemm_layernorm_mainloop_fusion.h:347- all four forwardupdate(to_underlying_arguments(args), workspace)through a chain that ends atGemmUniversalBase::update(Arguments const&)(gemm_universal_base.h:425, one parameter). The intermediategemm_universal.h:404forwards two arguments into it, so the chain cannot compile. -
gemm/kernel/rank_2k_grouped.h:328-Rank2KGrouped::Params::updatedoesoutput_op = args.output_op;but theArgumentsmember is namedepilogue(:205). Compile error if instantiated; note thisupdatealso drops lda/ldb/ldc/ldd/mode even if the name matched. -
gemm/device/gemv_blockscaled.h:134-136-update()callsparams_.update(args), but the kernel'sParamshas noupdatemember at all (unlike bothkernel/gemv.hspecializations).
Compiles but silently applies stale state
-
gemm/device/symm.h:301/trmm.h:459(and their second specializations) -initialize()builds Params fromargs.swapped_matrices()forSideMode::kRight, butupdate()passes rawargstoparams_.update(...). After an update on a right-side problem, the mainloop reads the symmetric operand with unswapped strides: wrong results or out-of-bounds access. -
gemm/device/gemm_sparse_with_absmax.h:298-315-update()refreshesref_A/B/C/D/Eandoutput_opbut notref_Aux/ptr_Vector/ldr, which exist in the kernelParams(sparse_gemm_with_absmax.h:109-110) and are refreshed by the sibling non-sparse absmax wrappers' updates. Post-update runs keep writing the absolute-maximum output to stale pointers. -
gemm/device/gemm_splitk_parallel.h:315-331-update()refreshes operand pointers only;args.epilogue(alpha/beta consumed by the reduction launch) and any geometry changes are discarded whilekSuccessis returned.
Suggested fix
For each wrapper either implement update() consistently with initialize() (same argument transforms, same fields refreshed) or delete the dead entry points so users get a clear "not implemented" instead of a compile error or stale success.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by comparing initialize() and update() in the listed device wrappers, especially gemm/device/gemm_array.h, gemm/device/gemm_splitk_parallel.h, gemm/device/gemm_universal_with_broadcast.h, symm.h, trmm.h, and gemm_sparse_with_absmax.h. Trace each path into the corresponding kernel Params and GemmUniversalBase::update, then verify every affected wrapper either compiles and refreshes equivalent state or clearly rejects unsupported updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100