onnxruntime with use_dml mix build hanppen 错误使用 DML 执行提供程序时不支持启用内存模式

问题描述

在window环境下,使用--use_dml构建onnxruntime,我的命令是“

.\build.bat --update --build --build_shared_lib --build_wheel --config RelWithDebInfo --use_dml --cmake_generator "Visual Studio 16 2019"  --parallel --skip_tests".

最终构建成功,生成whl文件。然后

pip3 install *.whl 

.so 我可以使用 python 进行推理。但是发生了错误。 我的代码是“

session_1 = onnxruntime.InferenceSession(model_path,options)"

错误是 "2021-03-10 19:03:59.3618026 [W:onnxruntime:,inference_session.cc:411 onnxruntime::InferenceSession::RegisterExecutionProvider] 使用 DML 执行提供程序时不支持启用内存模式。因此在此会话中禁用它因为它使用 DML 执行提供程序。” 而且推理时间很长。 谁能告诉我为什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)