HIP: STRATA_HEAD_MIX_MULTI and STRATA_ONE_TOKEN_COMMIT as opt-ins (=1), default stays off (#1479)

Patch from the issue by jkuepker.

Co-authored-by: jkuepker <20614147+jkuepker@users.noreply.github.com>
This commit is contained in:
Niko1221andjkuepker committed 2026-10-09 15:19:04 +02:00
1 parent 2eafe7f90d
commit 3a55dfd253
2 files changed
+12 -3

No files matched your search

+2 -1
View File
@@ -857,7 +857,8 @@ bool MtpDrafter::record_rest(int step_row, cudaStream_t cs, std::string& err) {
}();
static const bool head_mix_multi_on = [] {
#if defined(STRATA_USE_HIP)
return false;
const char* v = std::getenv("STRATA_HEAD_MIX_MULTI"); // HIP: opt-in (=1)
return v != nullptr && std::atoi(v) != 0;
#else
const char* v = std::getenv("STRATA_HEAD_MIX_MULTI");
return v == nullptr || std::atoi(v) != 0;
+10 -2
View File
@@ -190,7 +190,11 @@ bool sh_stream_on() {
// STRATA_HEAD_MIX_MULTI=0 does too): bitwise the same sums.
bool head_mix_multi_enabled() {
#if defined(STRATA_USE_HIP)
return false;
static const bool on = [] {
const char* v = std::getenv("STRATA_HEAD_MIX_MULTI"); // HIP: opt-in (=1)
return v != nullptr && std::atoi(v) != 0;
}();
return on;
#else
static const bool on = [] {
const char* v = std::getenv("STRATA_HEAD_MIX_MULTI");
@@ -202,7 +206,11 @@ bool head_mix_multi_enabled() {
bool one_token_self_commit() {
#if defined(STRATA_USE_HIP)
return false;
static const bool on = [] {
const char* v = std::getenv("STRATA_ONE_TOKEN_COMMIT"); // HIP: opt-in (=1)
return v != nullptr && std::atoi(v) != 0;
}();
return on;
#else
static const bool on = [] {
const char* v = std::getenv("STRATA_ONE_TOKEN_COMMIT");