mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-10-02 22:29:18 +00:00
Fix loading problems
This commit is contained in:
parent
92b7316a87
commit
93d82bc922
2 changed files with 10 additions and 3 deletions
7
ext/rocm_smi-sys/build.rs
vendored
Normal file
7
ext/rocm_smi-sys/build.rs
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
use std::env::VarError;
|
||||||
|
|
||||||
|
fn main() -> Result<(), VarError> {
|
||||||
|
println!("cargo:rustc-link-lib=dylib=rocm_smi64");
|
||||||
|
println!("cargo:rustc-link-search=native=/opt/rocm/lib/");
|
||||||
|
Ok(())
|
||||||
|
}
|
|
@ -362,8 +362,8 @@ fn get_device_hash_info() -> Result<Vec<::dark_api::DeviceHashinfo>, CUerror> {
|
||||||
|
|
||||||
(0..device_count)
|
(0..device_count)
|
||||||
.map(|dev| {
|
.map(|dev| {
|
||||||
let mut guid = CUuuid_st { bytes: [0; 16] };
|
let mut guid = unsafe { mem::zeroed() };
|
||||||
unsafe { crate::cuDeviceGetUuid(&mut guid, dev)? };
|
device::get_uuid_v2(&mut guid, dev)?;
|
||||||
|
|
||||||
let mut pci_domain = 0;
|
let mut pci_domain = 0;
|
||||||
device::get_attribute(
|
device::get_attribute(
|
||||||
|
@ -387,7 +387,7 @@ fn get_device_hash_info() -> Result<Vec<::dark_api::DeviceHashinfo>, CUerror> {
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(::dark_api::DeviceHashinfo {
|
Ok(::dark_api::DeviceHashinfo {
|
||||||
guid,
|
guid: unsafe { mem::transmute(guid) },
|
||||||
pci_domain,
|
pci_domain,
|
||||||
pci_bus,
|
pci_bus,
|
||||||
pci_device,
|
pci_device,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue