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

Fix Frontend Failing Test: torch - blas_and_lapack_ops.cholesky and torch - linalg.cholesky #28766

Closed
Daniel4078 opened this issue Jun 19, 2024 · 4 comments · Fixed by #28767
Closed
Labels
Sub Task a sub task which is stemming from a ToDo list issue

Comments

@Daniel4078
Copy link
Contributor

No description provided.

@Daniel4078 Daniel4078 added the Sub Task a sub task which is stemming from a ToDo list issue label Jun 19, 2024
@Daniel4078
Copy link
Contributor Author

It seems like there are two cholesky function under the ivy/functional/frontend/torch. one is in ivy/functional/frontends/torch/linalg.py#L14, and the other is in /ivy/functional/frontends/torch/blas_and_lapack_ops.py#L93. Both frontend function uses the same ivy function ivy.cholesky, and the tests for both frontend functions fail for now for the same "AssertionError: returned dtype = float32, ground-truth returned dtype = float64" reason.

@Daniel4078
Copy link
Contributor Author

though for the similiar ivy/functional/frontends/torch/linalg/cholesky_ex frontend function, it false with "AttributeError: 'list' object has no attribute 'T'" instead. which seems to be caused by the extra error check in the cholesky_ex function

@Daniel4078
Copy link
Contributor Author

it seems like for torch, even if the input dtype is float32, the output dtype is expected to be float64, instead of keeping at float32 like what ivy did.

@Daniel4078
Copy link
Contributor Author

I found a related new failure from the frontend test of torch.linalg.cholesky that is different:
E torch._C._LinAlgError: cholesky: The factorization could not be completed because the input is not positive-definite (the leading minor of order 1 is not positive-definite).
E Falsifying example: test_torch_cholesky(
E on_device='cpu',
E frontend='torch',
E backend_fw='tensorflow',
E dtype_and_x=(['complex64'],
E [array([[-8.0909090e+00+7.5864944j , 6.5512314e+00-8.873394j ,
E -1.6476854e+00-0.5j , -9.9999997e-05+9.090909j ,
E -1.9000000e+00+2.7267523j ],
E [-2.0000100e+00-9.090909j , -1.0001000e+00-1.7673124j ,
E 5.0000000e-01-1.1j , -1.9689250e+00+2.00001j ,
E -1.9000000e+00+9.090909j ],
E [ 5.0000000e-01+1.5j , -3.6476414e+00+0.99999j ,
E -3.3333334e-01+9.090909j , 9.0909090e+00+8.090909j ,
E -8.5043573e+00-2.198202j ],
E [ 1.9000000e+00+0.33333334j, 9.0909090e+00+9.090909j ,
E 1.0001000e+00+9.090909j , -1.1000000e+00-8.090909j ,
E -2.0000100e+00+9.090909j ],
E [ 6.8268528e+00-5.307268j , 3.3333334e-01-5.0536847j ,
E -5.0000000e-01+4.6941276j , 2.3796415e+00+9.090909j ,
E 1.9000000e+00+9.090909j ]], dtype=complex64)]),
E upper=False,
E test_flags=FrontendFunctionTestFlags(
E num_positional_args=1,
E with_out=True,
E with_copy=False,
E inplace=False,
E as_variable=[False],
E native_arrays=[True],
E test_trace=False,
E test_trace_each=False,
E generate_frontend_arrays=True,
E transpile=False,
E precision_mode=True,
E ),
E fn_tree='ivy.functional.frontends.torch.cholesky',
E )
E
E You can reproduce this example by temporarily adding @reproduce_failure('6.98.10', b'AXicVVJdSJNRGH6f7zvnW+7HUSrFaI61gTFWmaGQFwOF7rK7oJSgJThWCCvHhhfWiSJLUtpFkBcSrAxckS0IrMyGUCGKGCFByZBAsSKIRXUxZJ2vtm/rhcN54TzneZ73hylkViEaiciS3AAjyhbii1+fHrpPwu9c74M3DPl27fngk4XvLRESvtCRh4GpNFUR+s/H822eyJz8/mDz9mY4L4EYm10/5h52cAjTUMup3r5x4kCGimHjyCzJOxp7BatG4kChUPiR3CCVQWg9eoR0udzk59jptzVNJGp+DrSNNJ6gaiZd1n5qvrMmn7dI9qZ/jskCCCKnM31S58fl7p2B+EzEA8FSj13hmAdcIUNekWA+qsctsku0s2PlaKJzOg+BxPHa+iUXmEqGjIqyKSszzIJzgxHgJIop2QhzrV0vJ3d964FwuKva59+NQ9MoYxlZ22u7UCCTiowj9Tcqq4e92qZQqSJYZF6cB9kZ4dfK3a7OYPY3xH6393V66qIu9iYauX7DH5qWTTlTd6/1xWGo0mHJrckkLZaUKrmtvKxabdao1DrYYIBIUctdMivGchBjxghgVctEZqL6VZdve3vwA4ndQ4Or/c3zuseFsYBndGJxAqIhsbyH3TwHk2LY0gE5fzCUncmdlYAv+y4lBx4RZ8auQJO0QcvH7tmrvSTc+fcBX8ewvhxe846tKd7wjMS2g3XLUeuV/ypUebkNFdXKSUE/+APOD+S0') as a decorator on your test case

@Daniel4078 Daniel4078 changed the title Fix Frontend Failing Test: torch - blas_and_lapack_ops.cholesky Fix Frontend Failing Test: torch - blas_and_lapack_ops.cholesky and torch - linalg.cholesky Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sub Task a sub task which is stemming from a ToDo list issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant