rocmPackages.rocm-comgr: fix failure to find code object when xnack any variant should match

Fixes No compatible code objects found for: gfx90a:sramecc+:xnack- in /nix/store/klazf7j7i5642cyjwi125fx4fdwx82f3-python3.13-torch-2.10.0-lib/lib/libtorch_hip.so, value of HIP_FORCE_SPIRV_CODEOBJECT: 0. Available code objects: [amdgcn-amd-amdhsa--gfx90a]
Failed to load fat binary for function '_ZN2at6native29vectorized_elementwise_kernelILi4ENS0_11FillFunctorIiEESt5arrayIPcLm1EEEEviT0_T1_' (error 200)
This commit is contained in:
Luna Nova
2026-03-07 19:57:44 -08:00
parent 2aa14c076a
commit 4448efbdd7
2 changed files with 14 additions and 0 deletions

View File

@@ -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 = ''

View File

@@ -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);