-
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
Conversation
Signed-off-by: YAO Matrix <matrix.yao@intel.com>
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
fix the similar issue as #36331
Signed-off-by: YAO Matrix <matrix.yao@intel.com>
Signed-off-by: YAO Matrix <matrix.yao@intel.com>
@@ -623,7 +623,7 @@ def test_simple_generate(self): | |||
( | |||
"xpu", | |||
3, | |||
): "<|begin_of_text|>Hey how are you doing on this lovely evening? I hope you are all doing well. Today I", | |||
): "<|begin_of_text|>Hey how are you doing on this lovely evening? I hope you are all doing well. I am", |
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
(
"cuda",
8,
)
to
("cuda", 8)
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 by pip 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.
If you don't mind, could you change
( "cuda", 8, )
to
("cuda", 8)
etc.
no big deal though 🙏
done, thx.
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.
LGTM, just a 2 or 3 nit comments or questions
Thank you
@@ -623,7 +623,7 @@ def test_simple_generate(self): | |||
( | |||
"xpu", | |||
3, | |||
): "<|begin_of_text|>Hey how are you doing on this lovely evening? I hope you are all doing well. Today I", | |||
): "<|begin_of_text|>Hey how are you doing on this lovely evening? I hope you are all doing well. I am", |
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
(
"cuda",
8,
)
to
("cuda", 8)
etc.
no big deal though 🙏
@@ -623,7 +623,7 @@ def test_simple_generate(self): | |||
( | |||
"xpu", | |||
3, | |||
): "<|begin_of_text|>Hey how are you doing on this lovely evening? I hope you are all doing well. Today I", | |||
): "<|begin_of_text|>Hey how are you doing on this lovely evening? I hope you are all doing well. I am", |
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.
@@ -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 comment
The 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 comment
The 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 else
statement, to remind me and other xpu guys to avoid later mistakes in case we forgot the history, :)
} | ||
) | ||
# fmt: on |
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.
it could be a simple # fmt: skip
after the ending )
. For the next time :-) though, if you find it's easier to add.
@ydshieh, pls help review, thx very much.