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

[Feature Request]: Adding the superset behaviour for Shape class methods present in torch and tf #28617

Open
3 of 20 tasks
fnhirwa opened this issue Mar 17, 2024 · 0 comments
Open
3 of 20 tasks
Assignees

Comments

@fnhirwa
Copy link
Contributor

fnhirwa commented Mar 17, 2024

Is your feature request related to a problem? Please describe.
To fully support functionalities like serialization we need to support the behaviour of supported Shape instances in ivy backends and unify their behaviour across the backends.

Describe the solution you'd like
An example is in torch when you're saving a tensor to disk and want to recreate it later. you can use a __getnewrags__ method of torch.Size class which helps to recreate the tensor later on.

Describe alternatives you've considered

Additional context
Here is the list of suggested methods to be added for superset support.
For torch.Size class:

For the tf.TensorShape class:

  • most_specific_common_supertype
  • cast
  • concat #28656
  • is_subtype_of
  • experimental_from_proto
  • flatten
  • _v2_behavior
  • experimental_as_proto
  • assert_is_compatible_with
  • _dims
  • merge_with
  • experimental_type_proto
  • nonzero
  • as_proto
  • most_specific_compatible_shape
  • placeholder_value
  • to_tensors
  • from_tensors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants