aboutsummaryrefslogtreecommitdiffhomepage
path: root/notcuda/src/impl/module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'notcuda/src/impl/module.rs')
-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?)
}
}