A launch dimension became an accidental limit
The previous implementation took a tensor dimension associated with the token count and used it directly as the GPU launch grid’s second coordinate. That launch dimension is capped at 65,535 on the CUDA and HIP paths described by the contributor. A sufficiently large input could therefore fail before the computation completed. This distinction matters when diagnosing long workloads: a kernel launch configuration error is different from insufficient memory, a model’s positional limits, or poor answer quality over a long document.
The patch keeps the grid bounded
The code change updates ggml/src/ggml-cuda/add-id.cu and the backend operation tests. Rather than requiring a separate grid position for every token, the launch bounds its second dimension and passes the full ne2 size into the kernel. A loop advances through additional positions in steps of gridDim.y. The intended computation remains covered even when the input exceeds the number of blocks that can be launched along that axis. This explains why the change can repair the failure without claiming a general throughput improvement.
The regression case tests a meaningful boundary
The original November 17 issue reproduced the problem using test-backend-ops, without requiring a model download. Its initial environment used an AMD Radeon RX 9060 XT, and a later comment reported reproduction on an NVIDIA RTX 5070. The contributor subsequently reported that the ADD_ID suite passed on both cards with the patch. A new regression case uses 70,000 tokens, crossing a boundary that the previous cases, which reached only 129, did not exercise. These are project contributor reports, not independent measurements by this publication or certification of every supported device.
Backend status must be tracked separately
The larger test also exposed a corresponding Vulkan launch limit. Related pull request #33232 proposes bounding the workgroup count and looping inside the shader, but remained open when checked. CUDA/HIP support in b12823 therefore cannot be used as evidence that the Vulkan path is already fixed. Users assessing the update should match their build, backend and workload shape, and distinguish this operation-specific correction from model compatibility or memory capacity. The cited evidence also does not establish an equivalent change for Metal or the CPU backend.

Discussion.
Your perspective matters. Sign in, pick a nickname and choose your cyber identity.
Loading discussion…
Your account name, email and photo stay off your comments.