-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying PjRt device at runtime doesn't work. #5942
Comments
I think this is intended, we don't really expect user to switch PJRT device after program is inited. In fact, we don't expect user to change most(if not all) env var after program started, since most of them are set as |
Then, maybe it would be better to error out, wouldn't it? |
hmm it means we need to check |
Ouch. What about having an API for initializing the PjRt client with a given PjRt device? It would make "doing the wrong thing" (i.e. changing the device) very hard. |
I like that idea. We can add a warning/error to |
🐛 Bug
Not sure this is a bug or intended behavior. But, once the PjRt client is initialized with a device, apparently we can't change it. If we try to do it, PyTorch/XLA won't complain, and execute everything in the initialized device.
Expected behavior
Issue a warning (or, even better, an error). Or be able to change devices at runtime.
Environment
Additional context
This came up when trying to use the recently upstreamed benchmark. The function
is_xla_device_available
(inside benchmarks/util.py) is called for each enabled accelerator.The text was updated successfully, but these errors were encountered: