← Back to events
ActiveAIRelease

viable/strict/1790184407: Support tensor torch._assert in export (#186306)

What happened

torch._assert only had special Dynamo handling for statically true Python constants and symbolic expressions. Tensor-valued conditions fell through to the eager Python implementation, whose if not condition forced proxy tensors through Python truthiness. During export this produced a data-dependent guard such as Eq(u0, 1) instead of preserving the assertion in the exported program. Lower tensor-valued torch._assert(…

Summary assembled by rule from the sources below

Why it's spreading

Sources