mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-07-17 17:26:24 +03:00
Handle xnack suffix in device name
This commit is contained in:
@ -116,13 +116,18 @@ impl SpirvModule {
|
|||||||
path.push(x);
|
path.push(x);
|
||||||
path
|
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);
|
let mut additional_path = PathBuf::from(Self::AMDGPU);
|
||||||
additional_path.push("amdgcn");
|
additional_path.push("amdgcn");
|
||||||
additional_path.push("bitcode");
|
additional_path.push("bitcode");
|
||||||
additional_path.push(format!(
|
additional_path.push(format!(
|
||||||
"{}{}{}",
|
"{}{}{}",
|
||||||
Self::AMDGPU_BITCODE_DEVICE_PREFIX,
|
Self::AMDGPU_BITCODE_DEVICE_PREFIX,
|
||||||
&device_name[3..],
|
&device_name[3..suffix],
|
||||||
".bc"
|
".bc"
|
||||||
));
|
));
|
||||||
generic_paths.chain(std::iter::once(additional_path))
|
generic_paths.chain(std::iter::once(additional_path))
|
||||||
|
Reference in New Issue
Block a user