diff options
author | Andrzej Janik <[email protected]> | 2021-08-08 02:35:17 +0200 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2021-08-08 02:35:17 +0200 |
commit | 5969e59aae85b60657257795af0fcfc5a6b5a017 (patch) | |
tree | 1b6f4fbbe6a2cf049052f28905bfd51402466ab9 | |
parent | 4b4ba902192f5655eaa012eb7a2f985129ab8167 (diff) | |
download | ZLUDA-5969e59aae85b60657257795af0fcfc5a6b5a017.tar.gz ZLUDA-5969e59aae85b60657257795af0fcfc5a6b5a017.zip |
Explicitly mark input to AMD as bitcode
-rw-r--r-- | zluda/src/impl/module.rs | 4 |
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, |