-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Pytorch fronted]: Added support for Search Sorted op #26976
[Pytorch fronted]: Added support for Search Sorted op #26976
Conversation
Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
….hpp Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
….hpp Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
openvinotoolkit#26884) Reverts openvinotoolkit#25780 Causes failures on master branch and in pull requests
…notoolkit#26768) ### Details: - Add check return value of node's evaluate in `ov::interval_bound_evaluator` function. This check allows to replace check if tensors are not empty (initialized), as when evaluate returns true the result is valid. ### Tickets: - CVS-153113
### Details: - Add definition of `OVAny` to `addon.ts` to encapsulate the concept of [ov::Any](https://docs.openvino.ai/2024/api/c_cpp_api/classov_1_1_any.html) from C++ API in a way that's clear and can be easily updated if the underlying C++ type changes. Improved readability and maintainability. -- 'OVAny' corresponds to Python API [OVAny](https://docs.openvino.ai/2024/api/ie_python_api/_autosummary/openvino.OVAny.html) - In future updates to Node.js API, the OVAny type is expected to be enhanced with additional functionality. - Missed linter changes to `core.test.js` due to upstream merges ### Tickets: - [CVS-149319](https://jira.devtools.intel.com/browse/CVS-149319)
…6865) ### Details: - *Add documentation for batching on NPU plugin* - *...* ### Tickets: - *EISW-118045* --------- Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com> Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>
…toolkit#26869) ### Details: - *Add subgraph identificator for operation name, so one operation in two subgraphs can be distinguished as two different operations* - *...* ### Tickets: - *EISW-139849* --------- Co-authored-by: Dmitry Matveev <dmitry.matveev@intel.com>
…nce and adjust the NRMSE and PSNR metrics (openvinotoolkit#26020) ### Details: Small improvements for SIT: - Disable [dynamic quantization feature](https://github.com/openvinotoolkit/openvino/blob/master/src/inference/include/openvino/runtime/properties.hpp#L574), which is used by default by CPU pipeline to generate the reference outputs and affects accuracy for some particular models - Increase number of decimals for reported NRMSE metric to improve - For PSNR metric report fails only when the accuracy decrease not when it increase above the target ### Tickets: - *[CVS-143420](https://jira.devtools.intel.com/browse/CVS-143420)*
…penvinotoolkit#26848) ### Details: - Update `fc_bf_tiled_kernel_dyn_quan` for osv_is_yx_osv64_isv2 support ### Tickets: - 153232
…nd NumPy 2.X (openvinotoolkit#26886) **Details:** Run PT FE layer tests on Ubuntu 24.04 with Python 3.12 and NumPy 2.X Also, this PR contains fixes: - WA sporadic bug on Windows in case parallel run - support PT FE and TF FE layer tests on MacOS x86 - leftovers from code-review **Tickets:** 154003, 153800 --------- Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
### Details: - Fix double constant definition
…otoolkit#26885) This PR adds unit tests on 1. unpack routines within NPUW 2. main online partitioning functionality (smaller unit tests on Graph, Group, Repeated, etc will be added separately) Brings back openvinotoolkit#25780 Local run: ``` [----------] Global test environment tear-down [==========] 334 tests from 6 test suites ran. (3379 ms total) [ PASSED ] 334 tests. ``` --------- Co-authored-by: Alexey Smirnov <alexey.smirnov@intel.com> Co-authored-by: Dmitry Matveev <dmitry.matveev@intel.com>
…olkit#26892) ### Details: - Support complex tensors for `ExpandDims` operation + tests ### Tickets: - [None](openvinotoolkit#22950)
### Details: - Debug code in network::execute() method is extracted to separate class/file to improve code readability
### Details: - Fix oob array
|
||
@pytest.mark.nightly | ||
@pytest.mark.precommit | ||
@pytest.mark.parametrize(("sorted", "values"), [([[1, 3, 5, 7, 9], [2, 4, 6, 8, 10]], [[3, 6, 9], [3, 6, 9]]),([1, 3, 5, 7, 9], [[3, 6, 9],[0, 5, 20]])]) |
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.
Given this op contains type promotion and input conversion done internally in torch may affect out values, maybe test data should include also few handpicked values with fractional part just to be sure?
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.
Good point - will prepare a malicious case just for that
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.
FIxed.
Output<Node> values; | ||
std::tie(sorted, values) = get_inputs_with_promoted_types(context, 0, 1); | ||
const bool out_int32 = context.const_input<bool>(2); | ||
PYTORCH_OP_CONVERSION_CHECK(out_int32 == false, "aten::searchsorted(out_int32=true) unsupported"); |
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.
Is it not just the output type of the operation? Can it be supported by just inserting Convert
to i32?
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 is a part of aten::searchsorted API and it is(that flag) not supported at the moment as it is not needed.
PYTORCH_OP_CONVERSION_CHECK(out_int32 == false, "aten::searchsorted(out_int32=true) unsupported"); | ||
const bool right_mode = context.const_input<bool>(3); | ||
PYTORCH_OP_CONVERSION_CHECK(context.input_is_none(4), "aten::searchsorted(side) unsupported"); | ||
PYTORCH_OP_CONVERSION_CHECK(context.input_is_none(5), "aten::searchsorted(sorter) unsupported"); |
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.
What index does out
has? https://pytorch.org/docs/stable/generated/torch.searchsorted.html#torch-searchsorted
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.
Fixed.
…thub.com/pkowalc1/openvino into add_search_sorted_op_to_pytroch_frontend
This reverts commit 6b9e286.
PYTORCH_OP_CONVERSION_CHECK(out_int32 == false, "aten::searchsorted(out_int32=true) unsupported"); | ||
const bool right_mode = context.const_input<bool>(3); | ||
PYTORCH_OP_CONVERSION_CHECK(context.input_is_none(4), "aten::searchsorted(side) unsupported"); | ||
PYTORCH_OP_CONVERSION_CHECK(context.input_is_none(5), "aten::searchsorted(out) unsupported"); |
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.
Instead failing conversion with out please consider enabling it, for example like in round op: https://github.com/openvinotoolkit/openvino/blob/master/src/frontends/pytorch/src/op/round.cpp#L27-L29
+extend tests to cover such case:
https://github.com/openvinotoolkit/openvino/blob/master/tests/layer_tests/pytorch_tests/test_round.py#L34-L35
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.
Same can be said about out_i32
which is just a Convert
to i32
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 task was to add minimal version that supports some roblox model - not a full scale op. out_i32 parameter and out parameter are not used in that model and as such are omitted. If needed - they can be always enabled later with proper testing etc.
The original deadline for enabling this minimal version is today(22 Oct 2024). This PR has been in review for 2 weeks now - if you don't see any issues for minimal version which is now in this PR, please pass it.
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.
I'm supporting this approach
Please create a list of leftovers/improvements we could pickup in a scope of next release. For this one let's focus on specific request to deliver it on time.
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.
That is fine, just please ensure we have a ticket for improved support
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.
Dear reviewers, if you do not see any serious issues with this PR - please approve it, or add proper comment. |
NOTE: Failing tests on ARM is a known issue and will be fixed after #27217 is merged. |
6a8a69c
Details:
Tickets:
Depends on: