From 04305781843456c3da1459daf98056ff7277d17c Mon Sep 17 00:00:00 2001 From: rraminen Date: Tue, 5 Aug 2025 11:20:49 +0000 Subject: [PATCH 1/2] Define datatypes when TORCH_HIP_VERSION >= 700 --- torch/csrc/jit/codegen/fuser/cuda/resource_strings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h b/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h index ff2ef1f2377ce..65f2f5a822025 100644 --- a/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h +++ b/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h @@ -12,7 +12,7 @@ cases*/ static constexpr auto bfloat16_type_string = "__nv_bfloat16"; -#if defined(USE_ROCM) +#if defined(USE_ROCM) && (TORCH_HIP_VERSION < 700) static auto type_declarations_template = at::jit::CodeTemplate(R"( ${HalfHeader} ${BFloat16Header} From 08b7a192cb4ee19c2c5932705ffa5c621c10bd86 Mon Sep 17 00:00:00 2001 From: rraminen Date: Wed, 6 Aug 2025 18:36:46 +0000 Subject: [PATCH 2/2] Use ROCM_VERSION --- torch/csrc/jit/codegen/fuser/cuda/resource_strings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h b/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h index 65f2f5a822025..9728d27d4d79b 100644 --- a/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h +++ b/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h @@ -12,7 +12,7 @@ cases*/ static constexpr auto bfloat16_type_string = "__nv_bfloat16"; -#if defined(USE_ROCM) && (TORCH_HIP_VERSION < 700) +#if defined(USE_ROCM) && ROCM_VERSION < 70000 static auto type_declarations_template = at::jit::CodeTemplate(R"( ${HalfHeader} ${BFloat16Header}