Documentation
¶
Rendered for darwin/amd64
Overview ¶
Package linear provides a cached linear (matrix multiply) operator backed by the Apple Neural Engine.
exec := linear.New(rt) defer exec.Close() y, err := exec.Linear(x, w, batch, inDim, outDim)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor manages a cache of ANE kernels for linear operations.
func (*Executor) Linear ¶
Linear computes y = x @ W^T using the ANE.
x has shape [batch, inDim] (row-major), w has shape [outDim, inDim] (row-major), and the result has shape [batch, outDim].
Click to show internal directories.
Click to hide internal directories.