Skip to content

Commit 76e12d5

Browse files
jagadish-amddnikolaev-amd
authored andcommitted
[reland][AMD] Turn on TF32 for aten::mm (#1863)
Ported upstream PR Signed-off-by: Jagadish Krishnamoorthy <[email protected]> (cherry picked from commit f7ad58f)
1 parent 6a03607 commit 76e12d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aten/src/ATen/Context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ void Context::setBenchmarkLimitCuDNN(int b) {
254254

255255
bool Context::allowTF32CuBLAS() const {
256256
#ifdef USE_ROCM
257-
const auto allow_tf32 = c10::utils::check_env(hipblaslt_allow_tf32);
257+
const static auto allow_tf32 = c10::utils::check_env(hipblaslt_allow_tf32);
258258
if (allow_tf32 != true) {
259259
return false;
260260
}
@@ -264,7 +264,7 @@ bool Context::allowTF32CuBLAS() const {
264264

265265
void Context::setAllowTF32CuBLAS(bool b) {
266266
#ifdef USE_ROCM
267-
const auto allow_tf32 = c10::utils::check_env(hipblaslt_allow_tf32);
267+
const static auto allow_tf32 = c10::utils::check_env(hipblaslt_allow_tf32);
268268
if (allow_tf32 != true) {
269269
C10_LOG_FIRST_N(INFO, 10) << "torch.backends.cuda.matmul.allow_tf32 is not supported on ROCm by default. "
270270
<< "Please set environment variable HIPBLASLT_ALLOW_TF32=1 to enable it.";

0 commit comments

Comments
 (0)