Use implicit FromCuda for library::get_module (#439)
Some checks are pending
ZLUDA / Build (Linux) (push) Waiting to run
ZLUDA / Build (Windows) (push) Waiting to run
ZLUDA / Build AMD GPU unit tests (push) Waiting to run
ZLUDA / Run AMD GPU unit tests (push) Blocked by required conditions

This commit is contained in:
Violet 2025-07-28 06:42:14 -07:00 committed by GitHub
commit f192dd317a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
use super::{module, ZludaObject, FromCuda};
use super::{module, ZludaObject};
use cuda_types::cuda::*;
use hip_runtime_sys::*;
@ -40,9 +40,8 @@ pub(crate) unsafe fn unload(library: CUlibrary) -> CUresult {
pub(crate) unsafe fn get_module(
out: &mut CUmodule,
library: CUlibrary,
library: &Library,
) -> CUresult {
let lib: &Library = FromCuda::from_cuda(&library)?;
*out = module::Module{base: lib.base}.wrap();
*out = module::Module{base: library.base}.wrap();
Ok(())
}