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

#14099: ttnn.clip, clamp interface to follow Pytorch #14127

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

VirdhatchaniKN
Copy link
Contributor

@VirdhatchaniKN VirdhatchaniKN commented Oct 23, 2024

https://github.com/tenstorrent/tt-metal/actions/runs/11474694921 - passed

Work done : To change the float values to positional arguments as requested in #14099

@VirdhatchaniKN VirdhatchaniKN force-pushed the virdhatchani/clip_update branch from 95f6532 to f63677f Compare October 23, 2024 06:58
@VirdhatchaniKN VirdhatchaniKN changed the title #14099: ttnn.clip interface to follow Pytorch #14099: ttnn.clip, clamp interface to follow Pytorch Oct 23, 2024
@@ -1288,7 +1288,7 @@ def clip(
**kwargs,
):
t0 = setup_tt_tensor(x, device, layout[0], input_mem_config[0], dtype[0])
t1 = ttnn.clip(t0, min=low, max=high, memory_config=output_mem_config)
t1 = ttnn.clip(t0, low, high, memory_config=output_mem_config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if I give (t0, high, low)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works

Copy link
Contributor

@Aswinmcw Aswinmcw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VirdhatchaniKN VirdhatchaniKN marked this pull request as ready for review October 23, 2024 16:47
@VirdhatchaniKN
Copy link
Contributor Author

@VirdhatchaniKN VirdhatchaniKN merged commit df85fd3 into main Oct 25, 2024
114 checks passed
@VirdhatchaniKN VirdhatchaniKN deleted the virdhatchani/clip_update branch October 25, 2024 09:27
ct-clmsn pushed a commit to ct-clmsn/tt-metal that referenced this pull request Nov 12, 2024
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

Successfully merging this pull request may close these issues.

[Bug Report] ttnn.clip interface does not follow Pytorch
5 participants