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

Support for creating a 0-dim tensor when a single scalar value or shape [ ] is given #13803

Open
Tracked by #13521
KalaivaniMCW opened this issue Oct 15, 2024 · 2 comments
Assignees

Comments

@KalaivaniMCW
Copy link
Contributor

KalaivaniMCW commented Oct 15, 2024

Requirements from pytorch tracing sweeps https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.add.Tensor.md

Case 1:
when input parameters are such :

Tensor<[1, 1, 1024]> self = ?,
Tensor other = 1.0

The tensor other is expected to be created as a 0-dim tensor with value 1.0

Case 2:
when input parameters are such :

Tensor<[]> self = ?,
Tensor other = 1

The tensor self is expected to be created as a 0-dim tensor
The tensor other is expected to be created as a 0-dim tensor with value 1.0

image

Case:3
Empty Tensor or elements [0,1]
image

@KalaivaniMCW
Copy link
Contributor Author

KalaivaniMCW commented Nov 13, 2024

Adding some examples regarding [ ], below shapes are taken from ttnn.add sweep for pytorch2
When tested in torch ,
Torch: {'input_shape': {'self': [], 'other': [0, 1]},
Image

Torch: {'input_shape': {'self': [], 'other': [1, 1, 768]}
Image

@VirdhatchaniKN
Copy link
Contributor

Adding some examples regarding [ ], below shapes are taken from ttnn.divide sweep for pytorch2 : #14733
When tested in torch ,

  • {"shape": [1, 12, 7, 7], "other": []}
  • {"shape": [1, 16, 1, 6], "other": []}

Image
Image

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

No branches or pull requests

3 participants