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

[Bug]: Mish activation function crashes openvino model benchmark on NPU #24461

Open
3 tasks done
EmbeddedPaul166 opened this issue May 10, 2024 · 0 comments
Open
3 tasks done
Assignees
Labels
bug Something isn't working category: NPU OpenVINO NPU plugin support_request

Comments

@EmbeddedPaul166
Copy link

OpenVINO Version

2024.1.0

Operating System

Windows System

Device used for inference

NPU

Framework

Keras (TensorFlow 2)

Model used

Custom

Issue description

Consider a following workflow:

  1. Custom convolutional model with dynamic shape and mish activation is created in Keras Tensorflow and saved in the saved_model format.
  2. Using model optimizer it's input shape is converted to constant and saved_model.bin and .xml files are generated.
  3. Using benchmark_app model is ran on NPU.

Problem: Adding mish activation function to convolutional layer makes benchmark_app crash on NPU.

Tests were performed on a laptop with Intel Core Ultra 7 155H CPU. Tensorflow version was 2.14.0.

Step-by-step reproduction

Step 1: Model creation in tensorflow

import tensorflow as tf
inp = tf.keras.Input((None, None, 1), dtype=tf.float32)
y = tf.keras.layers.Conv2D(32, (3, 3), padding='same', activation=tf.keras.activations.mish)(inp)
model = tf.keras.Model(inputs=inp, outputs=y)
tf.keras.models.save_model(model, 'test_model')

Step 2: Model conversion to openvino format

mo.exe --saved_model_dir .\test_model --input input_1 --input_shape [1,256,256,1]

Step 3: Performing benchmark on NPU

benchmark_app.exe -m saved_model.xml -hint ctput -data_shape "[1, 256, 256, 1]" -inference_only -report_type detailed_counters -d NPU

Relevant log output

[Step 1/11] Parsing and validating input arguments
[ INFO ] Parsing input parameters
[Step 2/11] Loading OpenVINO Runtime
[ INFO ] OpenVINO:
[ INFO ] Build ................................. 2024.1.0-15008-f4afc983258-releases/2024/1
[ INFO ]
[ INFO ] Device info:
[ INFO ] NPU
[ INFO ] Build ................................. 2024.1.0-15008-f4afc983258-releases/2024/1
[ INFO ]
[ INFO ]
[Step 3/11] Setting device configuration
[ WARNING ] Turn on performance counters for NPU device since report type is detailed_counters.
[Step 4/11] Reading model files
[ INFO ] Loading model files
[ INFO ] Read model took 4.51 ms
[ INFO ] Original model I/O parameters:
[ INFO ] Model inputs:
[ INFO ]     input_1 (node: input_1) : f32 / [...] / [1,256,256,1]
[ INFO ] Model outputs:
[ INFO ]     conv2d (node: model/conv2d/mul) : f32 / [...] / [1,256,256,32]
[Step 5/11] Resizing model to match image sizes and given batch
[ WARNING ] Input 'input_1' has static shape. Provided data shapes for this input will be ignored.
[ INFO ] Model batch size: 1
[Step 6/11] Configuring input of the model
[ INFO ] Model inputs:
[ INFO ]     input_1 (node: input_1) : f32 / [N,H,W,C] / [1,256,256,1]
[ INFO ] Model outputs:
[ INFO ]     conv2d (node: model/conv2d/mul) : f32 / [...] / [1,256,256,32]
[Step 7/11] Loading the model to the device
error: FeasibleAllocation failed : Scheduler failure, cannot schedule anything and there is no buffer to spill
[ ERROR ] Exception from src\inference\src\cpp\core.cpp:109:
Exception from src\inference\src\dev\plugin.cpp:54:
Exception from src\plugins\intel_npu\src\plugin\src\plugin.cpp:513:
Check 'result == ZE_RESULT_SUCCESS' failed at src\plugins\intel_npu\src\compiler\src\zero_compiler_in_driver.cpp:753:
Failed to compile network. L0 createGraph result: ZE_RESULT_ERROR_INVALID_ARGUMENT, code 0x78000004. Compilation failed
Failed to create executable



Traceback (most recent call last):
  File "C:\Users\user\micromamba\envs\opvtest\lib\site-packages\openvino\tools\benchmark\main.py", line 408, in main
    compiled_model = benchmark.core.compile_model(model, benchmark.device, device_config)
  File "C:\Users\user\micromamba\envs\opvtest\lib\site-packages\openvino\runtime\ie_api.py", line 521, in compile_model
    super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src\inference\src\cpp\core.cpp:109:
Exception from src\inference\src\dev\plugin.cpp:54:
Exception from src\plugins\intel_npu\src\plugin\src\plugin.cpp:513:
Check 'result == ZE_RESULT_SUCCESS' failed at src\plugins\intel_npu\src\compiler\src\zero_compiler_in_driver.cpp:753:
Failed to compile network. L0 createGraph result: ZE_RESULT_ERROR_INVALID_ARGUMENT, code 0x78000004. Compilation failed
Failed to create executable




[ INFO ] Statistics report is stored to benchmark_report.csv

Issue submission checklist

  • I'm reporting an issue. It's not a question.
  • I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
  • There is reproducer code and related data files such as images, videos, models, etc.
@EmbeddedPaul166 EmbeddedPaul166 added bug Something isn't working support_request labels May 10, 2024
@andrei-kochin andrei-kochin added the category: NPU OpenVINO NPU plugin label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working category: NPU OpenVINO NPU plugin support_request
Projects
None yet
Development

No branches or pull requests

4 participants