Documentation
¶
Overview ¶
Package matmultest provides test helpers for verifying matrix multiplication packing and output routines.
Index ¶
- func RunApplyPackedOutputTests[T gotype.NumericNotComplex](t *testing.T, applyFn ApplyPackedOutputFn[T])
- func RunBenchmarkPackLHS[T gotype.ScalarNotComplex](b *testing.B, name string, packFn PackLHSFn[T], ...)
- func RunPackLHSTests[T gotype.NumericNotComplex](t *testing.T, packLHSFn PackLHSFn[T], lhsL1KernelRows int)
- func RunPackLHSTestsHalfPrecision[T gotype.HalfPrecision[T], P gotype.HalfPrecisionPtr[T]](t *testing.T, packLHSFn PackLHSFn[T], lhsL1KernelRows int)
- func RunPackRHSTests[T gotype.NumericNotComplex](t *testing.T, packRHSFn PackRHSFn[T], rhsL1KernelCols int)
- func RunPackRHSTestsHalfPrecision[T gotype.HalfPrecision[T], P gotype.HalfPrecisionPtr[T]](t *testing.T, packRHSFn PackRHSFn[T], rhsL1KernelCols int)
- type ApplyPackedOutputFn
- type PackLHSFn
- type PackRHSFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunApplyPackedOutputTests ¶
func RunApplyPackedOutputTests[T gotype.NumericNotComplex](t *testing.T, applyFn ApplyPackedOutputFn[T])
RunApplyPackedOutputTests verifies that applyFn matches the reference matmul.ApplyPackedOutput.
func RunBenchmarkPackLHS ¶
func RunBenchmarkPackLHS[T gotype.ScalarNotComplex](b *testing.B, name string, packFn PackLHSFn[T], totalRows, totalCols, panelRows, panelCols, kernelRows int)
RunBenchmarkPackLHS runs a benchmark for a packLHS function.
func RunPackLHSTests ¶
func RunPackLHSTests[T gotype.NumericNotComplex](t *testing.T, packLHSFn PackLHSFn[T], lhsL1KernelRows int)
RunPackLHSTests verifies that packLHSFn matches the reference matmul.PackLHS implementation.
func RunPackLHSTestsHalfPrecision ¶
func RunPackLHSTestsHalfPrecision[T gotype.HalfPrecision[T], P gotype.HalfPrecisionPtr[T]]( t *testing.T, packLHSFn PackLHSFn[T], lhsL1KernelRows int)
RunPackLHSTestsHalfPrecision verifies that packLHSFn matches the reference matmul.PackLHS for half-precision types.
func RunPackRHSTests ¶
func RunPackRHSTests[T gotype.NumericNotComplex](t *testing.T, packRHSFn PackRHSFn[T], rhsL1KernelCols int)
RunPackRHSTests verifies that packRHSFn matches the reference matmul.PackRHS implementation.
func RunPackRHSTestsHalfPrecision ¶
func RunPackRHSTestsHalfPrecision[T gotype.HalfPrecision[T], P gotype.HalfPrecisionPtr[T]](t *testing.T, packRHSFn PackRHSFn[T], rhsL1KernelCols int)
RunPackRHSTestsHalfPrecision verifies that packRHSFn matches the reference matmul.PackRHS for half-precision types.
Types ¶
type ApplyPackedOutputFn ¶
type ApplyPackedOutputFn[T gotype.ScalarNotComplex] func( packedOutput, output []T, isFirstContractingPanel bool, packedOutputRowStride int, lhsRowOffset, rhsColOffset int, outputRowStride int, height, width int, )
ApplyPackedOutputFn is the signature for functions that apply packed output to the final output.
type PackLHSFn ¶
type PackLHSFn[T gotype.ScalarNotComplex] func(src, dst []T, srcRowStart, srcColStart, srcRowStride, lhsRows, contractingCols, lhsL1KernelRows int)
PackLHSFn is the signature for LHS packing functions.
type PackRHSFn ¶
type PackRHSFn[T gotype.ScalarNotComplex] func(src, dst []T, srcRowStart, srcColStart, srcStrideCol, contractingRows, rhsCols, RHSL1KernelCols int)
PackRHSFn is the signature for RHS packing functions.