-
Notifications
You must be signed in to change notification settings - Fork 87
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
#7783: Port ttnn.upsample to C++ #8237
Conversation
ttnn/cpp/ttnn/operations/others.hpp
Outdated
inline ttnn::Tensor upsample( | ||
const ttnn::Tensor& input_tensor, | ||
//std::variant<float, std::tuple<float, float>, std::tuple<float, float, float>, std::tuple<float, float, float, float>> scale_factor, | ||
std::variant<int, std::vector<int>> scale_factor, |
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.
why not change this to use std::variant<std::array<float, 2>, std::array<float, 3>, std::array<float, 4>> and std::visit the helper implementation
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.
then you avoid the runtime overhead of the vector size checks
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.
Missed this comment earlier. Makes sense.. I'm gonna update.
ttnn/cpp/ttnn/operations/others.hpp
Outdated
TT_THROW("Unsupported scale factor"); | ||
} | ||
} | ||
// DEBUG |
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.
delete
d786bfc
to
1f623e8
Compare
3348ba6
to
4c189f7
Compare
4c189f7
to
36c8585
Compare
No description provided.