-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[NPUW] LazyTensor refactoring #27108
[NPUW] LazyTensor refactoring #27108
Conversation
@@ -193,18 +211,10 @@ ov::Tensor LazyTensorImpl::eval() const { | |||
const auto& shape = std::get<3>(unpack_meta); | |||
const auto& type = std::get<4>(unpack_meta); |
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.
it seems like variable1, variable2, ... = std::tie(unpack_meta)
will be useful here
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.
Done, thanks!
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.
Provided my comments on the first two files, let's align this for now and see what to do next.
LazyTensor permute(const std::vector<std::size_t>& axes); | ||
LazyTensor convert(); |
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.
Here's the question, where the operations can be defined.
Things like .permute()
and .tof16()
can stay non-static members - they will use this
as an operand to construct a new LT.
Things like .unpack(w,z,s)
or .concat([...])
you may want to make static.
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.
There are constructors above for Concat, Unpack, etc. Do you want to change them to new_tensor = LazyTensor::concat(to_concat, axis)
, etc?
Any updates here @smirnov-alexey ? |
Note: there is a problem with shapes (or it's a side-effect) after the last commit. Debug WIP |
…into as/npuw_lazy_tensor_refactor
3d94b6d
to
6421c75
Compare
Fixed |
struct Tensor { | ||
ov::Tensor tensor; | ||
}; |
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.
Where this one comes from? Isn't Const
enough for the purpose?
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.
E.g. with Unpack we introduce new input tensors
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.
Removed
No description provided.