added GTests for Conv GPU groups>1 inference#22
Open
harz05 wants to merge 1 commit into
Open
Conversation
This was referenced May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21
This PR adds ONNX models with groups 2 and 4 along with reference outputs and TEST_F cases in the
TestCustomModelsFromONNXForAlpakaCuda.cxx. A combined batch=4 + groups=2 model is also added to validate that the outer batch loop and inner group loop nest correctly.Reference outputs are verified against PyTorch F.conv2d on Google Colab (NVIDIA T4, CUDA 12.x).
Choice of weights
Weights are iota-filled (1, 2, 3, ...) rather than all-ones so that each group's filter slice has distinguishable values; distinct values per slice make any per-group indexing bug visible. Inputs use
std::iotafor the same reason.Regression in current gpu/alpaka
The tests are currently failing. Reason being that the grouped path in
Generate_GPU_ALPAKAofROperator_Conv.hxxseems to have been refactored recently, thegemm_nnow has been declared locally in the functionn, but the per-group division ofgemm_nthat was previously done inInitialize()didn't get carried along. The comment "we divide per group at launch" is still there, but no division actually happens at any launch site.The effect:
gemm_nstays at total output channels rather than per-group. Forgroups=2withoutC=4, each per-group matmul computes all 4 output channels instead of 2, using group 0's input throughout. Empirically, output indices i=0..49 are correct while i=50..99 are wrong.Steps to reproduce on Colab: