aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-08-08 02:35:17 +0200
committerAndrzej Janik <[email protected]>2021-08-08 02:35:17 +0200
commit5969e59aae85b60657257795af0fcfc5a6b5a017 (patch)
tree1b6f4fbbe6a2cf049052f28905bfd51402466ab9
parent4b4ba902192f5655eaa012eb7a2f985129ab8167 (diff)
downloadZLUDA-5969e59aae85b60657257795af0fcfc5a6b5a017.tar.gz
ZLUDA-5969e59aae85b60657257795af0fcfc5a6b5a017.zip
Explicitly mark input to AMD as bitcode
-rw-r--r--zluda/src/impl/module.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/zluda/src/impl/module.rs b/zluda/src/impl/module.rs
index c13f987..7fb075c 100644
--- a/zluda/src/impl/module.rs
+++ b/zluda/src/impl/module.rs
@@ -196,6 +196,8 @@ impl SpirvModule {
.arg(Self::AMDGPU_TARGET)
.arg("-o")
.arg(compiled_binary.path())
+ .arg("-x")
+ .arg("ir")
.arg(linked_binary.path());
if let Some((_, bitcode)) = ptx_lib {
ptx_lib_bitcode.write_all(bitcode)?;
@@ -211,6 +213,7 @@ impl SpirvModule {
let mut compiled_binary = File::open(compiled_bin_path)?;
compiled_binary.read_to_end(&mut result)?;
let mut persistent = PathBuf::from("/tmp/zluda");
+ std::fs::create_dir_all(&persistent)?;
persistent.push(compiled_bin_path.file_name().unwrap());
std::fs::copy(compiled_bin_path, persistent)?;
Ok(result)
@@ -300,6 +303,7 @@ impl SpirvModule {
assert_eq!(errcode_ret, 0, "clCreateProgramWithBinary");
unsafe { ocl_core::Program::from_raw_create_ptr(program) }
} else {
+ Self::compile_amd("gfx1011:xnack-", byte_il, self.should_link_ptx_impl).unwrap();
Self::compile_intel(
ctx,
dev,