aitune.torch.kernel_forge.kernel_provider_runtime
aitune.torch.kernel_forge.kernel_provider_runtime
Runtime activation of a selected kernel optimization plan.
Module Contents
Classes
API
Install a kernel optimization plan by swapping torch.nn.functional calls.
Whether runtime hooks are currently installed.
Create a hook that restores functions after each module forward.
Create a hook that installs providers before each module forward.
Expose a callable provider as a regular Python function.
Activate the selected providers idempotently.
Temporarily activate the plan for inference while preserving prior runtime state.
Deactivate providers and restore outstanding function patches idempotently.
Graph capture may invoke a module’s forward pre-hook without invoking its matching post-hook. Unwind any patches left on the function stacks so a provider cannot remain installed after the runtime is deactivated.