triton.jit

triton.jit(fn: T) JITFunction[T]
triton.jit(*, version=None, do_not_specialize: Iterable[int] | None = None, debug: bool | None = None, noinline: bool | None = None) Callable[[T], JITFunction[T]]

Decorator for JIT-compiling a function using the Triton compiler.

Note:

When a jit’d function is called, arguments are implicitly converted to pointers if they have a .data_ptr() method and a .dtype attribute.

Note:

This function will be compiled and run on the GPU. It will only have access to:

  • python primitives,

  • builtins within the triton package,

  • arguments to this function,

  • other jit’d functions

Parameters:

fn (Callable) – the function to be jit-compiled