xnn.common.models.fast.AutoPolicy#
- class xnn.common.models.fast.AutoPolicy(min_edges=<factory>, min_edges_float64=<factory>, default_min_edges=0, default_min_edges_float64=0)[source]#
Bases:
objectWhen
use_fast="auto"takes the fast path.The fast kernels have a fixed per-call cost, so they lose on small inputs and win on large ones. The crossover is measured per GPU model and precision and stored as a minimum edge count of the neighbor graph; a GPU without a measured entry uses the default.
- Parameters:
min_edges (dict of str to int) – float32 thresholds, keyed by a substring of the CUDA device name (matched case-insensitively, first match wins).
min_edges_float64 (dict of str to int) – The same for float64 (where the reference is slower, so the kernels win earlier).
default_min_edges (int) – The thresholds of a GPU in neither table.
default_min_edges_float64 (int) – The thresholds of a GPU in neither table.