pub struct CudaDevice<'a> {
pub info: CudaDeviceInfo,
/* private fields */
}Expand description
An open CUDA device and its context. Destroys the context on drop.
Fields§
§info: CudaDeviceInfoThe device’s static properties.
Implementations§
Source§impl<'a> CudaDevice<'a>
impl<'a> CudaDevice<'a>
Source§impl<'a> CudaDevice<'a>
impl<'a> CudaDevice<'a>
Sourcepub fn launch_with_packer<K: Kernel>(
&self,
program: &CudaProgram<'_, K>,
cfg: &CudaLaunchConfig,
packer: &mut CudaArgPacker,
) -> Result<()>
pub fn launch_with_packer<K: Kernel>( &self, program: &CudaProgram<'_, K>, cfg: &CudaLaunchConfig, packer: &mut CudaArgPacker, ) -> Result<()>
Launch a pre-loaded kernel using a dynamically-built arg list.
Use this instead of launch when the kernel type is erased (e.g. in
LoadedModel::forward) and arguments are packed by CudaArgPacker
via a RuntimeOp rather than a static Kernel::Args tuple.
Trait Implementations§
Source§impl<'a> Clone for CudaDevice<'a>
impl<'a> Clone for CudaDevice<'a>
Source§fn clone(&self) -> CudaDevice<'a>
fn clone(&self) -> CudaDevice<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for CudaDevice<'a>
impl<'a> Debug for CudaDevice<'a>
Source§impl<'a> Device<'a> for CudaDevice<'a>
impl<'a> Device<'a> for CudaDevice<'a>
Source§type Buffer<N: Num> = CudaBuffer<'a, N>
type Buffer<N: Num> = CudaBuffer<'a, N>
This device’s buffer type for elements of dtype
N.Source§type Program<K: Kernel> = CudaProgram<'a, K>
type Program<K: Kernel> = CudaProgram<'a, K>
This device’s compiled-program type for kernel
K.Source§type LaunchConfig = CudaLaunchConfig
type LaunchConfig = CudaLaunchConfig
This device’s launch configuration type.
Source§impl<'a> Drop for CudaDevice<'a>
impl<'a> Drop for CudaDevice<'a>
Auto Trait Implementations§
impl<'a> Freeze for CudaDevice<'a>
impl<'a> RefUnwindSafe for CudaDevice<'a>
impl<'a> !Send for CudaDevice<'a>
impl<'a> !Sync for CudaDevice<'a>
impl<'a> Unpin for CudaDevice<'a>
impl<'a> UnsafeUnpin for CudaDevice<'a>
impl<'a> UnwindSafe for CudaDevice<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more