Skip to content

Conversation

@shutovilyaep
Copy link

Registering Reduction TTNN OPs (PR on top of #1210)

Problem description

Existing TTNN OPs should be registered to Pytorch Dispatcher.
The scope of this PR is Reduction OPs only, other groups of OPs are planned to be added in other PRs

What's changed

Reduction wrappers are introduced, Reduction TTNN OPs are registered

TODO:

  • Add more tests


namespace tt_eager::ext {

inline std::optional<std::variant<int, ttnn::SmallVector<int>>> to_ttnn_dim_variant(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason this function is kept here and not in eager_common.hpp?

break;
}
}
TORCH_CHECK(pos >= 0, "Dimname not found in tensor");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like we have several instances of TORCH_CHECK that all return "Dimname not found in tensor" on failure - can we make this more descriptive / potentially disambiguate the messages so it is easier to debug for users

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.

2 participants