trunk/c9c53665f67242a8a30caaa42b375e590b99009a: Fix z3 model value comparisons in test_z3_gradual_types (#197424)
- PyTorch: 1319 events in the last 90 days
- PyTorch: 1304th Release in the last 90 days
- Previous: earlier the same day · ciflow/trunk/198050
What happened
z3's Solver.model()[const].arg(i).arg(j) returns an ArithRef (e.g. IntNumRef), not a Python int. Comparing an ArithRef to a Python int with != produces a z3 BoolRef, which is always truthy in a Python if , so every if ... != expected: raise AssertionError guard fired unconditionally and the cases failed spuriously even when the solver produced the correct value. Convert z3 numerics to Python ints with .as_long() bef…
Summary assembled by rule from the sources below