aitune.torch.tune_strategy.multi_backend_strategy
aitune.torch.tune_strategy.multi_backend_strategy
Share backend selection because strategies can be reused across different module types.
Module Contents
Classes
API
Bases: FindMaxBatchSizeMixin
Keep candidate lists in strategies and select them once the module is known.
Rebuild defaults when switching between ordinary and distributed modules, so a reused strategy does not keep incompatible backends. Explicit lists always win, including an empty list. Each strategy must define both workflows explicitly.
Return explicit candidates or the defaults for the current module.
Select distributed defaults without replacing user-supplied candidates.
Return AOT candidates that support the module’s execution requirements.
Return JIT candidates that support the module’s execution requirements.
Build only the candidates for the selected workflow and module type.
Create a strategy using AOT candidates and its default batch-size policy.
Match the regular constructor so existing AOT behavior stays unchanged.
Parameters:
Strategy constructor arguments, including explicit backend overrides.
Create a strategy using JIT candidates and no maximum-batch-size discovery.
Use the batches already recorded to limit tuning work during inference.
Parameters:
Strategy constructor arguments, including explicit backend overrides.