Autotune

Module

Provides interfaces to adaptive compilation in Mojo.

autotune

autotune[T: AnyType, *Ts: AnyType](value: T, values: !pop.pack<Ts>) -> T

Fork compilation to evaluate each of the provided values.

Parameters:

  • T (AnyType): The first value type.
  • Ts (*AnyType): The types of the rest of the parameters.

Args:

  • value (T): The first value in the pack.
  • values (!pop.pack<Ts>): The tail values.

Returns:

The value being used in the current compilation fork.

autotune_fork

autotune_fork[type: AnyType, *values: type]()

Fork compilation to evaluate each of the provided values.

Return parameters: out: The value being used in the current compilation fork.

Parameters:

  • type (AnyType): The type of the parameters to be evaluated.
  • values (*type): A list of parameters to be evaluated.