flopscope.accounting.tensorinv_cost
flopscope.accounting.tensorinv_cost(a_shape, ind=2)[flopscope source]
Weighted FLOP cost of tensor inverse.
Parameters
- a_shape:tuple
Argument forwarded to the analytical linalg.tensorinv cost formula.
- ind:int, optional
Argument forwarded to the analytical linalg.tensorinv cost formula. Defaults to
2.
Returns
- :int
Weighted public cost estimate, floored to match runtime accounting.
Notes
This helper multiplies the analytical FLOP count by the active weight from flopscope._weights and then applies int(...) so public estimates match budget deductions.
Reduces to a standard matrix inverse after reshaping.