torch.tx.PatternFunction
export type PatternFunction<Pattern extends string> = <
Tensors extends Record<PatternVariables<Pattern>, TensorOrNumber> &
Record<string, TensorOrNumber>,
>(
tensors: ValidatePatternVariables<Pattern, Extract<keyof Tensors, string>> extends void
? Tensors
: ValidatePatternVariables<Pattern, Extract<keyof Tensors, string>>
) => PatternExprResult<Pattern, Tensors>;Patternextends stringType signature for the $ tagged template function.
The const Strings parameter captures literal string values from the
template, enabling compile-time operator detection.