Since some dot algorithm presets have special cased input and output storage type behavior (e.g. all the BF16 algorithms), and since JAX's handling of these cases is (for better or worse) handled at the "preset" level, this PR provides a small quality of life improvement to convert known lax.DotAlgorithm specs to explicit lax.DotAlgorithmPreset members whenever possible. For example, if a user specifies:
Since some dot algorithm presets have special cased input and output storage type behavior (e.g. all the
BF16
algorithms), and since JAX's handling of these cases is (for better or worse) handled at the "preset" level, this PR provides a small quality of life improvement to convert knownlax.DotAlgorithm
specs to explicitlax.DotAlgorithmPreset
members whenever possible. For example, if a user specifies:this will be canonicalized to
lax.DotAlgorithmPreset.BF16_BF16_F32_X6
and the input and output casting will be handled properly.