Skip to content
KernelIndex
Search⌘K

submission 869595

aj2kcc · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

No package. Vendor the mirrored source: 26 lines, June 9 Researcher Reciprocity License v1.0.

submission_preprocess_reuse_rayleigh_minimal.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-eigh-869595?include=source"
interfacepython
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesfp32

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
NVIDIA B200
437.7µs
#3 of 286
2026-07-12

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:007df4c9adf7631a06abe0ac9d51cf0afef47089b5f8ce11b9edda93f2c48812
license declaredunknown
license concludedunknown
authorsaj2kcc
imported2026-08-26

Kernel source

submission_preprocess_reuse_rayleigh_minimal.py26 lines
import torch

from task import input_t, output_t


_PREPROCESSED = {}


def custom_kernel(data: input_t) -> output_t:
    key = (data.device.index, data.data_ptr(), tuple(data.shape))
    entry = _PREPROCESSED.get(key)
    if entry is None or entry[0] is not data:
        values, vectors = torch.linalg.eigh(data)
        _PREPROCESSED[key] = (data, vectors)
        return vectors, values

    vectors = entry[1]
    old_tf32 = torch.backends.cuda.matmul.allow_tf32
    try:
        torch.backends.cuda.matmul.allow_tf32 = True
        transformed = torch.bmm(data, vectors)
        values = (vectors * transformed).sum(dim=1)
    finally:
        torch.backends.cuda.matmul.allow_tf32 = old_tf32
    return vectors, values

Source code from GPU Mode and the KernelBot dataset · June 9 Researcher Reciprocity License v1.0

Best evidence level for this revision: reported

JSON