From 2b6c603198a48c55b6a720528b55e48874fd908f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 21:25:12 -0400 Subject: [PATCH 01/14] Format Bazel code (#1542) Co-authored-by: enzyme-ci-bot[bot] <78882869+enzyme-ci-bot[bot]@users.noreply.github.com> --- deps/ReactantExtra/BUILD | 4 ++-- deps/ReactantExtra/WORKSPACE | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/deps/ReactantExtra/BUILD b/deps/ReactantExtra/BUILD index 4c3717e851..9a333177ec 100644 --- a/deps/ReactantExtra/BUILD +++ b/deps/ReactantExtra/BUILD @@ -758,7 +758,7 @@ cc_toolchain_config( "-D__TIME__=\"redacted\"", "-Wno-unused-command-line-argument", "-Wno-gnu-offsetof-extensions", - "-mxsave", + "-mxsave", ], ) @@ -1193,7 +1193,7 @@ cc_library( ], "@xla//xla/tsl:windows": [ "@xla//xla/tsl/platform/windows:platform_port", - ], + ], "//conditions:default": [ "@gloo//:transport_tcp", "@xla//xla/backends/cpu/collectives:gloo_collectives", diff --git a/deps/ReactantExtra/WORKSPACE b/deps/ReactantExtra/WORKSPACE index 9cbcddb575..e057f7cadd 100644 --- a/deps/ReactantExtra/WORKSPACE +++ b/deps/ReactantExtra/WORKSPACE @@ -40,10 +40,10 @@ NEW_XLA_PATCHES = CUPTI_NEW + [ """ sed -i.bak0 "s/Shlwapi/shlwapi/g" xla/tsl/platform/windows/load_library.cc xla/tsl/platform/windows/windows_file_system.cc xla/tsl/platform/windows/env.cc """, -""" + """ sed -i.bak0 "1s/^/#ifdef PLATFORM_WINDOWS\\n#include \\n#include \\n#endif/g" third_party/tsl/tsl/platform/cpu_info.cc """, -""" + """ sed -i.bak0 "1s/^/#define _USE_MATH_DEFINES\\n/g" xla/fp_util.h xla/hlo/builder/lib/prng.cc xla/literal_comparison.cc xla/hlo/builder/lib/math.cc xla/service/spmd/fft_handler.cc xla/service/cpu/onednn_contraction_rewriter.cc xla/hlo/evaluator/hlo_evaluator.cc """, """ @@ -138,9 +138,11 @@ LLVM_TARGETS = [ # ) load("@enzyme_ad//third_party/jax:workspace.bzl", jax_workspace = "repo") + jax_workspace([]) load("@enzyme_ad//third_party/xla:workspace.bzl", xla_workspace = "repo") + xla_workspace(NEW_XLA_PATCHES) # @@ -158,10 +160,9 @@ xla_workspace(NEW_XLA_PATCHES) # # pip_install_dependencies() - load("@enzyme_ad//third_party/enzyme:workspace.bzl", enzyme_workspace = "repo") -enzyme_workspace() +enzyme_workspace() # http_archive( # name = "upb", From 28e825dae206752e2848723644bb0e55f9297be6 Mon Sep 17 00:00:00 2001 From: William Moses Date: Sun, 10 Aug 2025 13:29:17 -0500 Subject: [PATCH 02/14] Update WORKSPACE --- deps/ReactantExtra/WORKSPACE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/ReactantExtra/WORKSPACE b/deps/ReactantExtra/WORKSPACE index e057f7cadd..c536ec07ef 100644 --- a/deps/ReactantExtra/WORKSPACE +++ b/deps/ReactantExtra/WORKSPACE @@ -4,7 +4,7 @@ NSYNC_COMMIT = "82b118aa7ace3132e517e2c467f8732978cf4023" NSYNC_SHA256 = "" -ENZYMEXLA_COMMIT = "15d5dab32f0eb9da1c26b7b934148aa430bdb144" +ENZYMEXLA_COMMIT = "ced80ad0634e2f30f0d8bef2eaaff3cad1b97664" ENZYMEXLA_SHA256 = "" From e29b0c931d9c84565f0895bbf75232ed2f56618d Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 10 Aug 2025 16:23:36 -0500 Subject: [PATCH 03/14] windows libstdc++ --- deps/ReactantExtra/BUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ReactantExtra/BUILD b/deps/ReactantExtra/BUILD index 9a333177ec..936b69fecb 100644 --- a/deps/ReactantExtra/BUILD +++ b/deps/ReactantExtra/BUILD @@ -700,7 +700,7 @@ cc_toolchain_config( host_system_name = "linux", link_flags = [ "-fuse-ld=lld", - "-stdlib=libc++", + "-stdlib=libstdc++", ], link_libs = [ "-lstdc++", @@ -713,7 +713,7 @@ cc_toolchain_config( "-DNDEBUG", "-ffunction-sections", "-fdata-sections", - "-stdlib=libc++", + "-stdlib=libstdc++", ], opt_link_flags = ["-Wl,--gc-sections"], supports_start_end_lib = False, From d3dc49d2b8fac1176fa150166b30b1f754d23140 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 10 Aug 2025 18:08:32 -0500 Subject: [PATCH 04/14] more chkstk fixes --- deps/ReactantExtra/WORKSPACE | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deps/ReactantExtra/WORKSPACE b/deps/ReactantExtra/WORKSPACE index c536ec07ef..084e20eac0 100644 --- a/deps/ReactantExtra/WORKSPACE +++ b/deps/ReactantExtra/WORKSPACE @@ -37,6 +37,10 @@ sed -i.bak0 "/CUPTI_DRIVER_TRACE_CBID_cuGraphAddNode_v2/d" xla/backends/profiler CUPTI_NEW = [] NEW_XLA_PATCHES = CUPTI_NEW + [ + """ +sed -i.bak0 "s/__chkstk/__chkstk_ms/g" xla/service/cpu/runtime_symbol_generator.cc +""", + """ sed -i.bak0 "s/Shlwapi/shlwapi/g" xla/tsl/platform/windows/load_library.cc xla/tsl/platform/windows/windows_file_system.cc xla/tsl/platform/windows/env.cc """, From ea444dbca7a0997149b0cfc5070fe0dec1acb7b5 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 10 Aug 2025 18:28:09 -0500 Subject: [PATCH 05/14] more chkstk --- deps/ReactantExtra/WORKSPACE | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deps/ReactantExtra/WORKSPACE b/deps/ReactantExtra/WORKSPACE index 084e20eac0..f235a997f3 100644 --- a/deps/ReactantExtra/WORKSPACE +++ b/deps/ReactantExtra/WORKSPACE @@ -40,7 +40,12 @@ NEW_XLA_PATCHES = CUPTI_NEW + [ """ sed -i.bak0 "s/__chkstk/__chkstk_ms/g" xla/service/cpu/runtime_symbol_generator.cc """, - + """ +sed -i.bak0 "1s/^/#include \\"llvm\\/Support\\/DynamicLibrary.h\\"\\n/g" xla/service/cpu/runtime_symbol_generator.cc +""", + """ +sed -i.bak0 "s/(__chkstk_ms)/(llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(\\"__chkstk_ms\\"))/g" xla/service/cpu/runtime_symbol_generator.cc +""", """ sed -i.bak0 "s/Shlwapi/shlwapi/g" xla/tsl/platform/windows/load_library.cc xla/tsl/platform/windows/windows_file_system.cc xla/tsl/platform/windows/env.cc """, From 784beb50761930c07c902836f676553361887f8a Mon Sep 17 00:00:00 2001 From: William Moses Date: Sun, 10 Aug 2025 18:47:59 -0700 Subject: [PATCH 06/14] Fix enzyme.make_zero! (#1544) * Fix enzyme.make_zero * fix * with test * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * allowscalar --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/Enzyme.jl | 40 ++++++++++++++++++++++++++++++++++++++++ test/autodiff.jl | 7 +++++++ 2 files changed, 47 insertions(+) diff --git a/src/Enzyme.jl b/src/Enzyme.jl index d33b5e6729..d8cc086e05 100644 --- a/src/Enzyme.jl +++ b/src/Enzyme.jl @@ -5,6 +5,46 @@ const enzyme_dupnoneed = 3 const enzyme_outnoneed = 4 const enzyme_constnoneed = 5 +@inline function Enzyme.make_zero(x::RNumber) + return zero(Core.Typeof(x)) +end + +@inline function Enzyme.make_zero(x::RArray{FT,N})::RArray{FT,N} where {FT<:AbstractFloat,N} + return Base.zero(x) +end + +@inline function Enzyme.make_zero( + x::RArray{Complex{FT},N} +)::RArray{Complex{FT},N} where {FT<:AbstractFloat,N} + return Base.zero(x) +end + +macro register_make_zero_inplace(sym) + quote + @inline function $sym(prev::RArray{T,N})::Nothing where {T<:AbstractFloat,N} + $sym(prev, nothing) + return nothing + end + + @inline function $sym(prev::RArray{T,N}, seen::ST)::Nothing where {T,N,ST} + if Enzyme.Compiler.guaranteed_const_nongen(T, nothing) + return nothing + end + if !isnothing(seen) + if prev in seen + return nothing + end + push!(seen, prev) + end + fill!(prev, zero(T)) + return nothing + end + end +end + +@register_make_zero_inplace(Enzyme.make_zero!) +@register_make_zero_inplace(Enzyme.remake_zero!) + function Enzyme.make_zero( ::Type{RT}, seen::IdDict, prev::RT, ::Val{copy_if_inactive}=Val(false) )::RT where {copy_if_inactive,RT<:Union{RArray,RNumber}} diff --git a/test/autodiff.jl b/test/autodiff.jl index 25641bc231..a11ec900e4 100644 --- a/test/autodiff.jl +++ b/test/autodiff.jl @@ -231,6 +231,13 @@ vector_forward_ad(x) = Enzyme.autodiff(Forward, fn, BatchDuplicated(x, Enzyme.on @test res[1][4] ≈ res_enz[1][4] end +@testset "make_zero!" begin + x = Reactant.to_rarray([3.1]) + @jit Enzyme.make_zero!(x) + + @test @allowscalar x[1] ≈ 0.0 +end + function simple_forward(x, st) rng = copy(st.rng) y = similar(x) From 9986ac4a2d30c4e5db0b4795cdebd04eb2514828 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 11 Aug 2025 10:12:58 -0700 Subject: [PATCH 07/14] try moving more stdlib --- deps/ReactantExtra/BUILD | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/deps/ReactantExtra/BUILD b/deps/ReactantExtra/BUILD index 936b69fecb..358a63439c 100644 --- a/deps/ReactantExtra/BUILD +++ b/deps/ReactantExtra/BUILD @@ -64,6 +64,7 @@ cc_toolchain_config( abi_version = "local", builtin_sysroot = "/opt/x86_64-linux-musl/bin/../x86_64-linux-musl/sys-root", compile_flags = [ + "-stdlib=libstdc++", ], compiler = "clang", coverage_compile_flags = ["--coverage"], @@ -105,7 +106,6 @@ cc_toolchain_config( "-DNDEBUG", "-ffunction-sections", "-fdata-sections", - "-stdlib=libstdc++", ], opt_link_flags = ["-Wl,--gc-sections"], supports_start_end_lib = True, @@ -452,7 +452,6 @@ cc_toolchain_config( ], dbg_compile_flags = [ "-g", - "-stdlib=libc++", ], host_system_name = "linux", link_flags = [ @@ -470,7 +469,6 @@ cc_toolchain_config( "-DNDEBUG", "-ffunction-sections", "-fdata-sections", - "-stdlib=libc++", ], opt_link_flags = ["-Wl,--gc-sections"], supports_start_end_lib = True, @@ -695,7 +693,6 @@ cc_toolchain_config( ], dbg_compile_flags = [ "-g", - "-stdlib=libstdc++", ], host_system_name = "linux", link_flags = [ @@ -713,7 +710,6 @@ cc_toolchain_config( "-DNDEBUG", "-ffunction-sections", "-fdata-sections", - "-stdlib=libstdc++", ], opt_link_flags = ["-Wl,--gc-sections"], supports_start_end_lib = False, From dda5a4455c7f0d69940d299dbaf585d10821df48 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 11 Aug 2025 10:28:39 -0700 Subject: [PATCH 08/14] more libs --- deps/ReactantExtra/BUILD | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/deps/ReactantExtra/BUILD b/deps/ReactantExtra/BUILD index 358a63439c..a04c9f587f 100644 --- a/deps/ReactantExtra/BUILD +++ b/deps/ReactantExtra/BUILD @@ -94,6 +94,7 @@ cc_toolchain_config( #"--ld-path=/opt/x86_64-linux-musl/bin/ld.lld", "--ld-path=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ld.lld", "-stdlib=libstdc++", + "-static-libstdc++", ], link_libs = [ "-lstdc++", @@ -188,6 +189,7 @@ cc_toolchain_config( "-isystem /opt/BB_TARGET/BB_TARGET/include/c++/GCC_VERSION/BB_TARGET", "-isystem /opt/BB_TARGET/BB_TARGET/include/c++/GCC_VERSION/backward", "-isystem /opt/BB_TARGET/BB_TARGET/include/c++/GCC_VERSION/parallel", + "-stdlib=libstdc++", ], compiler = "compiler", coverage_compile_flags = ["--coverage"], @@ -209,7 +211,10 @@ cc_toolchain_config( ], dbg_compile_flags = ["-g"], host_system_name = "linux", - link_flags = [], + link_flags = [ + "-stdlib=libstdc++", + "-static-libstdc++", + ], link_libs = [ "-lstdc++", "-lm", @@ -221,7 +226,6 @@ cc_toolchain_config( "-DNDEBUG", "-ffunction-sections", "-fdata-sections", - # "-stdlib=libstdc++", ], opt_link_flags = ["-Wl,--gc-sections"], # TODO gcc doesn't support it, only put it on clang (maybe even only for clang on aarch64-darwin?) @@ -349,7 +353,6 @@ cc_toolchain_config( "-DNDEBUG", "-ffunction-sections", "-fdata-sections", - # "-stdlib=libstdc++", ], opt_link_flags = ["-Wl,--gc-sections"], # TODO gcc doesn't support it, only put it on clang (maybe even only for clang on aarch64-darwin?) @@ -777,6 +780,7 @@ cc_toolchain_config( abi_version = "local", compile_flags = [ "-I/usr/include/c++/11", + "-stdlib=libstdc++", ], compiler = "clang", coverage_compile_flags = ["--coverage"], @@ -813,7 +817,6 @@ cc_toolchain_config( "-DNDEBUG", "-ffunction-sections", "-fdata-sections", - "-stdlib=libstdc++", "-I/usr/include/c++/11", ], opt_link_flags = ["-Wl,--gc-sections"], From 9ffbe102d6548bbdee43808a79905bce509b2e66 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 11 Aug 2025 17:14:34 -0500 Subject: [PATCH 09/14] Force tmpdir --- deps/ReactantExtra/WORKSPACE | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deps/ReactantExtra/WORKSPACE b/deps/ReactantExtra/WORKSPACE index f235a997f3..054f4192c7 100644 --- a/deps/ReactantExtra/WORKSPACE +++ b/deps/ReactantExtra/WORKSPACE @@ -38,6 +38,9 @@ CUPTI_NEW = [] NEW_XLA_PATCHES = CUPTI_NEW + [ """ +sed -i.bak0 "s/def main():/def main():\\n if TMPDIR: os.environ['TMPDIR'] = TMPDIR/g" third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl +""", + """ sed -i.bak0 "s/__chkstk/__chkstk_ms/g" xla/service/cpu/runtime_symbol_generator.cc """, """ From 3af6b59bc42d571d1789848ca88d92ffa30027a6 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 11 Aug 2025 18:28:55 -0500 Subject: [PATCH 10/14] proto patch --- deps/ReactantExtra/WORKSPACE | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/deps/ReactantExtra/WORKSPACE b/deps/ReactantExtra/WORKSPACE index 054f4192c7..87b364df19 100644 --- a/deps/ReactantExtra/WORKSPACE +++ b/deps/ReactantExtra/WORKSPACE @@ -38,6 +38,29 @@ CUPTI_NEW = [] NEW_XLA_PATCHES = CUPTI_NEW + [ """ +echo "--- a/src/google/protobuf/stubs/port.h" >> third_party/proto.patch +echo "+++ b/src/google/protobuf/stubs/port.h" >> third_party/proto.patch +echo "@@ -27,7 +27,7 @@" >> third_party/proto.patch +echo " #include " >> third_party/proto.patch +echo " #elif defined(__APPLE__)" >> third_party/proto.patch +echo " #include " >> third_party/proto.patch +echo "-#elif defined(__linux__) || defined(__ANDROID__) || defined(__CYGWIN__)" >> third_party/proto.patch +echo "+#elif !defined(__NVCC__) && (defined(__linux__) || defined(__ANDROID__) || defined(__CYGWIN__))" >> third_party/proto.patch +echo " #include // IWYU pragma: export" >> third_party/proto.patch +echo " #endif" >> third_party/proto.patch +echo "" >> third_party/proto.patch +echo "@@ -143,7 +143,7 @@" >> third_party/proto.patch +echo " #define bswap_32(x) OSSwapInt32(x)" >> third_party/proto.patch +echo " #define bswap_64(x) OSSwapInt64(x)" >> third_party/proto.patch +echo "" >> third_party/proto.patch +echo "-#elif !defined(__linux__) && !defined(__ANDROID__) && !defined(__CYGWIN__)" >> third_party/proto.patch +echo "+#elif defined(__NVCC__) || (!defined(__linux__) && !defined(__ANDROID__) && !defined(__CYGWIN__))" >> third_party/proto.patch +echo "" >> third_party/proto.patch +echo " #ifndef bswap_16" >> third_party/proto.patch +echo " static inline uint16_t bswap_16(uint16_t x) {" >> third_party/proto.patch +sed -i.bak0 "s/protobuf-6.31.1.patch\\"/protobuf-6.31.1.patch\\", \\":proto.patch\\"/g" workspace2.bzl +""", + """ sed -i.bak0 "s/def main():/def main():\\n if TMPDIR: os.environ['TMPDIR'] = TMPDIR/g" third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl """, """ From a616da6fa2a27e34a87b99518e42db406cb1b322 Mon Sep 17 00:00:00 2001 From: William Moses Date: Tue, 12 Aug 2025 02:05:29 -0700 Subject: [PATCH 11/14] Update Project.toml (#1546) --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 66da87a205..641a7b759a 100644 --- a/Project.toml +++ b/Project.toml @@ -97,7 +97,7 @@ PythonCall = "0.9.25" Random = "1.10" Random123 = "1.7" ReactantCore = "0.1.15" -Reactant_jll = "0.0.229" +Reactant_jll = "0.0.230" ScopedValues = "1.3.0" Scratch = "1.2" Sockets = "1.10" From 05aeff9397bb8b95ec55e6ceeb358c1b24e6dc32 Mon Sep 17 00:00:00 2001 From: William Moses Date: Tue, 12 Aug 2025 10:25:13 -0700 Subject: [PATCH 12/14] JLL: fix no nan (#1547) --- src/Compiler.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Compiler.jl b/src/Compiler.jl index 56c5b413dd..2dce2dac1b 100644 --- a/src/Compiler.jl +++ b/src/Compiler.jl @@ -1147,8 +1147,8 @@ function optimization_passes( append!( transform_passes_list, [ - "no_nan", - "no_nan_self_sub_simplify", + "no_nan_compare_simplify(1)", + "no_nan_self_sub_simplify(1)", "no_nan_add_sub_simplify(1)", "no_nan_mul_simplify(1)", "no_nan_div_simplify(1)", @@ -1158,6 +1158,8 @@ function optimization_passes( append!( transform_passes_list, [ + "no_nan_compare_simplify(0)", + "no_nan_self_sub_simplify(0)", "no_nan_add_sub_simplify(0)", "no_nan_mul_simplify(0)", "no_nan_div_simplify(0)", From 8b69d6a96c0cbddc94785a2c9dcc61db6aeefb07 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Tue, 12 Aug 2025 13:40:41 -0700 Subject: [PATCH 13/14] rocm --- deps/ReactantExtra/.bazelrc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/deps/ReactantExtra/.bazelrc b/deps/ReactantExtra/.bazelrc index 1b442a68c4..9a711d0aa5 100644 --- a/deps/ReactantExtra/.bazelrc +++ b/deps/ReactantExtra/.bazelrc @@ -44,8 +44,16 @@ build:cuda --@local_config_cuda//:cuda_compiler=nvcc # build:cuda --@local_config_nvshmem//:override_include_nvshmem_libs=true # build:cuda --@local_config_nvshmem//cuda:include_nvshmem_libs=true -build:rocm --repo_env TF_NEED_ROCM=1 -build:rocm --define=using_rocm=true -build:rocm --define=using_rocm_hipcc=true -build:rocm --action_env TF_ROCM_AMDGPU_TARGETS="gfx900,gfx906,gfx908,gfx90a,gfx1030" +build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain +build:rocm --define=using_rocm=true --define=using_rocm_hipcc=true +build:rocm --repo_env TF_NEED_ROCM=1 +build:rocm --action_env TF_ROCM_AMDGPU_TARGETS="gfx900,gfx906,gfx908,gfx90a,gfx940,gfx941,gfx942,gfx1030,gfx1100,gfx1200,gfx1201" + +# Build with hipcc for ROCm and clang for the host. +build:rocm --config=rocm_base +build:rocm --action_env=TF_ROCM_CLANG="1" +build:rocm --action_env=CLANG_COMPILER_PATH="/usr/lib/llvm-18/bin/clang" +build:rocm --copt=-Wno-gnu-offsetof-extensions +build:rocm --copt=-Qunused-arguments +build:rocm --action_env=TF_HIPCC_CLANG="1" From d0b647196184018b54a5d1476d0d293d459d4600 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Tue, 12 Aug 2025 14:20:31 -0700 Subject: [PATCH 14/14] fix rocm --- deps/ReactantExtra/.bazelrc | 1 - 1 file changed, 1 deletion(-) diff --git a/deps/ReactantExtra/.bazelrc b/deps/ReactantExtra/.bazelrc index 9a711d0aa5..be37689e71 100644 --- a/deps/ReactantExtra/.bazelrc +++ b/deps/ReactantExtra/.bazelrc @@ -51,7 +51,6 @@ build:rocm --repo_env TF_NEED_ROCM=1 build:rocm --action_env TF_ROCM_AMDGPU_TARGETS="gfx900,gfx906,gfx908,gfx90a,gfx940,gfx941,gfx942,gfx1030,gfx1100,gfx1200,gfx1201" # Build with hipcc for ROCm and clang for the host. -build:rocm --config=rocm_base build:rocm --action_env=TF_ROCM_CLANG="1" build:rocm --action_env=CLANG_COMPILER_PATH="/usr/lib/llvm-18/bin/clang" build:rocm --copt=-Wno-gnu-offsetof-extensions