Commit 4905bfd
authored
Update constant fold to use correct numpy type (#2204)
In PyTorch<=2.7, the numpy arrays for bfloat16 and float8 types have
dtypes UINT16 and UINT8, which leads to incorrect constant folded
graphs. This PR updates the numpy helper to cast the arrays to the
correct dtypes.
Fix #21871 parent 0deb51b commit 4905bfd
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| |||
0 commit comments