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

norm and pca_lowrank op info test from issue #7528 #8384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vyom1611
Copy link
Contributor

@vyom1611 vyom1611 commented Nov 14, 2024

Added norm and pca_lowrank implementations for op test, however currently the lowarnk_pca test fails because of :

FAILED test/test_ops.py::TestOpInfoCPU::test_reference_eager_pca_lowrank_cpu_float32 - AssertionError: Tensor-likes are not close!

Upon checking with debug print statements, I saw that the only case it doesn't match is because of sign ambiguity here:

Expected: tensor([[-0.2460],
        [-0.7316],
        [ 0.4821],
        [ 0.4043],
        [ 0.0912]])
Got: tensor([[ 0.2460],
        [ 0.7316],
        [-0.4821],
        [-0.4043],
        [-0.0912]])
Absolute difference: tensor([[0.4920],
        [1.4632],
        [0.9642],
        [0.8087],
        [0.1823]])
Relative difference: tensor([[2.0000],
        [2.0000],
        [2.0000],
        [2.0000],
        [2.0000]])

That is the only fix remaining, and then it should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant