-
Notifications
You must be signed in to change notification settings - Fork 91
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
#9329: Restructure ttnn::argmax #9331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new structure looks really good!
Code changes:
ttnn/cpp/ttnn/operations/reduction/argmax/device/argmax_program_factory.hpp
has a dependency onttnn/cpp/ttnn/op_library/reduction/reduction_op.hpp
which is removed?- We should remove
ttnn/cpp/pybind11/operations/reduction.hpp
since it is no longer used. (Side note: Are we going to have a top level pybind oncettnn/cpp/pybind11
is completely removed?)
And a few questions:
- If we have something like
generic
, should we also rename the underlying filesgeneric
? I find it confusing that there is ageneric/reduction_pybind.hpp
and a top-levelreduction_pybind.hpp
. We can also call itgeneric_reduction
and have all files match if justgeneric
is weird. This is important to get right since we have other ops like binary and unary that will have similar patterns. - We are intentionally calling it
pybind
and notpybind11
? - Is it intentional that we no longer have
cpp
files? If we had them, should we also enforce each op owning their own CMakeLists?
Yes. Thank you for spotting! Cleanup.
Done! Thanks!
Yes, hierarchy will migrate naturally as we merge things.
Agreed. Renamed to
Yes, it is clear that those are python bindings, that should be plenty.
I missed it and it somehow built, but then
|
Description
Guiding principles
Keep everything related to a single op at a single place
User documentation and code organization should be aligned
Code organization reflects ownership
Change
Updated ttnn.argmax according to the described structure #9329
See the structure in an interactive form here:
https://github.com/tenstorrent/tt-metal/tree/ay/issue-9329-argmax-ttnn-struct/ttnn/cpp/ttnn/operations/reduction
from
to
Checklist