Expand description
§Tensor Macros
This crate provides a set of macros to generate code for tensor operations. These macros are used to simplify and automate common tasks such as defining tensor operations, reducing dimensionality, and optimizing numerical computations.
§Examples
Here’s an example of using a macro from this crate:
// Example code using a macro from this crateMacros§
- conv2d_
microkernel_ declare_ const - declare const values
- conv2d_
microkernel_ gen_ inps - generate conv2d inps
- conv2d_
microkernel_ gen_ kernels - generate conv2d kernels
- conv2d_
microkernel_ gen_ pad_ inps - generate conv2d inps
- conv2d_
microkernel_ gen_ results - generate conv2d repeat results
- dwconv2d_
microkernel_ gen_ pad_ inps - generate conv2d inps
- dwconv2d_
microkernel_ gen_ results - generate conv2d repeat results
- float_
out_ binary - implement float out binary trait
- float_
out_ binary_ simd - implement simd float out binary trait
- float_
out_ binary_ simd_ with_ lhs_ scalar - implement simd float out binary trait with lhs scalar
- float_
out_ binary_ simd_ with_ rhs_ scalar - implement simd float out binary trait with rhs scalar
- float_
out_ unary - implement float out unary trait
- gen_
fast_ layernorm_ simd_ helper - generate fast layernorm simd helper
- gen_
fast_ reduce_ simd_ helper - generate fast reduce simd helper
- gen_
reduce_ dim_ not_ include_ simd_ helper - generate reduce dim not include simd helper
- impl_
bitwise_ out - implement bitwise out trait
- impl_
cmp - implement compare trait
- impl_
cmp_ cuda - implement compare trait
- impl_
cuda_ bitwise_ out - implement bitwise out trait
- impl_
eval - implement eval trait
- impl_
from_ scalar - implement from scalar trait
- impl_
into_ scalar - implment into scalar trait
- impl_
into_ vec - implment into vec trait
- impl_
normal_ out_ binary - generate notmal out trait
- impl_
normal_ out_ simd - implement simd normal out trait
- impl_
normal_ out_ simd_ with_ lhs_ scalar - implement simd normal out trait with lhs scalar
- impl_
normal_ out_ simd_ with_ rhs_ scalar - implement simd normal out trait with rhs scalar
- impl_
normal_ out_ unary - gemerate normal out unary trait
- impl_
normal_ out_ unary_ simd - gemerate normal out unary trait
- impl_
scalar_ convert - implement scalar convert trait
- maxpool2d_
microkernel_ gen_ results - generate maxpool2d kernels generate conv2d repeat results
- pwconv2d_
microkernel_ gen_ pad_ inps - generate pwconv2d inps
- select
- parse the input and generate the corresponding slice
- simd_
bitwise - implement simd bitwise trait
- simd_
cmp - implement simd cmp trait
- simd_
eval - implement simd eval trait
- simd_
float_ out_ unary - implement simd float out unary trait
Derive Macros§
- From
Safe Tensors - generate from safetensors trait
- Load
- generate load trait
- Save
- generate save trait