Feature request: disabling/detecting out-of-place `.at[].set()` updates.
See original GitHub issueI have a program in which XLA is treating a .at[].set()
update out-of-place rather than in-place. At the moment it’s actually not clear to me whether this is a bug in XLA*
, or a fault in my program that is preventing the optimisation.
What I’d really like is either:
- a way to disable out-of-place updates (and throw an error that can be debugged); or
- a way of detecting out-of-place updates (once again, to debug).
AFAIK there’s no way to do this in JAX at the moment. In my head I’m imagining something like an environment variable similar to the JAX_DEBUG_NANS
one used to catch NaNs.
(More generally I would remark that ways to properly introspect/debug/understand the compiled XLA would be really nice.)
*
I know of at least one example of this being the case for XLA:CPU (#8192), but I don’t think I’m running into that particular bug here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:14 (3 by maintainers)
Top Results From Across the Web
KB5004442—Manage changes for Windows DCOM Server ...
KB5004442—Manage changes for Windows DCOM Server Security Feature Bypass (CVE-2021-26414) ... In that update, DCOM hardening was disabled by default.
Read more >Disabling/Enabling Feature Requests - Instabug
Described here is how to disable or enable the feature requests. ... You can completely prevent any feature request related features from displaying...
Read more >Permissions Policy - HTTP - MDN Web Docs - Mozilla
Chrome Edge
Permissions‑Policy Full support. Chrome88. more. Toggle history Full supp...
accelerometer. Experimental Full support. Chrome88. more. Toggle history Full supp...
ambient‑light‑sensor. Experimental Full support. Chrome88....
Read more >About iOS 16 Updates - Apple Support
This release also adds Apple Music Sing, Advanced Data Protection for iCloud, Lock Screen improvements, and other features and bug fixes for ...
Read more >Merge request approval settings - GitLab Docs
If you don't want users to change approval rules on merge requests, you can disable this setting: On the left sidebar, select Settings...
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
When I run your test on a Colab GPU runtime, I see the following:
… which looks to me like it’s consistent with updates being in-place when buffer donation is available. What do you think?
Buffer donation is not implemented on CPU (see https://jax.readthedocs.io/en/latest/faq.html#buffer-donation); when you execute this on CPU you should see warnings that look like
Two instantiated jax arrays (such as the input and output of your test function) cannot share the same memory unless their buffers are donated. So I don’t think this test tells us anything about whether updates are done in-place within JIT.