Commit 2750050
[JAX] Explicitly cast large integer constants to uint32.
We intend to add `jax.jit` decorators around a number of functions in the JAX standard library, including operators such as `&`.
A consequence of this is that JAX will attempt to cast Python integers (n.b. not NumPy scalars) to signed int32 or int64 types depending on the JAX x64 mode. The constant 2**32 - 1 is out of range of int32 (absent -x64 mode) and will produce an error under the new semantics. Instead, use a Numpy uint32 scalar.
PiperOrigin-RevId: 3889507741 parent f7eaefe commit 2750050
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
| 148 | + | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
0 commit comments