test float uop in sym_infer (#7456)

* float uop in sym_infer

* break line :(

* rerun mypy

* update GlobalCounters types

* revert type change and cast assignments to mem and ops

* cast inferred value to UOp in reshape

* cast hcq, update view reshape to handle inferred float

* rm extra space

* update error

* no type updates
This commit is contained in:
gg
2025-02-13 12:55:28 +08:00
committed by GitHub
parent 095504d094
commit 19ae829bd1
+1
View File
@@ -617,6 +617,7 @@ class TestSymInfer(unittest.TestCase):
c = Variable("c", 0, 10)
var_vals = {a: 2, b: 3, c: 4}
assert sym_infer(5, var_vals) == 5
assert sym_infer(4.2, var_vals) == 4.2
assert sym_infer(a, var_vals) == 2
assert sym_infer(b, var_vals) == 3
assert sym_infer(a+b, var_vals) == 5