Use the DirectML and CPU nuget packages together in Windows App #425
Replies: 4 comments 3 replies
-
Hi @AshD, that should be possible if you use the DirectML package. If you already tried it and ran into issues, please let us know what the issues were |
Beta Was this translation helpful? Give feedback.
-
When I try to run the Phi-3-mini-128k-instruct-onnx\cpu_and_mobile\cpu-int4-rtn-block-32-acc-level-4 model with the DirectML package I get this error in generator.ComputeLogits(). Are you saying that I can use the DirectML package with the DirectML phi-3 model on a PC without a GPU and it will work? I had tried that with some DirectML Stable Diffusion Onnx models that I created and it did not throw an error but returned brown image on a PC without a GPU. I was told by the Microsoft Olive team, that that Onnx models optimized for DirectML and could not be used on a PC without a DirectML GPU. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hey @AshD, did have you tried this with the latest RC? |
Beta Was this translation helpful? Give feedback.
-
This works for smaller context sizes but fails for larger ones 64K context. I think you are aware of this bug, so I will close this one. |
Beta Was this translation helpful? Give feedback.
-
Background: Fusion Quill is a Windows AI Word processor and Chat app on the Microsoft Store. It currently uses llama.cpp to support multiple AI models and switches between using CUDA, ROC and CPU llama.cpp dlls depending on what the end user's PC capabilities.
How do I switch between using DirectML and CPU GenAI packages at runtime. If the user has a GPU, I want to use the Microsoft.ML.OnnxRuntimeGenAI.DirectML package with the corresponding DirectML model and if the user does not have a GPU, I want to the the Microsoft.ML.OnnxRuntimeGenAI package with the CPU version of the model.
Thanks,
Ash
Beta Was this translation helpful? Give feedback.
All reactions