Skip to main content

Module gpu

Module gpu 

Source
Expand description

GPU acceleration trait and threshold constant.

§Why these are defined here (not re-exported from tinyquant-gpu-wgpu)

tinyquant-gpu-wgpu depends on tinyquant-core, so adding tinyquant-gpu-wgpu as an optional dependency of tinyquant-core would create a Cargo cyclic dependency (which Cargo rejects unconditionally). Therefore GpuComputeBackend and GPU_BATCH_THRESHOLD are defined directly in tinyquant-core. Concrete implementations (WgpuBackend) live in tinyquant-gpu-wgpu and implement GpuComputeBackend.

Re-exports§

pub use crate::codec::service::GpuComputeBackend;
pub use crate::codec::service::GPU_BATCH_THRESHOLD;