[CPU] ROIAlign tests enabled (#8910)

This commit is contained in:
Vladislav Golubev 2021-12-08 12:07:58 +03:00 committed by GitHub
parent 07b6489524
commit 55955f7ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 15 deletions

View File

@ -165,8 +165,6 @@ std::vector<std::string> disabledTestPatterns() {
// Failure happened on win and macos for current seeds.
R"(.*CTCLossLayerTest.*CMR=1.*)",
R"(.*CTCLossLayerCPUTest.*ctcMergeRepeated=1.*)",
// Issue: 72151
R"(.*smoke_ROIAlignLayoutTest.*)",
};
#define FIX_62820 0

View File

@ -94,17 +94,17 @@ protected:
auto coordsTensorData = static_cast<float*>(coordsTensor.data());
for (size_t i = 0; i < coordsTensor.get_size(); i += 4) {
coordsTensorData[i] = 1.f;
coordsTensorData[i] = 1.f;
coordsTensorData[i] = 19.f;
coordsTensorData[i] = 19.f;
coordsTensorData[i + 1] = 1.f;
coordsTensorData[i + 2] = 19.f;
coordsTensorData[i + 3] = 19.f;
}
} else if (coordsET == ElementType::bf16) {
auto coordsTensorData = static_cast<std::int16_t*>(coordsTensor.data());
for (size_t i = 0; i < coordsTensor.get_size(); i += 4) {
coordsTensorData[i] = static_cast<std::int16_t>(ngraph::bfloat16(1.f).to_bits());
coordsTensorData[i] = static_cast<std::int16_t>(ngraph::bfloat16(1.f).to_bits());
coordsTensorData[i] = static_cast<std::int16_t>(ngraph::bfloat16(19.f).to_bits());
coordsTensorData[i] = static_cast<std::int16_t>(ngraph::bfloat16(19.f).to_bits());
coordsTensorData[i + 1] = static_cast<std::int16_t>(ngraph::bfloat16(1.f).to_bits());
coordsTensorData[i + 2] = static_cast<std::int16_t>(ngraph::bfloat16(19.f).to_bits());
coordsTensorData[i + 3] = static_cast<std::int16_t>(ngraph::bfloat16(19.f).to_bits());
}
} else {
IE_THROW() << "roi align. Unsupported precision: " << coordsET;
@ -112,13 +112,10 @@ protected:
auto roisIdxTensor = ov::runtime::Tensor{ funcInputs[2].get_element_type(), targetInputStaticShapes[2] };
auto roisIdxTensorData = static_cast<std::int32_t*>(roisIdxTensor.data());
if (roisIdxTensor.get_size() == 1) {
roisIdxTensorData[0] = 1;
} else if (roisIdxTensor.get_size() == 2) {
roisIdxTensorData[0] = 0;
roisIdxTensorData[1] = 1;
} else {
IE_THROW() << "Unexpected roiIdx size: " << roisIdxTensor.get_size();
std::int32_t batchIdx = 0;
for (int i = 0; i < roisIdxTensor.get_size(); i++) {
roisIdxTensorData[i] = batchIdx;
batchIdx = (batchIdx + 1) % targetInputStaticShapes[0][0];
}
inputs.insert({ funcInputs[0].get_node_shared_ptr(), data_tensor });