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

[Bug]: TensorFlow Zeros API at Ivy Frontend: Limitation with Paddle Backend Supports Only Dimensions 0 to 9 #23155

Closed
1 of 5 tasks
akshatvishu opened this issue Sep 6, 2023 · 0 comments · Fixed by #23156
Closed
1 of 5 tasks
Assignees
Labels
Bug Report Report bugs detected in Ivy.

Comments

@akshatvishu
Copy link
Contributor

akshatvishu commented Sep 6, 2023

Bug Explanation

When running tests for the TensorFlow Zeros API implemented at the Ivy frontend, the following error is encountered when the Paddle backend is used:

OSError: Unimplemented error. Invalid dimension to be accessed. Now only supports access to dimension 0 to 9, but received dimension is 10.

Suggested Fix

    if ivy.current_backend_str() == "paddle":
        # Paddle only supports ndim from 0 to 9
        assume(input.shape[0] < 10)

Steps to Reproduce Bug

from CLI run: python3 -m pytest ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py::test_tensorflow_zeros -B=paddle

E               OSError: Unimplemented error. Invalid dimension to be accessed. Now only supports access to dimension 0 to 9, but received dimension is 10.
E                 [/paddle/paddle/phi/core/ddim.h:55]
E               Falsifying example: test_tensorflow_zeros(
E                   frontend='tensorflow',
E                   backend_fw='paddle',
E                   on_device='cpu',
E                   input=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
E                   dtype=['complex64'],
E                   fn_tree='ivy.functional.frontends.tensorflow.zeros',
E                   test_flags=FrontendFunctionTestFlags(
E                       num_positional_args=0,
E                       with_out=False,
E                       inplace=False,
E                       as_variable=[False],
E                       native_arrays=[False],
E                       test_compile=False,
E                       generate_frontend_arrays=False,
E                       transpile=False,
E                       precision_mode=False,
E                   ),
E               )

Environment

Linux+docker+vscode

Ivy Version

v1.1.9

Backend

  • NumPy
  • TensorFlow
  • PyTorch
  • JAX
  • Paddle

Device

CPU

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

Successfully merging a pull request may close this issue.

2 participants