-
Notifications
You must be signed in to change notification settings - Fork 6k
enable 7 cases on XPU #11503
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
enable 7 cases on XPU #11503
Conversation
Signed-off-by: Yao Matrix <[email protected]>
id_vit_hidden = [torch.ones([1, 2, 2])] * 1 | ||
id_cond = torch.ones(1, 2) | ||
id_vit_hidden = [torch.ones([1, 577, 1024])] * 5 | ||
id_cond = torch.ones(1, 1280) |
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.
the size of the id_vit_hidden
and id_cond
is wrong, both A100 and XPU will report below error
def forward(self, input: Tensor) -> Tensor: return F.linear(input, self.weight, self.bias) E RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x2 and 1280x1024)
I checked the needed size for these 2 tensors and use the correct tensor
@@ -357,5 +358,5 @@ def test_consisid(self): | |||
video = videos[0] | |||
expected_video = torch.randn(1, 16, 480, 720, 3).numpy() |
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.
expected_video
here is generated by RNG, so suppose this is a in-complete case, so for this PR, I enable the case to run on XPU, need re-check the numerical correctness after expected_video
correctly set.
@@ -357,5 +358,5 @@ def test_consisid(self): | |||
video = videos[0] | |||
expected_video = torch.randn(1, 16, 480, 720, 3).numpy() | |||
|
|||
max_diff = numpy_cosine_similarity_distance(video, expected_video) | |||
max_diff = numpy_cosine_similarity_distance(video.cpu(), expected_video) |
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.
need to cpu, since expected_video
is in cpu, numpy_cosine_similarity_distance
only supports 2 tensors in same device.
@DN6 @a-r-r-o-w , pls help review and comment, thx very much. |
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.
thanks, lgtm!
@a-r-r-o-w @DN6 , pls help review, thx.