[conformance] Add shape mode and graph conv logic to test name (#19403)

This commit is contained in:
Sofya Balandina 2023-08-25 00:03:13 +01:00 committed by GitHub
parent c5b64e458b
commit 20e4c629e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,9 @@ std::string ReadIRTest::getTestCaseName(const testing::TestParamInfo<ReadIRParam
std::reverse(splittedFilename.begin(), splittedFilename.end());
bool is_valid_path_format = true;
std::string subgrapth_dir = "subgraph";
std::vector<std::string> graphConvertLogicTypes = { "fused_names", "repeat_pattern" };
// Check that op is valid
if (splittedFilename.size() > 2) {
auto pos = splittedFilename[2].find('-');
@ -72,22 +75,34 @@ std::string ReadIRTest::getTestCaseName(const testing::TestParamInfo<ReadIRParam
}
message += "_";
result << message;
} else {
} else if (splittedFilename[2] != subgrapth_dir) {
is_valid_path_format = false;
}
}
// Check the element_type
if (splittedFilename.size() > 1) {
if (std::find(ov::test::conformance::element_type_names.begin(),
ov::test::conformance::element_type_names.end(),
splittedFilename[1]) != ov::test::conformance::element_type_names.end()) {
result << "Type=" << splittedFilename[1] << "_";
} else if (std::find(graphConvertLogicTypes.begin(),
graphConvertLogicTypes.end(),
splittedFilename[1]) != graphConvertLogicTypes.end()) {
result << "ConvertLogic=" << splittedFilename[1] << "_";
} else {
is_valid_path_format = false;
}
}
result << "IR=" << (is_valid_path_format ? ov::test::utils::replaceExt(splittedFilename[0], "") : path_to_model) << "_";
result << "Device=" << deviceName << "_";
std::vector<std::string> shapeModes = { "static", "dynamic" };
// Check the shape type
if (splittedFilename.size() > 3 &&
std::find(shapeModes.begin(), shapeModes.end(), splittedFilename[3]) != shapeModes.end()) {
result << "Shape=" << splittedFilename[3] << "_";
}
result << "Config=(";
auto configItem = config.begin();
while (configItem != config.end()) {