flopscope.

flopscope.accounting.tensorsolve_cost

flopscope.accounting.tensorsolve_cost(a_shape, ind=None)[flopscope source]

Weighted FLOP cost of tensor solve.

Parameters

a_shape:tuple

Argument forwarded to the analytical linalg.tensorsolve cost formula.

ind:int | None, optional

Argument forwarded to the analytical linalg.tensorsolve cost formula. Defaults to None.

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 linear solve after reshaping.