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 torch svd #28770

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Commits on Jun 20, 2024

  1. fixed the potentially wrong namedtuple definitions in the svd backend…

    … functions,
    
    update the docstring of ivy.svd to mention the change of content of return when compute_uv is False,
    update svd's torch backend to only compute the necessary second component to be more efficient and the relevant docstring in ivy.svd as well
    Jin Wang committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    f7f499e View commit details
    Browse the repository at this point in the history
  2. try to fix the blas_and_lapack_ops.py.svd with correct output namedtu…

    …ple definition and behavior when compute_uv is false
    Jin Wang committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    3db7f17 View commit details
    Browse the repository at this point in the history
  3. try to fix the blas_and_lapack_ops.py.svd with correct output namedtu…

    …ple definition and behavior when compute_uv is false
    Jin Wang committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    46d180a View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2024

  1. replace the unimplemented tensor.mH used to the implemented adjoint, …

    …fixed the wrong shape and dtype of return. Now there are somehow numerial difference between return of groundtruth torch.svd and ivy.svd
    Jin Wang committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    dce10a6 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. update test of torch.blas_and_lapack_ops.svd to calculate the validit…

    …y of result instead of matching values
    Jin Wang committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    0c13ce6 View commit details
    Browse the repository at this point in the history
  2. small fix

    Jin Wang committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    4d0851d View commit details
    Browse the repository at this point in the history
  3. small fix

    Jin Wang committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    3b3670f View commit details
    Browse the repository at this point in the history
  4. updated the test for torch.linalg.svd

    Jin Wang committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    71fed6b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3fdf4dd View commit details
    Browse the repository at this point in the history
  6. fixed the skipping torch svd tests according to suggestion, no longer…

    … skipping
    Jin Wang committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    c5b5904 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. tests are partially passing, though for torch backend, "RuntimeError:…

    … Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
    
    " happen
    Jin Wang committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    efe9a5a View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2024

  1. fix test of numpy.linalg.decomposition.svd as it returns a svd object…

    … instead of the normal tuple and apply the np.asarray(x) change over ivy.as_numpy in other tests, ensure the different return pattern (s,u,v tha u,s,v)from tensorflow and when comput_uv is false get handled in the tests. Now only dtype mismatches happens
    Jin Wang committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    26aeba0 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2024

  1. Configuration menu
    Copy the full SHA
    b9cf1cd View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. now only torch backend of jax.numpy.linalg.svd is failing due to "Run…

    …timeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead." when the test function calls np.asarray to the returned value
    Jin Wang committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    3bb5b66 View commit details
    Browse the repository at this point in the history
  2. all tests for tesnorflow.linalg.svd are passing

    Jin Wang committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    8b29eb7 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. try to fix the two svd function in torch frontend, now the only probl…

    …em is that the ground truth returns a ivy array with dtype the same as input, while the function returns a torch tensor with the torch version of that dtype.
    Jin Wang committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    bc30d7d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bed8f77 View commit details
    Browse the repository at this point in the history
  3. make namedtuple definition more simple as suggested

    Jin Wang committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    316986e View commit details
    Browse the repository at this point in the history
  4. tried to fix jax.lac.linalg.svd. p.s. there is no implementation of s…

    …ubset_by_index parameter. tensorflow,torch and paddle backends are all failing due to significant value differences in only part of the reconstructed matrixes.
    Jin Wang committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    e0268c6 View commit details
    Browse the repository at this point in the history
  5. fixed jax.numpy.linalg.svd, all tests are passing, but jax.lax.linalg…

    ….svd produces significant difference with compute_uv=True (like flipped signs) in the reconstructed matrixes for all backends. I suspect that the decomposition of jax.lax.linalg.svd is different from other similiar functions
    Jin Wang committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    dcab2c1 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Configuration menu
    Copy the full SHA
    da4a78b View commit details
    Browse the repository at this point in the history
  2. fixing numpy.linalg.decompositions.svd

    Jin Wang committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    ac7a60a View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2024

  1. Configuration menu
    Copy the full SHA
    9b4c161 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. Configuration menu
    Copy the full SHA
    6c1c39c View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. fixed ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py::te…

    …st_torch_svd, all tests passed
    Jin Wang committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    8e927a4 View commit details
    Browse the repository at this point in the history
  2. fixed ivy_tests/test_ivy/test_frontends/test_numpy/test_linalg/test_d…

    …ecompositions.py::test_numpy_svd, though seems like using ivy.astype to convert type does not work at all
    Jin Wang committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    37272a8 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2024

  1. Fixing ivy_tests/test_ivy/test_frontends/test_tensorflow/test_raw_ops…

    ….py::test_tensorflow_Svd, now the frontend somehow always return float64 nomatter input dtype
    Jin Wang committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    dc90073 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2024

  1. fixed ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_lina…

    …lg.py::test_jax_svd
    Jin Wang committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    65c902f View commit details
    Browse the repository at this point in the history
  2. fixing ivy_tests/test_ivy/test_frontends/test_tensorflow/test_raw_ops…

    ….py::test_tensorflow_Svd, though if input is complex number the results show large difference
    Jin Wang committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    c92b6be View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. changed ivy_tests/test_ivy/test_frontends/test_torch/test_blas_and_la…

    …pack_ops.py::test_torch_svd so that complex number inputs are also tested, they are passing
    Jin Wang committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    c1a6632 View commit details
    Browse the repository at this point in the history
  2. changed all the torch's test_torch_svd so that complex number inputs …

    …are also tested, they are all passing
    Jin Wang committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    9b75cd1 View commit details
    Browse the repository at this point in the history
  3. try to update torch and tensorflow's svd functions as they somehow re…

    …turn fixed dtypes depending on if input is complex,
    Jin Wang committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    5c9de15 View commit details
    Browse the repository at this point in the history
  4. seems like should not use svdvals as it always return a not complex v…

    …alue instead as the same as the input, but the documents shows that the S component will always be real, which is different from the groundtruth behavior shown in the, updated the jax svd tests to check for complex inputs
    Jin Wang committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    2f76f66 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. fixed jax's svd to teat for complex input. though only jax.lax.linalg…

    ….svd fail for tensorflow backend due to significant and updated all relavent svd with more complex supported dtype
    Jin Wang committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    412e60c View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Configuration menu
    Copy the full SHA
    ee58d83 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. Configuration menu
    Copy the full SHA
    9433e91 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Configuration menu
    Copy the full SHA
    c7d9ddc View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2024

  1. Configuration menu
    Copy the full SHA
    c89223c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    99b7266 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    00f7754 View commit details
    Browse the repository at this point in the history
  4. Update test_linalg.py

    Daniel4078 authored Sep 28, 2024
    Configuration menu
    Copy the full SHA
    49db616 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Update test_linalg.py

    Daniel4078 authored Sep 30, 2024
    Configuration menu
    Copy the full SHA
    637652e View commit details
    Browse the repository at this point in the history
  2. Update test_tensor.py

    Daniel4078 authored Sep 30, 2024
    Configuration menu
    Copy the full SHA
    390b00b View commit details
    Browse the repository at this point in the history