Views
No views yet
kernels library.fp32 / fp16 / bf16, last dim from 1 up to 32768 (zero-padded to the
next power of two internally).1import torch
2from kernels import get_kernel
3
4hadamard = get_kernel("galqiwi/hadamard_transform_kernels", version=1)
5
6x = torch.randn(4, 4096, device="cuda", dtype=torch.float16)
7y = hadamard.hadamard_transform(x, scale=1.0)hadamard_transform(x: torch.Tensor, scale: float = 1.0) -> torch.Tensorx is a CUDA tensor of shape (..., dim). The output has the same shape and
dtype.