Docs / nablatensor-tensor / com.nablatensor.tensor.spi

record

GpuKernel

One GPU kernel: its CUDA-C source plus the launch geometry it was written for.

The entry-point name and parameter types are never written by hand — int, int) reads them out of the source, so the name a backend passes to cuModuleGetFunction cannot drift from the name the source actually defines.

Record components

name
String
paramTypes
List<String>
source
String
blockDimX
int
blockDimY
int

Fields

static final int DEFAULT_BLOCK_DIM

Block size the flat one-dimensional kernels are written for.

Methods

static GpuKernel of(String source)

Parses a single-entry-point translation unit launched with the default block.

static GpuKernel of(String source, int blockDimX, int blockDimY)

Parses a translation unit that must declare exactly one extern "C" __global__ entry point; __device__ helpers alongside it are fine.

int arity()

Number of arguments a launch of this kernel must supply.