aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda/src/impl/module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zluda/src/impl/module.rs')
-rw-r--r--zluda/src/impl/module.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/zluda/src/impl/module.rs b/zluda/src/impl/module.rs
index f2a453e..f6522f8 100644
--- a/zluda/src/impl/module.rs
+++ b/zluda/src/impl/module.rs
@@ -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))