diff --git a/pkgs/development/rocm-modules/rocm-comgr/default.nix b/pkgs/development/rocm-modules/rocm-comgr/default.nix index 4e1d5432a178..0a49cb0a24fa 100644 --- a/pkgs/development/rocm-modules/rocm-comgr/default.nix +++ b/pkgs/development/rocm-modules/rocm-comgr/default.nix @@ -40,6 +40,9 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/GZGavinZhao/rocm-llvm-project/commit/2c1e44fc3eacadcafdd4ada3e3184a092b6f26c5.patch"; relative = "amd/comgr"; }) + # Fix: CCOB compat patch used coerced (featureless) name for output filename, + # causing CLR's code_obj_map key to miss when looking up device ISA with features + ./fix-ccob-compat-output-filename.patch ]; postPatch = '' diff --git a/pkgs/development/rocm-modules/rocm-comgr/fix-ccob-compat-output-filename.patch b/pkgs/development/rocm-modules/rocm-comgr/fix-ccob-compat-output-filename.patch new file mode 100644 index 000000000000..813f419ef3a9 --- /dev/null +++ b/pkgs/development/rocm-modules/rocm-comgr/fix-ccob-compat-output-filename.patch @@ -0,0 +1,11 @@ +--- a/src/comgr-compiler.cpp ++++ b/src/comgr-compiler.cpp +@@ -1425,7 +1425,7 @@ + // Add an output file for each target + SmallString<128> OutputFilePath = OutputDir; + sys::path::append(OutputFilePath, +- OutputPrefix + "-" + CompatEntry + "." + FileExtension); ++ OutputPrefix + "-" + Entry + "." + FileExtension); + + BundlerConfig.TargetNames.emplace_back(CompatEntry); + BundlerConfig.OutputFileNames.emplace_back(OutputFilePath);