mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-20 08:24:44 +00:00
Handle xnack suffix in device name
This commit is contained in:
parent
20c9aa4f02
commit
fefdd528d5
1 changed files with 6 additions and 1 deletions
|
@ -116,13 +116,18 @@ impl SpirvModule {
|
|||
path.push(x);
|
||||
path
|
||||
});
|
||||
let suffix = if let Some(suffix_idx) = device_name.find(':') {
|
||||
suffix_idx
|
||||
} else {
|
||||
device_name.len()
|
||||
};
|
||||
let mut additional_path = PathBuf::from(Self::AMDGPU);
|
||||
additional_path.push("amdgcn");
|
||||
additional_path.push("bitcode");
|
||||
additional_path.push(format!(
|
||||
"{}{}{}",
|
||||
Self::AMDGPU_BITCODE_DEVICE_PREFIX,
|
||||
&device_name[3..],
|
||||
&device_name[3..suffix],
|
||||
".bc"
|
||||
));
|
||||
generic_paths.chain(std::iter::once(additional_path))
|
||||
|
|
Loading…
Add table
Reference in a new issue