mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #273] [CLOSED] Add DG_MINIMIZE_NUM_SMS env var to control SM minimization #335
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepGEMM#335
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/273
Author: @yurekami
Created: 1/1/2026
Status: ❌ Closed
Base:
main← Head:feature/env-minimize-sms📝 Commits (1)
b4e2500Add DG_MINIMIZE_NUM_SMS env var to control SM minimization📊 Changes
2 files changed (+6 additions, -2 deletions)
View changed files
📝
csrc/jit_kernels/heuristics/sm100.hpp(+3 -1)📝
csrc/jit_kernels/heuristics/sm90.hpp(+3 -1)📄 Description
Summary
This PR adds an environment variable
DG_MINIMIZE_NUM_SMSto control whether DeepGEMM should minimize the number of SMs used for kernel execution, addressing #239.Background
The current SM minimization logic in
get_best_config()recomputes the minimal number of SMs required:This can invoke kernel compilation multiple times with different configurations, causing unstable time-to-first-token (TTFT) during inference.
Changes
SM90ArchSpec::should_minimize_num_sms()to check env varSM100ArchSpec::should_minimize_num_sms()to check env varUsage
Benefits
Test Plan
DG_MINIMIZE_NUM_SMS=0disables SM minimizationFixes #239
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.