helion.kernel

helion.kernel(fn=None, *, config=None, configs=None, **settings)[source]

Decorator to create a Kernel object from a Python function.

Parameters:
  • fn (Optional[Callable[..., TypeVar(_R)]]) – The function to be wrapped by the Kernel. If None, a decorator is returned.

  • config (Config | dict[str, object] | None) – A single configuration to use for the kernel. See Config for details.

  • configs (list[Config | dict[str, object]] | None) – A list of configurations to use for the kernel. Can only specify one of config or configs. See Config for details.

  • settings (object) – Keyword arguments representing settings for the Kernel. Can also use settings=Settings(…) to pass a Settings object directly. See Settings for available options.

Returns:

A Kernel object or a decorator that returns a Kernel object.

Return type:

object

See also

  • Settings: Controls compilation behavior and debugging options

  • Config: Controls GPU execution parameters and optimization strategies