aboutsummaryrefslogtreecommitdiffhomepage
path: root/notcuda
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2020-11-21 00:27:37 +0100
committerAndrzej Janik <[email protected]>2020-11-21 00:27:37 +0100
commit84ac086146b710ed87de20c136b197fe204b2742 (patch)
tree31f5ec36771e91fe44f5a8e397a8b4198a95f990 /notcuda
parent70dc2983818e748dbd3ad04f049a9297873f7909 (diff)
downloadZLUDA-84ac086146b710ed87de20c136b197fe204b2742.tar.gz
ZLUDA-84ac086146b710ed87de20c136b197fe204b2742.zip
Fix problems with linking
Diffstat (limited to 'notcuda')
-rw-r--r--notcuda/src/impl/module.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/notcuda/src/impl/module.rs b/notcuda/src/impl/module.rs
index fa46bf4..cba030e 100644
--- a/notcuda/src/impl/module.rs
+++ b/notcuda/src/impl/module.rs
@@ -83,8 +83,21 @@ impl SpirvModule {
self.binaries.len() * mem::size_of::<u32>(),
)
};
- let l0_module = l0::Module::build_spirv(ctx, dev, byte_il, None).0?;
- Ok(l0_module)
+ let l0_module = match self.should_link_ptx_impl {
+ None => {
+ l0::Module::build_spirv(ctx, dev, byte_il, Some(self.build_options.as_c_str())).0
+ }
+ Some(ptx_impl) => {
+ l0::Module::build_link_spirv(
+ ctx,
+ &dev,
+ &[ptx_impl, byte_il],
+ Some(self.build_options.as_c_str()),
+ )
+ .0
+ }
+ };
+ Ok(l0_module?)
}
}