Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang complier for ANDROID on X86_64 - Benchmark_genai reports "CPU plugin does not support i64 for use with oneDNN." #28450

Open
vraghavulu opened this issue Jan 15, 2025 · 2 comments
Assignees
Labels
category: CPU OpenVINO CPU plugin platform: android OpenVINO on Android

Comments

@vraghavulu
Copy link

Openvino version: Master branch
Openvino genai: Master branch

When built with CLANG complier for Android with git command and cmake commands and executing benchmark_genai, the following error is reported.

Model used: Almost all models report this issue.

Error output:
Error sample 1:

134|base_aaos:/data/local/tmp/npu # ./benchmark_genai -m ../../npu/ov-models/openla/open_llama_7b_v2-int4-ov/ -d GPU -n2
Exception from src/inference/src/cpp/core.cpp:112:
Exception from src/inference/src/dev/plugin.cpp:53:
Exception from src/plugins/intel_cpu/src/dnnl_extension_utils.cpp:84:
CPU plugin does not support i64 for use with oneDNN.

Error Sample 2:
base_aaos:/data/local/tmp/npu # ./benchmark_genai -m ../../npu/ov-models/mistral-7b-instruct-v0.1-int4-ov/ -d GPU -n2
Exception from src/inference/src/cpp/core.cpp:112:
Exception from src/inference/src/dev/plugin.cpp:53:
Exception from src/plugins/intel_cpu/src/dnnl_extension_utils.cpp:84:
CPU plugin does not support i64 for use with oneDNN.

Git clone and build command:

  1. Git clone of openvino and openvino.genai as suggested by WIKI
    https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build_android.md
    This is my source tree structure in local machine:

Image

  1. CMAKE command: cmake -S $OPV_HOME_DIR/openvino -B $OPV_HOME_DIR/openvino-androidbuild -DCMAKE_INSTALL_PREFIX=$OPV_HOME_DIR/openvino-androidinstall -DCMAKE_TOOLCHAIN_FILE=$CURRENT_CMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Debug -DANDROID_ABI=$CURRENT_ANDROID_ABI -DANDROID_PLATFORM=$CURRENT_ANDROID_PLATFORM -DANDROID_STL=$CURRENT_ANDROID_STL -DTBB_DIR=$OPV_HOME_DIR/one-tbb-androidinstall/lib/cmake/TBB -DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer" -DOPENVINO_EXTRA_MODULES=$OPV_HOME_DIR/openvino.genai -DCPACK_ARCHIVE_COMPONENT_INSTALL=OFF -DENABLE_INTEL_NPU=OFF

  2. Build Command:
    cmake --build $OPV_HOME_DIR/openvino-androidbuild --target package -j

Workaround:
For this error and below patch causes to fix the issue and benchmark_genai starts to execute and run:
I understand this is not correct data type to be used. Please provide an appropriate resolution.

celadon@biaas-d119:~/workspace/openvino-android/openvino/src/plugins/intel_cpu
# git diff
diff --git a/src/plugins/intel_cpu/src/dnnl_extension_utils.cpp b/src/plugins/intel_cpu/src/dnnl_extension_utils.cpp
index 1c5598b6d5..3a723b8da0 100644
--- a/src/plugins/intel_cpu/src/dnnl_extension_utils.cpp
+++ b/src/plugins/intel_cpu/src/dnnl_extension_utils.cpp
@@ -80,6 +80,8 @@ dnnl::memory::data_type DnnlExtensionUtils::ElementTypeToDataType(const ov::elem
         return memory::data_type::f4_e2m1;
     case ov::element::undefined:
         return memory::data_type::undef;
+    case ov::element::i64:
+        return memory::data_type::f32;
     default: {
         OPENVINO_THROW("CPU plugin does not support ", elementType.to_string(), " for use with oneDNN.");
     }
@ilya-lavrenov ilya-lavrenov transferred this issue from openvinotoolkit/openvino.genai Jan 15, 2025
@ilya-lavrenov ilya-lavrenov added the category: CPU OpenVINO CPU plugin label Jan 15, 2025
@ilya-lavrenov ilya-lavrenov added the platform: android OpenVINO on Android label Jan 15, 2025
@vraghavulu
Copy link
Author

Can you please let know if there is an update on this issue?

@ilya-lavrenov
Copy link
Contributor

@vraghavulu please, try out #28610

@mg-intel mg-intel assigned allnes and unassigned maxnick Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin platform: android OpenVINO on Android
Projects
None yet
Development

No branches or pull requests

6 participants