Rate this Page

helion.language.triton_kernel#

helion.language.triton_kernel(triton_source_or_fn, args, output_like)[source]#

Define (once) and call a @triton.jit function from Helion device code.

Parameters:
  • triton_source_or_fn (object) – Source for a single @triton.jit function definition, or a Python function object defining a @triton.jit kernel.

  • args (Sequence[object] | Mapping[str, object]) – Positional or keyword placeholders that will be substituted via name resolution of Helion variables.

  • output_like (TypeVar(_T)) – Example tensor(s) describing the expected outputs for shape/dtype checks.

Return type:

TypeVar(_T)