Git Product home page Git Product logo

Comments (4)

NarutoUA avatar NarutoUA commented on July 19, 2024 1

Documentation states DirectML doesn't support parallel execution mode:

The DirectML execution provider does not support the use of memory pattern optimizations or parallel execution in onnxruntime. When supplying session options during InferenceSession creation, these options must be disabled or an error will be returned.

If creating the onnxruntime InferenceSession object directly, you must set the appropriate fields on the onnxruntime::SessionOptions struct. Specifically, execution_mode must be set to ExecutionMode::ORT_SEQUENTIAL, and enable_mem_pattern must be false.

Additionally, as the DirectML execution provider does not support parallel execution, it does not support multi-threaded calls to Run on the same inference session. That is, if an inference session using the DirectML execution provider, only one thread may call Run at a time. Multiple threads are permitted to call Run simultaneously if they operate on different inference session objects.

https://onnxruntime.ai/docs/execution-providers/DirectML-ExecutionProvider.html#configuration-options

from onnxruntime.

Rikyf3 avatar Rikyf3 commented on July 19, 2024

Interesting... the code was tested on multiple windows pcs and we have never experienced errors.
As stated above I am not able to reproduce the issue myself. As soon as I hear a feedback I will close the issue if the problem has been solved.
Thanks!

from onnxruntime.

fdwr avatar fdwr commented on July 19, 2024

Interesting... the code was tested on multiple windows pcs and we have never experienced errors.

It's possible to get lucky, but that setting is unsupported.

Can you get more info using the graphics and DML debug layer? It's probably already installed you have Visual Studio installed, but otherwise: https://learn.microsoft.com/en-us/windows/ai/directml/dml-debug-layer. Then:

  • Start / Run / dxcpl.exe
  • Add your process .exe path to the list.
  • Then Force debug messages on.
  • You should see additional output in the Visual Studio Output window, a different debugger of your choice, or via DebugView.

image

from onnxruntime.

Rikyf3 avatar Rikyf3 commented on July 19, 2024

I have noted that all the hardware involved even if it supports DirectX12 has a maximum feature level of 11_1. Does DirectML execution require feature level 12_0? I cannot find any reference to this in the documentation.

from onnxruntime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.