Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion csrc/jit_kernels/heuristics/sm100.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ struct SM100ArchSpec {
}

static bool should_minimize_num_sms() {
return true;
// Allow control via environment variable (default: enabled)
// Set DG_MINIMIZE_NUM_SMS=0 to disable SM minimization for more stable TTFT
return get_env<int>("DG_MINIMIZE_NUM_SMS", 1) != 0;
}

static std::pair<bool, bool> get_multicast_legality(const GemmType& gemm_type, const int& num_groups,
Expand Down
4 changes: 3 additions & 1 deletion csrc/jit_kernels/heuristics/sm90.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ struct SM90ArchSpec {
}

static bool should_minimize_num_sms() {
return true;
// Allow control via environment variable (default: enabled)
// Set DG_MINIMIZE_NUM_SMS=0 to disable SM minimization for more stable TTFT
return get_env<int>("DG_MINIMIZE_NUM_SMS", 1) != 0;
}

static std::pair<bool, bool> get_multicast_legality(const GemmType& gemm_type, const int& num_groups,
Expand Down