-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changing layout of weights as desired for NPUW. #1
Conversation
@@ -1095,6 +1095,18 @@ void ov::npuw::util::unpack(const ov::SoPtr<ov::ITensor>& from, | |||
#undef CAST | |||
} | |||
|
|||
void transpose_data_f16(const int16_t* src_data, int16_t* dst_data, size_t dim1, size_t dim2, size_t dim3) { |
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.
Do we have already existing function for permute/tranpose?
Naive implementation can be done even simpler by just copying data to the tensor with different strides.
e.g let's assume original layout is NCHW [1, 3, 10, 15] but you need NHWC
- Create tensor with NHWC layout: ov::Tensor tmp([1, 10, 15, 3], ...);
- Copy data from existing tensor: orig.copy_to(tmp); <- this basically transpose data as
tmp
has different strides - orig.set_shape([1, 10, 15, 3])
- tmp.copy_to(orig)
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.
Tried this implementation particularly:
const auto& to_shape = to->get_shape();
size_t dim1 = to_shape[0];
size_t dim2 = to_shape[1];
size_t dim3 = to_shape[2];
ov::Shape new_shape = {dim2, dim3, dim1};
ov::Tensor tmp(to->get_element_type(), new_shape);
ov::SoPtr<ov::ITensor> tmp_itensor = ov::get_tensor_impl(tmp);
to->set_shape(new_shape);
to->copy_to(tmp_itensor._ptr);
tmp_itensor->copy_to(to._ptr);
std::cout << "To new shape: " << to->get_shape() << std::endl;
But when I verified, by testing if the actual data is transposed or not. It turns out not. So moved back to earlier implementation.
After these changes, I get the following error:
|
promoting to something new
…on) (openvinotoolkit#25612) ### Details: - There was an early return in the partitioning compiler in the case of pipeline "NONE", which in fact returned some empty result; - There was a handling for such empty result in the `Partitioner` class which, for this case, created a "full model" partition stub and pass it to `CompiledModel`, which handled this case & created just a single subgraph. - The downside of this is several transformations couldn't be applied to this path as e.g. function pipeline processing was bypassed. - This PR changes the "NONE" mode to return a whole-model partition which still can pass the remaining processing pipeline (no early return), so options like "CWAI" and "FUNCALL_FOR_ALL" can be applied on top to get the required transformations. ### Tickets: - E-130721 --------- Co-authored-by: Alexey Smirnov <alexey.smirnov@intel.com>
### Details: - *Move pytorch transformation tests* - *Split nightly scope* ### Tickets: - *ticket-id*
…ncy (openvinotoolkit#25522) ### Details: - Implement initial e2e testing ### Tickets: - 146346 --------- Co-authored-by: Alicja Miloszewska <alicja.miloszewska@intel.com>
…oolkit#25676) Reverts openvinotoolkit#25645 Hopefully runners will stay alive
…toolkit#25648) ### Details: - *item1* - *...* ### Tickets: - *CVS-143832*
src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.cpp
Outdated
Show resolved
Hide resolved
…zed models (openvinotoolkit#25478) ### Details: - *Disable ConvertGatherToGatherCompressed pass in case `useLPT` is false* ### Tickets: - *138337* --------- Signed-off-by: xipingya <xiping.yan@intel.com>
…g.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…penvinotoolkit#25663) ### Details: - use std::move - use const auto& where possible - Wrap test with anonymous namespace ### Tickets: [CVS-141675](https://jira.devtools.intel.com/browse/CVS-141675) [CVS-147342](https://jira.devtools.intel.com/browse/CVS-147342) ### Related to: [CVS-25639](openvinotoolkit#25639)
…jjayant-kadian/openvino into uk/adding-new-option-change-layout-npw
Details:
Tickets: