[GPU] Use oneDNN gemm on DG2 in some cases (#12878)

* [GPU] Enable onednn gemm with some additional restrictions

* f64 support in c++ benchmark_app

* Fixed python benchmark_app
This commit is contained in:
Vladimir Paramuzov
2022-09-07 08:35:14 +04:00
committed by GitHub
parent d8b6f5485b
commit 734dcc93e9
7 changed files with 40 additions and 13 deletions
@@ -225,6 +225,13 @@ ov::Tensor get_image_tensor(const std::vector<std::string>& files,
inputInfo.second,
inputInfo.first,
filenames_used);
} else if (type == ov::element::f64) {
return create_tensor_from_image<double>(files,
inputId,
batchSize,
inputInfo.second,
inputInfo.first,
filenames_used);
} else if (type == ov::element::i32) {
return create_tensor_from_image<int32_t>(files,
inputId,
@@ -257,6 +264,8 @@ ov::Tensor get_im_info_tensor(const std::pair<size_t, size_t>& image_size,
auto type = inputInfo.second.type;
if (type == ov::element::f32) {
return create_tensor_im_info<float>(image_size, batchSize, inputInfo.second, inputInfo.first);
} else if (type == ov::element::f64) {
return create_tensor_im_info<double>(image_size, batchSize, inputInfo.second, inputInfo.first);
} else if (type == ov::element::f16) {
return create_tensor_im_info<short>(image_size, batchSize, inputInfo.second, inputInfo.first);
} else if (type == ov::element::i32) {
@@ -281,6 +290,13 @@ ov::Tensor get_binary_tensor(const std::vector<std::string>& files,
inputInfo.second,
inputInfo.first,
filenames_used);
} else if (type == ov::element::f64) {
return create_tensor_from_binary<double>(files,
inputId,
batchSize,
inputInfo.second,
inputInfo.first,
filenames_used);
} else if (type == ov::element::f16) {
return create_tensor_from_binary<short>(files,
inputId,
@@ -318,6 +334,8 @@ ov::Tensor get_random_tensor(const std::pair<std::string, benchmark_app::InputIn
auto type = inputInfo.second.type;
if (type == ov::element::f32) {
return create_tensor_random<float, float>(inputInfo.second);
} else if (type == ov::element::f64) {
return create_tensor_random<double, double>(inputInfo.second);
} else if (type == ov::element::f16) {
return create_tensor_random<short, short>(inputInfo.second);
} else if (type == ov::element::i32) {