Skip to content
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

Improved some of the UT codes and cleaned the skip list. #799

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a321dee
adjust tolerance for xpu
yuchengliu1 Aug 12, 2024
3e00b7c
update
yuchengliu1 Aug 12, 2024
62613f8
Merge branch 'main' into tolerance_adjust
yuchengliu1 Aug 12, 2024
a23732d
Merge branch 'main' into tolerance_adjust
yuchengliu1 Aug 13, 2024
7f06d6a
update skip_list
yuchengliu1 Aug 14, 2024
e9a1a15
Merge branch 'main' into tolerance_adjust
yuchengliu1 Aug 14, 2024
97ec9c5
update
yuchengliu1 Aug 14, 2024
7051142
update
yuchengliu1 Aug 14, 2024
16176cd
update
yuchengliu1 Aug 14, 2024
1a0d85a
Merge branch 'main' into tolerance_adjust
yuchengliu1 Aug 14, 2024
53fac08
update skiplist according ci
yuchengliu1 Aug 14, 2024
835326a
Merge branch 'main' into tolerance_adjust
yuchengliu1 Aug 15, 2024
cdc3f6a
update extented skiplist
yuchengliu1 Aug 18, 2024
11dbedb
Merge branch 'main' into tolerance_adjust
fengyuan14 Aug 19, 2024
593c98d
enhance extended hook
yuchengliu1 Aug 19, 2024
e81c7f5
update skiplist
yuchengliu1 Aug 19, 2024
cf3ec92
update skiplist
yuchengliu1 Aug 19, 2024
2337f35
fixed some test cases code and clean skip list
PenghuiCheng Aug 20, 2024
f1ffc1b
Merge from tolerance_adjust branch
PenghuiCheng Aug 20, 2024
7bd6268
Merge from main branch
PenghuiCheng Aug 22, 2024
e367dd2
update code
PenghuiCheng Aug 22, 2024
17b6c53
Update code
PenghuiCheng Aug 22, 2024
58137a5
Merge branch 'main' into penghui/clean_skip_list
PenghuiCheng Aug 26, 2024
55f3aff
Merge branch 'main' into penghui/clean_skip_list
PenghuiCheng Aug 27, 2024
738b416
Merge branch 'main' into penghui/clean_skip_list
PenghuiCheng Aug 29, 2024
201ded6
Merge branch 'main' into penghui/clean_skip_list
PenghuiCheng Sep 3, 2024
1ec82c5
Merge remote-tracking branch 'origin/main' into penghui/clean_skip_list
PenghuiCheng Sep 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions test/xpu/nn/test_packed_sequence_xpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@

def myxpu(self, *args, **kwargs):

ex = torch.tensor((), dtype=self.data.dtype, device=self.data.device).to(*args, **kwargs)
if ex.device.type == 'xpu':
ex = torch.tensor((), dtype=self.data.dtype, device=self.data.device).to(
*args, **kwargs
)
if ex.is_xpu:
return self.to(*args, **kwargs)
return self.to(*args, device='xpu', **kwargs)
kwargs["device"] = "xpu"
return self.to(*args, **kwargs)

rnn_utils.PackedSequence.xpu = types.MethodType(rnn_utils.PackedSequence, myxpu)
rnn_utils.PackedSequence.xpu = myxpu
fengyuan14 marked this conversation as resolved.
Show resolved Hide resolved

def my_test_to(self):
for enforce_sorted in (True, False):
Expand Down Expand Up @@ -53,7 +56,7 @@ def my_test_to(self):
"xpu",
"xpu:0" if torch.xpu.device_count() == 1 else "xpu:1",
]:
b = a.xpu()
b = a.xpu(device=xpu)
self.assertIs(b, b.to(xpu))
self.assertIs(b, b.xpu())
self.assertEqual(a, b.to("cpu"))
Expand Down
Loading
Loading