Deprecate X64 flag
See original GitHub issueThis is the external tracking bug for deprecation of the X64 flag.
The final desired outcome here is the following:
- X64 flag no longer exists
jax.numpy
functions (e.g.jnp.arange
,jnp.zeros
, etc.) default to 32-bit, unless an explicit dtype is requested.- Python scalars default to weak-typed 64-bit
The plan is roughly the following:
- Change
jax.numpy
function defaults to 32-bit. This should only affect users of X64 mode, and will require adding explicit 64-bit dtypes to some code. At this point, enabling X64 will produce the desired long-term behavior. - Change the default X64 flag state to True. Users can still recover X32 behavior by explicitly setting it to False
- Deprecate setting the X64 flag
- Remove the X64 flag
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Using deprecated x86_32 instructions in 64 bit mode
It didn't just get 'deprecated', it was entirely removed for 64-bit code. You simple check the OF flag with the JO and JNO...
Read more >/Wp64 (Detect 64-Bit Portability Issues) | Microsoft Learn
The /Wp64 compiler option and __w64 keyword are deprecated in Visual Studio 2010 and Visual Studio 2012, and not supported starting in Visual ......
Read more >How To Use Gflags (formerly Google Commandline Flags)
DEFINE_bool defines a boolean flag. Here are the types supported: DEFINE_bool : boolean; DEFINE_int32 : 32-bit integer; DEFINE_int64 : 64-bit ...
Read more >Modern x64 Assembly 9: The rFlags Register (Flags, pushfq ...
Modern x64 Assembly 9: The rFlags Register ( Flags, pushfq, popfq, pushf, popf).
Read more >Compiling 64-Bit Code - Apple Developer
Compiling 64-Bit Code Using GCC · Compiling 64-Bit Code Using Xcode · Using Architecture-Specific Flags · Sending feedback… · We're sorry, an error ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The main rationale is that the modalism in the API complicates JAX both from a user perspective and a developer perspective.
For the user, there’s no way to reason about how a particular block of code will behave without global knowledge of the environment in which it is run (e.g. the value of the
JAX_ENABLE_X64
environment variable at the time that JAX was imported).Additionally, due to the way JAX tracing works, attempts to allow local overrides of the global state face fundamental challenges (e.g. https://github.com/google/jax/issues/5982).
Confusion about the x64 flag is one of the most common drivers of user confusion in our feedback forums.
Other similar frameworks (e.g. pytorch and tensorflow) do not have any such global modalism.
On the developer side, the global flag doubles the amount of CI testing we need to cover the package, and means that every line of code in the package must be written with this modalism in mind.
Of course, removing this would not come without tradeoffs: namely, some users would have to add more dtype specifications to their code in cases that they want 64-bit values.
These are some of the reasons we’ve decided to explore the possibility of deprecating the X64 flag. I’m curious to hear what thoughts you have – thanks
Could you please shed some light on the rationale behind this change? It seems quite inconvenient for certain use cases, in which a global switch on 32 or 64 bit could be handy.