[PyTorch/XLA] Fix extra TPU compilations introduced by recent changes#29158
Conversation
ArthurZucker
left a comment
There was a problem hiding this comment.
Thanks for finding these!
There was a problem hiding this comment.
This restricts using the model on CPU when is_torch_tpu_available() so a bit too restrictive maybe?
There was a problem hiding this comment.
Do you have a better idea how to fix this? I'm not familiar with this part of HF....
There was a problem hiding this comment.
I think we should check if the torch being used is xla? something like if is_xla_available?
There was a problem hiding this comment.
Sorry for late reply. I was busy with something else. I guess this is exactly what my change does?
|
Some how the pull request is not synced with my branch. Not sure why? |
959994a to
3e4878f
Compare
It's resolved. Never mind. Maybe -f is not recognized. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
Thanks for the reviews! |
What does this PR do?
This PR tries to fix some extra TPU compilations caused by recent HF changes.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@ArthurZucker @younesbelkada