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]: The lstmsequence model cannot be compiled on npu device. #24969

Open
3 tasks done
luaperl opened this issue Jun 12, 2024 · 0 comments
Open
3 tasks done

[Bug]: The lstmsequence model cannot be compiled on npu device. #24969

luaperl opened this issue Jun 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working category: NPU OpenVINO NPU plugin support_request

Comments

@luaperl
Copy link

luaperl commented Jun 12, 2024

OpenVINO Version

2024.1.0

Operating System

Windows System

Device used for inference

NPU

Framework

None

Model used

Custom

Issue description

I defined the model using openvino opset's lstmsequence and compiled it with an NPU device, but it failed.
It compiled normally on CPU and GPU.
NPU driver was installed using this link.

If it was my mistake, please let me know what I did wrong.

  • Env
    • CPU: Intel(R) Core(TM) Ultra 8 155H
    • Window version: 23H2 22631.3737
    • NPU driver version: npu_win_32.0.100.2408

Step-by-step reproduction

import openvino as ov 
ops = ov.runtime.opset13

# param 
B = 1 
T = 300
D = 512
H = 256
DIR = 2

# set input for lstm
X                    = ops.parameter([B, T, D], ov.Type.f32)
initial_hidden_state = ops.parameter([B, DIR, H], ov.Type.f32)
initial_cell_state   = ops.parameter([B, DIR, H], ov.Type.f32)
sequence_lengths     = ops.parameter([B], ov.Type.i64)
W                    = ops.parameter([DIR, 4*H, D], ov.Type.f32)
R                    = ops.parameter([DIR, 4*H, H], ov.Type.f32)
B                    = ops.parameter([DIR, 4*H], ov.Type.f32)

# define and compile model 
lstm = ops.lstm_sequence(
    X=X, 
    initial_hidden_state=initial_hidden_state, 
    initial_cell_state=initial_cell_state, 
    sequence_lengths=sequence_lengths, 
    W=W, 
    R=R, 
    B=B, 
    hidden_size=H,
    direction="bidirectional",
)
model = ov.Model([lstm.output(0), lstm.output(1), lstm.output(2)], [X, initial_hidden_state, initial_cell_state, sequence_lengths, W, R, B], "Model")
model = ov.compile_model(model, "NPU")
print(model)

Relevant log output

Traceback (most recent call last):
  File "C:\Users\test\Desktop\noah\redle\test.py", line 33, in <module>
    model = ov.compile_model(model, "NPU")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\openvino\runtime\ie_api.py", line 609, in compile_model
    return core.compile_model(model, device_name, {} if config is None else config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\test\AppData\Local\Programs\Python\Python312\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. nGraph TensorIterator node 'LSTMSequence_1568' has incompatible output number 6 with its body outputs descriptions concatOutput '1' + invariantOutput '2'
Failed to create executable

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.
@luaperl luaperl added bug Something isn't working support_request labels Jun 12, 2024
@rkazants rkazants added category: NPU OpenVINO NPU plugin labels Jun 12, 2024
@ArtemySkrebkov ArtemySkrebkov self-assigned this Jun 12, 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

5 participants