-
Notifications
You must be signed in to change notification settings - Fork 29.4k
enable misc test cases on XPU #38852
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
Changes from 5 commits
dcb059a
14e710d
0b4e47b
45f03f8
2d4b180
a5533c3
c677511
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1623,9 +1623,10 @@ def is_any_loss_nan_or_inf(log_history): | |
self.assertFalse(is_any_loss_nan_or_inf(log_history_filter)) | ||
|
||
def test_train_and_eval_dataloaders(self): | ||
if torch_device in ["cuda", "xpu"]: | ||
if torch_device in ["cuda"]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am ok, but since you added that before, it was a mistake back then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it was a mistake by me. In that time I just tested in a single card, so may missed. In my recent test in multi-card env, i find it fail and debug to the DP issue... That's why i put a comment in |
||
n_gpu = max(1, backend_device_count(torch_device)) | ||
else: | ||
# DP is decprecated by PyTorch, accelerators like XPU doesn't support DP | ||
n_gpu = 1 | ||
|
||
tmp_dir = self.get_auto_remove_tmp_dir() | ||
|
@@ -3940,7 +3941,7 @@ def test_torchdynamo_memory(self): | |
from torch import _dynamo as torchdynamo | ||
|
||
class CustomTrainer(Trainer): | ||
def compute_loss(self, model, inputs, return_outputs=False): | ||
def compute_loss(self, model, inputs, num_items_in_batch=None, return_outputs=False): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix the similar issue as #36331 |
||
x = inputs["x"] | ||
output = model(x) | ||
if self.args.n_gpu == 1: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tweak ground truth on stock PyTorch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't mind, could you change
to
etc.
no big deal though 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, could you share what is
stock PyTorch
? You probably mentioned once but I can't remember.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, sorry for confusing on vocabulary.
stock PyTorch
in our vocabulary means "PyTorch released by Meta w/o any extensions or modification", it's what users can get bypip install torch --index-url xxx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thx.