Add support of f64/i64 for tests/ (#15029)

This commit is contained in:
Vitaliy Urusovskij 2023-01-11 12:17:47 +04:00 committed by GitHub
parent 2e10a1cb13
commit c7a1468fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -26,6 +26,8 @@ void fillBlobs(InferenceEngine::InferRequest inferRequest,
auto image_size = input_image_sizes.at(0);
if (item.second->getPrecision() == InferenceEngine::Precision::FP32) {
fillBlobImInfo<float>(inputBlob, batchSize, image_size);
} else if (item.second->getPrecision() == InferenceEngine::Precision::FP64) {
fillBlobImInfo<double>(inputBlob, batchSize, image_size);
} else if (item.second->getPrecision() == InferenceEngine::Precision::FP16) {
fillBlobImInfo<short>(inputBlob, batchSize, image_size);
} else if (item.second->getPrecision() == InferenceEngine::Precision::I32) {
@ -42,6 +44,8 @@ void fillBlobs(InferenceEngine::InferRequest inferRequest,
// Fill random
if (item.second->getPrecision() == InferenceEngine::Precision::FP32) {
fillBlobRandom<float>(inputBlob);
} else if (item.second->getPrecision() == InferenceEngine::Precision::FP64) {
fillBlobRandom<double>(inputBlob);
} else if (item.second->getPrecision() == InferenceEngine::Precision::FP16) {
fillBlobRandom<short>(inputBlob);
} else if (item.second->getPrecision() == InferenceEngine::Precision::I32) {

View File

@ -134,10 +134,14 @@ void fillTensors(ov::InferRequest &infer_request, std::vector<T> &inputs) {
if (inputs[i].get_element_type() == ov::element::f32) {
input_tensor = fillTensorRandom<T, float>(inputs[i]);
} else if (inputs[i].get_element_type() == ov::element::f64) {
input_tensor = fillTensorRandom<T, double>(inputs[i]);
} else if (inputs[i].get_element_type() == ov::element::f16) {
input_tensor = fillTensorRandom<T, short>(inputs[i]);
} else if (inputs[i].get_element_type() == ov::element::i32) {
input_tensor = fillTensorRandom<T, int32_t>(inputs[i]);
} else if (inputs[i].get_element_type() == ov::element::i64) {
input_tensor = fillTensorRandom<T, int64_t>(inputs[i]);
} else if (inputs[i].get_element_type() == ov::element::u8) {
input_tensor = fillTensorRandom<T, uint8_t>(inputs[i]);
} else if (inputs[i].get_element_type() == ov::element::i8) {

View File

@ -143,10 +143,14 @@ void fillTensorsWithSpecifiedShape(ov::InferRequest& infer_request, std::vector<
if (inputs[i].get_element_type() == ov::element::f32) {
input_tensor = fillTensorRandomDynamic<float>(inputs[i], inputShape);
} else if (inputs[i].get_element_type() == ov::element::f64) {
input_tensor = fillTensorRandomDynamic<double>(inputs[i], inputShape);
} else if (inputs[i].get_element_type() == ov::element::f16) {
input_tensor = fillTensorRandomDynamic<short>(inputs[i], inputShape);
} else if (inputs[i].get_element_type() == ov::element::i32) {
input_tensor = fillTensorRandomDynamic<int32_t>(inputs[i], inputShape);
} else if (inputs[i].get_element_type() == ov::element::i64) {
input_tensor = fillTensorRandomDynamic<int64_t>(inputs[i], inputShape);
} else if (inputs[i].get_element_type() == ov::element::u8) {
input_tensor = fillTensorRandomDynamic<uint8_t>(inputs[i], inputShape);
} else if (inputs[i].get_element_type() == ov::element::i8) {