-
Notifications
You must be signed in to change notification settings - Fork 238
Open
Description
Untitled Document
Describe the bug
After initializing the model using OnnxRuntimeGenAIChatClient in WINUI3, when entering S4, we observed that the memory usage of the NPU has dropped to 0, but the OnnxRuntimeGenAIChatClient was not released. During inference, it remains in the inference state without any data returned. Therefore, we added Dispose() when entering S4. However, an uncatchable crash occurs when calling dispose() on OnnxRuntimeGenAIChatClient while entering S4.
PowerManager.SystemSuspendStatusChanged += PowerManager_SystemSuspendStatusChanged;
private void PowerManager_SystemSuspendStatusChanged(object sender, object e)
{
if (PowerManager.SystemSuspendStatus == SystemSuspendStatus.Entering)
{
try
{
model.Dispose();//model is OnnxRuntimeGenAIChatClient
}
catch
{
}
finally
{
}
}
Debug.WriteLine($"PowerManager_SystemSuspendStatusChanged:{Enum.GetName(PowerManager.SystemSuspendStatus)}");
}
To Reproduce
Steps to reproduce the behavior:
- Initialize the model
- Wait for the initialization to complete
- Enter S4 (if there is no crash, try entering S4 multiple times)
Expected behavior
The model should be released normally.
Desktop (please complete the following information)
- OS: Windows 11 Home 25H2 26200.6588
- OnnxRuntimeGenAI.QNN: 0.10.0
- NPU driver: 30.0.140.1000/30.0.145.1000
Additional context
You can add any other relevant information about the problem here.
Metadata
Metadata
Assignees
Labels
No labels