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

#15863: Implementing the view operation #15865

Merged
merged 11 commits into from
Dec 10, 2024
Merged

Conversation

jvegaTT
Copy link
Contributor

@jvegaTT jvegaTT commented Dec 10, 2024

Ticket

#15863

Problem description

Models team has asked for a 0-cost view op which asserts out if a 0 cost view is not possible for that request

What's changed

Implemented 0-cost view that provides the proper input validation and then calls the perform_view function in reshape

Checklist

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

ttnn/cpp/ttnn/operations/data_movement/view/view.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

ttnn/cpp/ttnn/operations/data_movement/view/view.cpp Outdated Show resolved Hide resolved
@jvegaTT jvegaTT requested a review from bbradelTT December 10, 2024 19:41
@pytest.mark.parametrize(
"input_shape, output_shape, layout",
[
((1, 15), (15,), ttnn.ROW_MAJOR_LAYOUT), # RM_last dimension matches, 1D output
Copy link
Contributor

Choose a reason for hiding this comment

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

could add test which demonstrates that it will throw if I pass wrong dimensions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is done in test_invalid_cases

Copy link
Contributor

Choose a reason for hiding this comment

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

I just saw it! thanks.

Copy link
Contributor

@dmakoviichuk-tt dmakoviichuk-tt left a comment

Choose a reason for hiding this comment

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

LGTM, but added 1 comment

@jvegaTT
Copy link
Contributor Author

jvegaTT commented Dec 10, 2024

I am waiting for post commit to run again before merging, I'm a little paranoid with the simple shape change

@jvegaTT jvegaTT merged commit eb9f4c3 into main Dec 10, 2024
119 checks passed
@jvegaTT jvegaTT deleted the jvega/view_op_implementation branch December 10, 2024 22:22
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.

5 participants