[PR #428] [CLOSED] fix: reject non-positive block size multiples #439

Closed
opened 2026-10-26 21:17:48 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/428
Author: @nisbenz
Created: 9/7/2026
Status: ❌ Closed

Base: main ← Head: fix/validate-block-size-multiples


📝 Commits (1)

  • 605ae56 fix: reject non-positive block size multiples

📊 Changes

2 files changed (+21 additions, -0 deletions)

View changed files

📝 csrc/jit_kernels/heuristics/runtime.hpp (+1 -0)
➕ tests/test_runtime.py (+20 -0)

📄 Description

Summary

Reject zero and negative values passed to set_block_size_multiple_of.

These values are currently stored without validation and later used by the
SM90 and SM100 kernel-selection heuristics. A zero value can produce
modulo-by-zero or a candidate loop with a zero increment.

This change fails early with a RuntimeError and adds regression coverage for
both scalar and (M, N) inputs.

Testing

  • python -m compileall -q tests/test_runtime.py
  • git diff --check

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepGEMM/pull/428 **Author:** [@nisbenz](https://github.com/nisbenz) **Created:** 9/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/validate-block-size-multiples` --- ### 📝 Commits (1) - [`605ae56`](https://github.com/deepseek-ai/DeepGEMM/commit/605ae569d51c7efdc7ea40cf3854ff4e33b7b53e) fix: reject non-positive block size multiples ### 📊 Changes **2 files changed** (+21 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `csrc/jit_kernels/heuristics/runtime.hpp` (+1 -0) ➕ `tests/test_runtime.py` (+20 -0) </details> ### 📄 Description ## Summary Reject zero and negative values passed to `set_block_size_multiple_of`. These values are currently stored without validation and later used by the SM90 and SM100 kernel-selection heuristics. A zero value can produce modulo-by-zero or a candidate loop with a zero increment. This change fails early with a `RuntimeError` and adds regression coverage for both scalar and `(M, N)` inputs. ## Testing - `python -m compileall -q tests/test_runtime.py` - `git diff --check` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 21:17:48 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#439
No description provided.