backendtest

package
v0.1.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BenchmarkDense

func BenchmarkDense(b *testing.B, backend compute.Backend)

func BenchmarkDotGeneral

func BenchmarkDotGeneral(b *testing.B, backend compute.Backend)

func BenchmarkFusedActivation added in v0.1.9

func BenchmarkFusedActivation(b *testing.B, backend compute.Backend)

func BenchmarkGelu

func BenchmarkGelu(b *testing.B, backend compute.Backend)

func BenchmarkLayerNorm

func BenchmarkLayerNorm(b *testing.B, backend compute.Backend)

func BenchmarkQuantizedDense

func BenchmarkQuantizedDense(b *testing.B, backend compute.Backend)

BenchmarkQuantizedDense compares fused quantized-dense (which uses highway SIMD when available) against a decomposed path and float32 Dense as a reference.

The decomposed path is only benchmarked for Int8 because the go backend does not support bitwise shift ops needed for NF4/Int4 nibble extraction.

func BenchmarkSoftmax

func BenchmarkSoftmax(b *testing.B, backend compute.Backend)

func RunAll

func RunAll(t *testing.T, b compute.Backend, opts *AllTestsConfiguration)

RunAll runs all generic backend tests on the given backend.

If opts is nil, all tests will be run with all default test configurations.

func RunAllBenchmarks

func RunAllBenchmarks(b *testing.B, backend compute.Backend)

func TestBarriers

func TestBarriers(t *testing.T, b compute.Backend)

func TestBinaryOps

func TestBinaryOps(t *testing.T, b compute.Backend)

func TestBitcast

func TestBitcast(t *testing.T, b compute.Backend)

func TestConvGeneral

func TestConvGeneral(t *testing.T, b compute.Backend, opts *AllTestsConfiguration)

func TestConvertDType

func TestConvertDType(t *testing.T, b compute.Backend)

func TestDotGeneral

func TestDotGeneral(t *testing.T, backend compute.Backend)

func TestExec

func TestExec(t *testing.T, b compute.Backend)

func TestFunctions

func TestFunctions(t *testing.T, b compute.Backend)

func TestFusedOps

func TestFusedOps(t *testing.T, b compute.Backend)

func TestSpecialOps

func TestSpecialOps(t *testing.T, b compute.Backend)

func TestUnaryOps

func TestUnaryOps(t *testing.T, b compute.Backend)

Types

type AllTestsConfiguration

type AllTestsConfiguration struct {
	ConvGeneralDTypes []dtypes.DType
}

AllTestsConfiguration allows you to configure (select) which tests are run, in can your backend not support certain feature and you want to disable some specific tests.

The zero value always means "run all supported variants".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL