|
tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
|
Dot product operations — contraction primitives for einsum. More...
#include "config.h"#include "fused/microkernels/microkernel_base.h"#include "fused/kernel_ops/kernel_helpers.h"

Go to the source code of this file.
Classes | |
| struct | detail::KernelDot< T, Bits, Arch > |
Namespaces | |
| namespace | detail |
Dot product operations — contraction primitives for einsum.
All functions take PHYSICAL offsets and strides from the layout. The caller (einsum) computes these via Layout::stride() and Layout::logical_coords_to_physical_flat().
For C[i,j] = sum_k A[i,k] * B[k,j] with A[M,K] and B[K,N]:
A's fiber along k (last dim): base=A.stride(0)*i, stride=1 → contiguous B's fiber along k (first dim): base=j, stride=B.stride(0) → strided
Physical memory for A[2,3] padded to [2,4]: [a00 a01 a02 P | a10 a11 a12 P] ^^^^^^^^^^^ ^^^^^^^^^^^ fiber i=0 fiber i=1 → contiguous, len=3
Physical memory for B[3,2] padded to [3,4]: [b00 b01 P P | b10 b11 P P | b20 b21 P P] ^ ^ ^ fiber j=0, stride=4 → strided, len=3