pub struct ElementwiseKernel {
pub params: ElementwiseParams,
pub kind: ActivationKind,
/* private fields */
}Expand description
Elementwise activation kernel handle
Fields§
§params: ElementwiseParams§kind: ActivationKindImplementations§
Source§impl ElementwiseKernel
impl ElementwiseKernel
pub fn new(kind: ActivationKind) -> Self
pub fn with_vendor(kind: ActivationKind, vendor: VendorBackend) -> Self
pub fn with_params(self, params: ElementwiseParams) -> Self
pub fn with_config(self, config: KernelConfig) -> Self
Trait Implementations§
Source§impl PrimitiveKernel for ElementwiseKernel
impl PrimitiveKernel for ElementwiseKernel
fn name(&self) -> &str
fn supported_dtypes(&self) -> &[DType]
fn can_execute(&self, inputs: &[&GpuBuffer<f32>]) -> bool
fn default_config(&self) -> KernelConfig
fn execute( &self, inputs: &[&GpuBuffer<f32>], _output: &mut GpuBuffer<f32>, _config: &KernelConfig, ) -> TptpResult<KernelResult>
fn execute_with_vendor( &self, inputs: &[&GpuBuffer<f32>], output: &mut GpuBuffer<f32>, _vendor: &VendorBackend, config: &KernelConfig, ) -> TptpResult<KernelResult>
Auto Trait Implementations§
impl Freeze for ElementwiseKernel
impl RefUnwindSafe for ElementwiseKernel
impl Send for ElementwiseKernel
impl Sync for ElementwiseKernel
impl Unpin for ElementwiseKernel
impl UnsafeUnpin for ElementwiseKernel
impl UnwindSafe for ElementwiseKernel
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