0

I am using Windows.AI.MachineLearning. I can create a LearningModelSession that uses the CPU, but if I specify a DirectX device I have an access violation of private memory.

// Setting preferred inference device given user's intent  
m_inferenceDeviceSelected = m_useGPU ? LearningModelDeviceKind.DirectX : LearningModelDeviceKind.Cpu;   
m_device = new LearningModelDevice(m_inferenceDeviceSelected); // Executes w/ CPU or DirectX specified.
m_session = new LearningModelSession(m_model, m_device); // Access Violation Error w/ DirectX device

I am using the latest nVidia driver on a GeForce GTX 1050 Ti. I would appreciate any help with discovering why I cannot create a DirectX LearningModelSession.

sum1nil
  • 11
  • 5
  • Hey sum1nil, would you be able to provide us with some call stack / debug output / error code? **You can turn on GPU (D3D11 / D3D12 GPU) debug layer by running "dxcpl" **Refer here to capture TraceLogging messages: https://stackoverflow.com/questions/52977756/exception-the-parameter-is-incorrect-when-attempting-to-run-an-onnx-model-wi/ – Rylai Dec 06 '18 at 21:49
  • Thank you for the suggestion. I will have time today to focus on this. – sum1nil Dec 11 '18 at 15:01
  • I discovered while investigating using dxcpl that the libraries throwing errors belonged to nVidia e.g. nv*.dll. I did a clean install of the display drivers and the exception disappeared. The current nVidia driver I am using is 417.35. I appreciate the help. – sum1nil Dec 15 '18 at 21:59

1 Answers1

0

Glad I was able to help you debug your issue! Dxcpl is useful for turning on the GPU (D3D11 / D3D12 GPU) debug layer. In your case, it exposed the Nvidia display driver issue and a clean install resolved the exception.

Rylai
  • 116
  • 6