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

Whisper pipeline on NPU does not shutdown cleanly #1460

Open
kmaki565 opened this issue Jan 2, 2025 · 1 comment
Open

Whisper pipeline on NPU does not shutdown cleanly #1460

kmaki565 opened this issue Jan 2, 2025 · 1 comment
Assignees
Labels

Comments

@kmaki565
Copy link

kmaki565 commented Jan 2, 2025

Following the sample code, I can run inference of Whisper on NPU (Intel AI Boost) of my ThinkPad X1 Carbon Gen 12.

Although I am satisfied with the speed (much faster than one on CPU!) and output quality, I noticed the console turn to red after inference is finished.
image
This symptom occurs both with the Python and C++ samples if NPU is targeted when creating pipeline.

I set a breakpoint in WinDbg for the cpp sample to capture the point when the C++ exe writes something to console, then found an ANSI escape sequence ESC[31m was sent right before the program exited.
image

To know which function sends the escape sequence, I compiled the OpenVINO binaries with RelWithDebInfo and place the binaries to the same folder as the C++ sample. Then output was like this:
image

Note this time the console was properly reset after a log message was output as red. I am suspecting that when the original issue occurred, the pipeline wasn't properly destructed and the program exited before the whole error log message was output to console.

I can workaround this issue by calling the destructor of the WhisperPipeline explicitly before exiting main but wonder if there are more graceful ways.
image

Questions are:

  • What does the error message indicate?
  • Can the library be updated to handle the cleanup gracefully or should the programmer need to care?

Thanks for your support and the great libraries!

@kmaki565
Copy link
Author

kmaki565 commented Jan 4, 2025

I noticed the above code change could cause application crash at the exit timing. I can't workaround the issue as of now.

@kmaki565 kmaki565 changed the title Running Whisper on NPU leaves the console red Whisper pipeline on NPU does not shutdown cleanly Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants