pub struct TensorCoreQuantizationOps { /* private fields */ }Expand description
Tensor Core quantization operations for modern NVIDIA GPUs
Tensor Cores provide specialized acceleration for mixed-precision and quantized matrix operations on modern NVIDIA GPUs (Volta, Turing, Ampere, etc.). These operations can achieve significantly higher throughput than standard CUDA cores.
Implementations§
Source§impl TensorCoreQuantizationOps
impl TensorCoreQuantizationOps
Sourcepub fn new(device: Device) -> Self
pub fn new(device: Device) -> Self
Create new Tensor Core quantization operations
Detects Tensor Core availability and supported formats based on the GPU architecture and capabilities.
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Check if Tensor Cores are available
Sourcepub fn supported_formats(&self) -> &[TensorCoreFormat]
pub fn supported_formats(&self) -> &[TensorCoreFormat]
Get supported quantization formats
Sourcepub fn tensor_core_qmatmul_int8(
&self,
a: &QuantizedTensor,
b: &QuantizedTensor,
) -> BackendResult<QuantizedTensor>
pub fn tensor_core_qmatmul_int8( &self, a: &QuantizedTensor, b: &QuantizedTensor, ) -> BackendResult<QuantizedTensor>
Tensor Core INT8 matrix multiplication
Uses Tensor Cores for high-performance INT8 matrix multiplication. This can achieve much higher throughput than standard CUDA cores for appropriately sized matrices.
Sourcepub fn tensor_core_qmatmul_int4(
&self,
a: &QuantizedTensor,
b: &QuantizedTensor,
) -> BackendResult<QuantizedTensor>
pub fn tensor_core_qmatmul_int4( &self, a: &QuantizedTensor, b: &QuantizedTensor, ) -> BackendResult<QuantizedTensor>
Tensor Core INT4 matrix multiplication
Specialized operation for INT4 quantized models using Tensor Cores, providing even higher throughput at the cost of precision.
Sourcepub fn optimal_matrix_size(&self) -> (usize, usize, usize)
pub fn optimal_matrix_size(&self) -> (usize, usize, usize)
Get optimal matrix size for Tensor Core operations
Trait Implementations§
Source§impl Clone for TensorCoreQuantizationOps
impl Clone for TensorCoreQuantizationOps
Source§impl Debug for TensorCoreQuantizationOps
impl Debug for TensorCoreQuantizationOps
Source§impl SpecializedQuantizationOps for TensorCoreQuantizationOps
impl SpecializedQuantizationOps for TensorCoreQuantizationOps
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Source§fn optimal_block_size(&self) -> usize
fn optimal_block_size(&self) -> usize
Source§fn specialized_qmatmul(
&self,
a: &QuantizedTensor,
b: &QuantizedTensor,
) -> BackendResult<QuantizedTensor>
fn specialized_qmatmul( &self, a: &QuantizedTensor, b: &QuantizedTensor, ) -> BackendResult<QuantizedTensor>
Auto Trait Implementations§
impl Freeze for TensorCoreQuantizationOps
impl RefUnwindSafe for TensorCoreQuantizationOps
impl Send for TensorCoreQuantizationOps
impl Sync for TensorCoreQuantizationOps
impl Unpin for TensorCoreQuantizationOps
impl UnsafeUnpin for TensorCoreQuantizationOps
impl UnwindSafe for TensorCoreQuantizationOps
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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