mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-17 07:50:18 +00:00
Implement cuModuleGetLoadingMode (#381)
This commit is contained in:
parent
25a9d1c40e
commit
1715830d82
3 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
||||||
use cuda_types::cuda::*;
|
use cuda_types::cuda::*;
|
||||||
use hip_runtime_sys::*;
|
use hip_runtime_sys::*;
|
||||||
use std::{ffi::CStr, mem::{self, ManuallyDrop, MaybeUninit}, ptr};
|
use std::{
|
||||||
|
ffi::CStr,
|
||||||
|
mem::{self, ManuallyDrop, MaybeUninit},
|
||||||
|
ptr,
|
||||||
|
};
|
||||||
|
|
||||||
pub(super) mod context;
|
pub(super) mod context;
|
||||||
pub(super) mod device;
|
pub(super) mod device;
|
||||||
|
@ -131,6 +135,7 @@ from_cuda_nop!(
|
||||||
cuda_types::cuda::CUdevprop,
|
cuda_types::cuda::CUdevprop,
|
||||||
CUdevice_attribute,
|
CUdevice_attribute,
|
||||||
CUdriverProcAddressQueryResult,
|
CUdriverProcAddressQueryResult,
|
||||||
|
CUmoduleLoadingMode,
|
||||||
CUuuid
|
CUuuid
|
||||||
);
|
);
|
||||||
from_cuda_transmute!(
|
from_cuda_transmute!(
|
||||||
|
|
|
@ -53,3 +53,8 @@ pub(crate) fn get_function(
|
||||||
) -> hipError_t {
|
) -> hipError_t {
|
||||||
unsafe { hipModuleGetFunction(hfunc, hmod.base, name) }
|
unsafe { hipModuleGetFunction(hfunc, hmod.base, name) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn get_loading_mode(mode: &mut cuda_types::cuda::CUmoduleLoadingMode) -> CUresult {
|
||||||
|
*mode = cuda_types::cuda::CUmoduleLoadingMode::CU_MODULE_EAGER_LOADING;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
|
@ -75,6 +75,7 @@ cuda_base::cuda_function_declarations!(
|
||||||
cuMemsetD32_v2,
|
cuMemsetD32_v2,
|
||||||
cuMemsetD8_v2,
|
cuMemsetD8_v2,
|
||||||
cuModuleGetFunction,
|
cuModuleGetFunction,
|
||||||
|
cuModuleGetLoadingMode,
|
||||||
cuModuleLoadData,
|
cuModuleLoadData,
|
||||||
cuModuleUnload,
|
cuModuleUnload,
|
||||||
cuPointerGetAttribute,
|
cuPointerGetAttribute,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue