pub struct CudaKernelGenerator { /* private fields */ }Expand description
CUDA kernel generator
Generates PTX (Parallel Thread Execution) code for NVIDIA GPUs. Supports compute capabilities from 5.0 (Maxwell) to 9.0 (Hopper).
Implementations§
Source§impl CudaKernelGenerator
impl CudaKernelGenerator
Sourcepub fn new(compute_capability: (u32, u32)) -> Self
pub fn new(compute_capability: (u32, u32)) -> Self
Create a new CUDA kernel generator
§Arguments
compute_capability- GPU compute capability (e.g., (7, 5) for sm_75)
Sourcepub fn set_tensor_cores(&mut self, enable: bool)
pub fn set_tensor_cores(&mut self, enable: bool)
Enable or disable tensor core usage
Sourcepub fn generate_ptx(&self, graph: &ComputationGraph) -> JitResult<String>
pub fn generate_ptx(&self, graph: &ComputationGraph) -> JitResult<String>
Generate PTX assembly code for the computation graph
Future implementation will:
- Analyze graph for optimal thread block configuration
- Generate fused kernels for element-wise operation chains
- Emit specialized tensor core instructions (WMMA) for matrix ops
- Apply memory coalescing patterns
- Generate multi-kernel launches for large graphs
Sourcepub fn estimate_launch_config(
&self,
graph: &ComputationGraph,
) -> LaunchConfiguration
pub fn estimate_launch_config( &self, graph: &ComputationGraph, ) -> LaunchConfiguration
Estimate kernel launch configuration for a graph
Auto Trait Implementations§
impl Freeze for CudaKernelGenerator
impl RefUnwindSafe for CudaKernelGenerator
impl Send for CudaKernelGenerator
impl Sync for CudaKernelGenerator
impl Unpin for CudaKernelGenerator
impl UnsafeUnpin for CudaKernelGenerator
impl UnwindSafe for CudaKernelGenerator
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more