mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
User/chrila/fix dml dx12 warning (#18746)
Update resource creation flag to avoid D3D12 WARNING ### Description Update the DML DX12 allocator to use D3D12_RESOUCE_STATE_COMMON to avoid DX12 Warning messages. ### Motivation and Context When directML is created with debug layer there are warnings when resources are created by ORT. --------- Co-authored-by: Christian Larson <28911437+chrilaMSFT@users.noreply.github.com>
This commit is contained in:
parent
623d957607
commit
c1ec3c3f93
3 changed files with 5 additions and 5 deletions
|
|
@ -16,7 +16,7 @@ namespace Dml
|
|||
unmove_ptr(CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT)),
|
||||
D3D12_HEAP_FLAG_NONE,
|
||||
&buffer,
|
||||
D3D12_RESOURCE_STATE_UNORDERED_ACCESS,
|
||||
D3D12_RESOURCE_STATE_COMMON,
|
||||
nullptr,
|
||||
IID_GRAPHICS_PPV_ARGS(resource.GetAddressOf())
|
||||
));
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace Dml
|
|||
&props,
|
||||
D3D12_HEAP_FLAG_NONE,
|
||||
&buffer,
|
||||
D3D12_RESOURCE_STATE_UNORDERED_ACCESS,
|
||||
D3D12_RESOURCE_STATE_COMMON,
|
||||
nullptr,
|
||||
IID_GRAPHICS_PPV_ARGS(resource.GetAddressOf())
|
||||
));
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace DmlGraphFusionHelper
|
|||
&heapProperties,
|
||||
D3D12_HEAP_FLAG_NONE,
|
||||
&resourceDesc,
|
||||
D3D12_RESOURCE_STATE_UNORDERED_ACCESS,
|
||||
D3D12_RESOURCE_STATE_COMMON,
|
||||
nullptr,
|
||||
IID_GRAPHICS_PPV_ARGS(buffer.GetAddressOf())));
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ namespace DmlGraphFusionHelper
|
|||
&heapProperties,
|
||||
D3D12_HEAP_FLAG_NONE,
|
||||
&resourceDesc,
|
||||
D3D12_RESOURCE_STATE_UNORDERED_ACCESS,
|
||||
D3D12_RESOURCE_STATE_COMMON,
|
||||
nullptr,
|
||||
IID_GRAPHICS_PPV_ARGS(buffer.GetAddressOf())));
|
||||
|
||||
|
|
@ -302,7 +302,7 @@ namespace DmlGraphFusionHelper
|
|||
for (size_t i = 0; i < graphDesc.nodes.size(); ++i)
|
||||
{
|
||||
auto& nodeInfo = graphDesc.nodes[i];
|
||||
|
||||
|
||||
if (std::holds_alternative<Microsoft::WRL::ComPtr<IDMLOperator>>(nodeInfo.nodeDef))
|
||||
{
|
||||
dmlOperatorGraphNodes[i] = DML_OPERATOR_GRAPH_NODE_DESC{std::get<Microsoft::WRL::ComPtr<IDMLOperator>>(nodeInfo.nodeDef).Get(), nodeInfo.name.data()};
|
||||
|
|
|
|||
Loading…
Reference in a new issue