From 74858c19390d4d5be7a14654bdc9a9daae8a397b Mon Sep 17 00:00:00 2001 From: Martin Schwaighofer Date: Tue, 28 Jan 2025 20:18:59 +0100 Subject: [PATCH] rocmPackages.tensile: use unwrapped cc as assembler Tensile calls rocm clang with parameters such as "-x assembler -target amdgcn-amd-amdhsa". Using a wrapped compiler with "-target" leads to warnings introduced in fc590fdd053b8eee03385d4cff4d71ead4c71547. Co-authored-by: Mauricio Collares --- pkgs/development/rocm-modules/6/tensile/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/rocm-modules/6/tensile/default.nix b/pkgs/development/rocm-modules/6/tensile/default.nix index 0a1f4d60ea5e..e2a892b34308 100644 --- a/pkgs/development/rocm-modules/6/tensile/default.nix +++ b/pkgs/development/rocm-modules/6/tensile/default.nix @@ -13,6 +13,7 @@ joblib, filelock, rocminfo, + writeText, }: buildPythonPackage rec { @@ -61,6 +62,12 @@ buildPythonPackage rec { ROCM_PATH = rocminfo; }; + # TODO: remove this workaround once https://github.com/NixOS/nixpkgs/pull/323869 + # does not cause issues anymore, or at least replace it with a better workaround + setupHook = writeText "setup-hook" '' + export TENSILE_ROCM_ASSEMBLER_PATH="${stdenv.cc.cc}/bin/clang++"; + ''; + pythonImportsCheck = [ "Tensile" ]; passthru.updateScript = rocmUpdateScript {