aboutsummaryrefslogtreecommitdiffhomepage
path: root/level_zero/src/ze.rs
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-02-28 00:46:50 +0100
committerAndrzej Janik <[email protected]>2021-02-28 00:46:50 +0100
commitb7ee6d66c3cfac9922addc6c362ae437cfa8fee5 (patch)
tree9666c7d357e1d15ed9c516a673074fd64d4abfc3 /level_zero/src/ze.rs
parent871b8d1befab63a1cd7f25a9bb26c9ecaebb1cd1 (diff)
downloadZLUDA-b7ee6d66c3cfac9922addc6c362ae437cfa8fee5.tar.gz
ZLUDA-b7ee6d66c3cfac9922addc6c362ae437cfa8fee5.zip
Implement enough nvml to make GeekBench happy
Diffstat (limited to 'level_zero/src/ze.rs')
-rw-r--r--level_zero/src/ze.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/level_zero/src/ze.rs b/level_zero/src/ze.rs
index ce675eb..d2b1115 100644
--- a/level_zero/src/ze.rs
+++ b/level_zero/src/ze.rs
@@ -81,6 +81,12 @@ impl Driver {
}
Ok(result)
}
+
+ pub fn get_properties(&self) -> Result<sys::ze_driver_properties_t> {
+ let mut result = unsafe { mem::zeroed::<sys::ze_driver_properties_t>() };
+ check!(sys::zeDriverGetProperties(self.0, &mut result));
+ Ok(result)
+ }
}
#[repr(transparent)]
@@ -359,7 +365,11 @@ impl Module {
Module::new_logged(ctx, true, d, bin, opts)
}
- pub fn build_native_logged(ctx: &mut Context, d: &Device, bin: &[u8]) -> (Result<Self>, BuildLog) {
+ pub fn build_native_logged(
+ ctx: &mut Context,
+ d: &Device,
+ bin: &[u8],
+ ) -> (Result<Self>, BuildLog) {
Module::new_logged(ctx, false, d, bin, None)
}