[DML EP] Use ORT node names in DML execution plans (#15411)

This commit is contained in:
Patrice Vignola 2023-04-12 16:44:53 -07:00 committed by GitHub
parent e361e3f138
commit fd7f0c3cfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,6 +194,11 @@ namespace Dml
DML_EXECUTION_FLAGS executionFlags = GetExecutionFlags();
ORT_THROW_IF_FAILED(dmlDevice1->CompileGraph(&graphDesc, executionFlags, IID_PPV_ARGS(&m_compiledOperator)));
// Static buffer (might truncate name) to avoid excessive dynamic allocation only for debugging purposes.
wchar_t nodeName[512];
ORT_THROW_IF_FAILED(kernelInfo.GetNodeWrapperInterface()->GetWideName(sizeof(nodeName), nodeName));
ORT_THROW_IF_FAILED(m_compiledOperator->SetName(nodeName));
UINT64 persistentResourceSize = m_compiledOperator->GetBindingProperties().PersistentResourceSize;
if (persistentResourceSize > 0)
{