From 7a6df9dcbf59edef371e7f63c16c64916ddb0c0b Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Mon, 2 Dec 2024 00:29:57 +0100 Subject: Fix host code and update to CUDA 12.4 (#299) --- zluda_dump/src/dark_api.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'zluda_dump/src/dark_api.rs') diff --git a/zluda_dump/src/dark_api.rs b/zluda_dump/src/dark_api.rs index 8b1cd79..623f96f 100644 --- a/zluda_dump/src/dark_api.rs +++ b/zluda_dump/src/dark_api.rs @@ -28,6 +28,7 @@ impl Hash for CUuuidWrapper { } } +#[allow(improper_ctypes_definitions)] pub(crate) struct OriginalExports { original_get_module_from_cubin: Option< unsafe extern "system" fn( @@ -356,6 +357,7 @@ unsafe fn record_submodules_from_fatbin( ); } +#[allow(improper_ctypes_definitions)] unsafe extern "system" fn get_module_from_cubin( module: *mut CUmodule, fatbinc_wrapper: *const FatbincWrapper, @@ -388,6 +390,7 @@ unsafe extern "system" fn get_module_from_cubin( ) } +#[allow(improper_ctypes_definitions)] unsafe extern "system" fn get_module_from_cubin_ext1( module: *mut CUmodule, fatbinc_wrapper: *const FatbincWrapper, @@ -451,6 +454,7 @@ unsafe extern "system" fn get_module_from_cubin_ext1( ) } +#[allow(improper_ctypes_definitions)] unsafe extern "system" fn get_module_from_cubin_ext2( fatbin_header: *const FatbinHeader, module: *mut CUmodule, @@ -508,7 +512,7 @@ unsafe extern "system" fn get_module_from_cubin_ext2( .original_get_module_from_cubin_ext2 .unwrap()(fatbin_header, module, ptr1, ptr2, _unknown); fn_logger.result = Some(result); - if result != CUresult::CUDA_SUCCESS { + if result.is_err() { return result; } record_submodules_from_fatbin( -- cgit v1.2.3