Skip to content

Commit

Permalink
Merge branch 'master' into an/fc_acl_executor
Browse files Browse the repository at this point in the history
  • Loading branch information
allnes authored Jun 25, 2024
2 parents b434eef + 83f6d21 commit 0ba1be0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 40 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/job_samples_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
description: 'Machine on which the tests would run'
type: string
required: true
image:
description: 'Docker image in which the tests would run'
container:
description: 'JSON to be converted to the value of the "container" configuration for the job'
type: string
required: false
default: null
default: '{"image": null}'
affected-components:
description: 'Components that are affected by changes in the commit defined by the Smart CI Action'
type: string
Expand All @@ -21,9 +21,9 @@ permissions: read-all

jobs:
Samples:
timeout-minutes: 30
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
container: ${{ fromJSON(inputs.container) }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -66,6 +66,8 @@ jobs:
run: brew install coreutils

- name: Fetch setup_python action
# Python is already installed on Ubuntu within Dockerfile
if: runner.os != 'Linux'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
sparse-checkout: |
Expand All @@ -74,6 +76,8 @@ jobs:
path: 'openvino'

- name: Setup Python 3.11
# Python is already installed on Ubuntu within Dockerfile
if: runner.os != 'Linux'
uses: ./openvino/.github/actions/setup_python
with:
version: '3.11'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ jobs:
uses: ./.github/workflows/job_samples_tests.yml
with:
runner: 'aks-linux-4-cores-16gb'
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_x64 }}
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_x64 }}", "volumes": ["/mount:/mount"]}'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}

JS_API:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ jobs:
uses: ./.github/workflows/job_samples_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_arm64 }}
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_arm64 }}", "volumes": ["/mount:/mount"]}'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}

JS_API:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,15 @@ std::vector<std::pair<std::string, ov::Any>> exe_network_immutable_properties =
{std::make_pair(ov::supported_properties.name(), ov::Any("deadbeef"))},
{std::make_pair(ov::model_name.name(), ov::Any("deadbeef"))}};

std::vector<std::pair<std::string, ov::Any>> properties = {{}};

// ExecutableNetwork Properties tests
class ClassExecutableNetworkGetPropertiesTestNPU :
public OVCompiledModelPropertiesBase,
public ::testing::WithParamInterface<
std::tuple<std::string, std::pair<std::string, ov::Any>, std::pair<std::string, ov::Any>>> {
std::tuple<std::string, std::pair<std::string, ov::Any>>> {
protected:
std::string deviceName;
std::string configKey;
ov::Any configValue;
std::string compilerTypeConfigKey;
ov::Any compilerTypeConfigValue;
ov::Core ie;

public:
Expand All @@ -52,23 +48,20 @@ class ClassExecutableNetworkGetPropertiesTestNPU :
OVCompiledModelPropertiesBase::SetUp();
deviceName = std::get<0>(GetParam());
std::tie(configKey, configValue) = std::get<1>(GetParam());
std::tie(compilerTypeConfigKey, compilerTypeConfigValue) = std::get<2>(GetParam());

model = ov::test::utils::make_conv_pool_relu();
}
static std::string getTestCaseName(
testing::TestParamInfo<
std::tuple<std::string, std::pair<std::string, ov::Any>, std::pair<std::string, ov::Any>>>
std::tuple<std::string, std::pair<std::string, ov::Any>>>
obj) {
std::string targetDevice;
std::pair<std::string, ov::Any> configuration;
std::pair<std::string, ov::Any> compilerType;
std::tie(targetDevice, configuration, compilerType) = obj.param;
std::tie(targetDevice, configuration) = obj.param;
std::replace(targetDevice.begin(), targetDevice.end(), ':', '_');
std::ostringstream result;
result << "targetDevice=" << ov::test::utils::getDeviceNameTestCase(targetDevice) << "_";
result << "config=(" << configuration.first << "=" << configuration.second.as<std::string>() << ")";
result << "_compilerType=(" << compilerType.first << "=" << compilerType.second.as<std::string>() << ")";
result << "_targetPlatform=" + ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::test::utils::DEVICE_NPU);

return result.str();
Expand All @@ -81,7 +74,7 @@ TEST_P(ClassExecutableNetworkTestSuite1NPU, PropertyIsSupportedAndImmutableAndGe
std::vector<ov::PropertyName> properties;

ov::CompiledModel exeNetwork =
ie.compile_model(model, deviceName, {{compilerTypeConfigKey, compilerTypeConfigValue}});
ie.compile_model(model, deviceName);
OV_ASSERT_NO_THROW(properties = exeNetwork.get_property(ov::supported_properties));

auto it = find(properties.cbegin(), properties.cend(), configKey);
Expand All @@ -94,8 +87,7 @@ TEST_P(ClassExecutableNetworkTestSuite1NPU, PropertyIsSupportedAndImmutableAndGe
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkGetPropertiesTestNPU,
ClassExecutableNetworkTestSuite1NPU,
::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),
::testing::ValuesIn(exe_network_supported_properties),
::testing::ValuesIn(properties)),
::testing::ValuesIn(exe_network_supported_properties)),
ClassExecutableNetworkTestSuite1NPU::getTestCaseName);

