Skip to content
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: Bring back unpack and partitioning unit tests for NPUW #26885

Merged

Conversation

AsyaPronina
Copy link
Contributor

@AsyaPronina AsyaPronina commented Oct 2, 2024

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 #25780

Local run:

[----------] Global test environment tear-down
[==========] 334 tests from 6 test suites ran. (3379 ms total)
[  PASSED  ] 334 tests.

@AsyaPronina AsyaPronina requested review from a team as code owners October 2, 2024 09:55
@github-actions github-actions bot added category: build OpenVINO cmake script / infra category: NPU OpenVINO NPU plugin category: NPUW NPUW plugin labels Oct 2, 2024
@dmatveev dmatveev changed the title Add unpack and partitioning unit tests for NPUW by Alexey Smirnov NPUW: Bring back unpack and partitioning unit tests for NPUW Oct 2, 2024
Comment on lines 5 to 6
#if 0
#include "unpack.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may trigger a warning but let's see

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's enable tests if only AVX2 is present (check via #ifdef)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Added #ifdef __AVX2__

src/plugins/intel_npu/tests/unit/CMakeLists.txt Outdated Show resolved Hide resolved
Comment on lines 5 to 6
#if 0
#include "unpack.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's enable tests if only AVX2 is present (check via #ifdef)

// SPDX-License-Identifier: Apache-2.0
//

#ifdef __AVX2__
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ilya-lavrenov is that the right way to detect AVX2, or OpenVINO comes with its own compile definition?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmatveev i think we should stick to openvino form or forced disabling based on cmake configs in form of one of macro

set(_DEFINE_SSE42    "HAVE_SSE42"   ${_DEFINE_ANY})
set(_DEFINE_AVX      "HAVE_AVX"     ${_DEFINE_SSE42})
set(_DEFINE_AVX2     "HAVE_AVX2"    ${_DEFINE_AVX})
set(_DEFINE_AVX512F  "HAVE_AVX512F" ${_DEFINE_AVX2})

for our tests, #ifdef HAVE_AVX2 should be enough, while tests code itself can be rewritten in ref without intrinsics,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be HAVE_AVX2

@dmatveev
Copy link
Contributor

dmatveev commented Oct 2, 2024

Removed from auto-merge, two builds are failing

@smirnov-alexey
Copy link
Contributor

All builds are green, adding to auto-merge

@smirnov-alexey smirnov-alexey added this pull request to the merge queue Oct 3, 2024
Merged via the queue into openvinotoolkit:master with commit 4254c13 Oct 3, 2024
130 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build OpenVINO cmake script / infra category: NPU OpenVINO NPU plugin category: NPUW NPUW plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants