enable 7 cases on XPU#11503
Merged
Merged
Conversation
Signed-off-by: Yao Matrix <matrix.yao@intel.com>
yao-matrix
commented
May 6, 2025
| 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) |
Contributor
Author
There was a problem hiding this comment.
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() | |||
Contributor
Author
There was a problem hiding this comment.
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.
| 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) |
Contributor
Author
There was a problem hiding this comment.
need to cpu, since expected_video is in cpu, numpy_cosine_similarity_distance only supports 2 tensors in same device.
Signed-off-by: YAO Matrix <matrix.yao@intel.com>
Contributor
Author
|
@DN6 @a-r-r-o-w , pls help review and comment, thx very much. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@a-r-r-o-w @DN6 , pls help review, thx.