using ClassExecutableNetworkTestSuite2NPU = ClassExecutableNetworkGetPropertiesTestNPU;
Expand All @@ -104,7 +96,7 @@ TEST_P(ClassExecutableNetworkTestSuite2NPU, PropertyIsSupportedAndImmutableAndCa
std::vector<ov::PropertyName> properties;

ov::CompiledModel exeNetwork =
ie.compile_model(model, deviceName, {{compilerTypeConfigKey, compilerTypeConfigValue}});
ie.compile_model(model, deviceName);
OV_ASSERT_NO_THROW(properties = exeNetwork.get_property(ov::supported_properties));

auto it = find(properties.cbegin(), properties.cend(), configKey);
Expand All @@ -116,8 +108,7 @@ TEST_P(ClassExecutableNetworkTestSuite2NPU, PropertyIsSupportedAndImmutableAndCa

INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkTestSuite2NPU, ClassExecutableNetworkTestSuite2NPU,
::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),
::testing::ValuesIn(exe_network_immutable_properties),
::testing::ValuesIn(properties)),
::testing::ValuesIn(exe_network_immutable_properties)),
ClassExecutableNetworkTestSuite2NPU::getTestCaseName);

} // namespace
Expand Down Expand Up @@ -308,13 +299,13 @@ TEST_P(ClassPluginPropertiesTestSuite4NPU, CanNotSetGetInexistentProperty) {

ASSERT_THROW(
ov::CompiledModel compiled_model1 = ie.compile_model(
model, deviceName, {{configKey, configValue}, {compilerTypeConfigKey, compilerTypeConfigValue}}),
model, deviceName, {{configKey, configValue}}),
ov::Exception);

ov::CompiledModel compiled_model2;

OV_ASSERT_NO_THROW(compiled_model2 =
ie.compile_model(model, deviceName, {{compilerTypeConfigKey, compilerTypeConfigValue}}));
ie.compile_model(model, deviceName));

ASSERT_THROW(compiled_model2.set_property({{configKey, configValue}}),
ov::Exception); // Expect to throw due to unimplemented method
Expand All @@ -327,8 +318,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkGetProperties
ClassPluginPropertiesTestSuite4NPU,
::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),
::testing::ValuesIn({std::make_pair<std::string, ov::Any>(
"THISCONFIGKEYNOTEXIST", ov::Any("THISCONFIGVALUENOTEXIST"))}),
::testing::ValuesIn(properties)),
"THISCONFIGKEYNOTEXIST", ov::Any("THISCONFIGVALUENOTEXIST"))})),
ClassPluginPropertiesTestSuite4NPU::getTestCaseName);

} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -580,19 +580,6 @@ std::vector<std::string> disabledTestPatterns() {
".*smoke_MemoryLSTMCellTest.*"
});

// [Track number: E#118999]
_skipRegistry.addPatterns(backendName.isZero(),
"Newly enabled, never tested", {
".*smoke_BehaviorTests/OVCompiledGraphImportExportTest.importExportedFunctionConstantResultOnly.*",
".*smoke_BehaviorTests_OVClassImportExportTestP/OVClassCompiledModelImportExportTestP.smoke_ImportNetworkThrowWithDeviceName.*",
".*ClassExecutableNetworkTestSuite1NPU.PropertyIsSupportedAndImmutableAndGet.*",
".*ClassExecutableNetworkTestSuite2NPU.PropertyIsSupportedAndImmutableAndCanNotSet.*",
".*smoke_BehaviorTests_ClassPluginPropertiesTest/ClassPluginPropertiesTestSuite2NPU.CanNotSetImmutableProperty.*",
".*smoke_BehaviorTests_ClassPluginPropertiesOptsTest1NPU/ClassPluginPropertiesTestSuite3NPU.CanGetPropertyWithOptionsNotAffectingCore.*",
".*ClassPluginPropertiesTestSuite4NPU.CanNotSetGetInexistentProperty.*",
".*BehaviorTests_OVCheckSetSupportedRWMandatoryMetricsPropsTests/OVCheckSetSupportedRWMetricsPropsTests.ChangeCorrectProperties.*"
});

_skipRegistry.addPatterns(!backendName.isZero() || !devices.has3720(),
"QueryNetwork is only supported by 3720 platform", {
".*QueryNetworkTestSuite.*"
Expand Down

0 comments on commit 0ba1be0

Please sign in to comment.