diff --git a/DEPS b/DEPS index f51dec653..fb809954e 100644 --- a/DEPS +++ b/DEPS @@ -55,7 +55,7 @@ deps = { }, # GPGMM support for fast DML allocation and residency management. 'third_party/gpgmm': { - 'url': '{github_git}/intel/gpgmm.git@61fcfcbd872b7643423ac8c9555f3a6a366904ee', + 'url': '{github_git}/intel/gpgmm.git@ff03c9a0cea262e534d25257512f2ba2bdb8c2d4', 'condition': 'checkout_win', }, 'third_party/oneDNN': { diff --git a/src/webnn/native/dmlx/deps/src/device.cpp b/src/webnn/native/dmlx/deps/src/device.cpp index 6822c862c..9536f0535 100644 --- a/src/webnn/native/dmlx/deps/src/device.cpp +++ b/src/webnn/native/dmlx/deps/src/device.cpp @@ -21,7 +21,7 @@ SVDescriptorHeap::SVDescriptorHeap( ID3D12DescriptorHeap* SVDescriptorHeap::GetDescriptorHeap() const { ComPtr descriptorHeap; - m_Heap->As(&descriptorHeap); + m_Heap.As(&descriptorHeap); return descriptorHeap.Get(); } @@ -584,8 +584,8 @@ HRESULT Device::ExecuteCommandListAndWait() ID3D12CommandList* commandLists[] = { m_commandList.Get() }; if (m_residencyManager != nullptr){ - gpgmm::d3d12::ResidencySet* residencySets[] = { &m_residencySet }; - m_residencyManager->ExecuteCommandLists(m_commandQueue.Get(), commandLists, residencySets, ARRAYSIZE(commandLists)); + gpgmm::d3d12::ResidencyList* residencyLists[] = { &m_residencyList }; + m_residencyManager->ExecuteCommandLists(m_commandQueue.Get(), commandLists, residencyLists, ARRAYSIZE(commandLists)); } else { m_commandQueue->ExecuteCommandLists(ARRAYSIZE(commandLists), commandLists); } @@ -594,7 +594,7 @@ HRESULT Device::ExecuteCommandListAndWait() ReturnIfFailed(m_commandAllocator->Reset()); ReturnIfFailed(m_commandList->Reset(m_commandAllocator.Get(), nullptr)); - ReturnIfFailed(m_residencySet.Reset()); + ReturnIfFailed(m_residencyList.Reset()); return S_OK; } @@ -643,7 +643,7 @@ HRESULT Device::EnsureCpuBufferSize(uint64_t requestedSizeInBytes, _Inout_ ComPt ReturnIfFailed(CreateCpuCustomBuffer(m_resourceAllocator.Get(), newSize, buffer)); } - UpdateResidencyIfNeeded(buffer.Get(), &m_residencySet); + UpdateResidencyIfNeeded(buffer.Get(), &m_residencyList); return S_OK; } @@ -660,7 +660,7 @@ HRESULT Device::EnsureDefaultBufferSize(uint64_t requestedSizeInBytes, _Inout_ C ReturnIfFailed(CreateDefaultBuffer(m_resourceAllocator.Get(), newSize, buffer)); } - UpdateResidencyIfNeeded(buffer.Get(), &m_residencySet); + UpdateResidencyIfNeeded(buffer.Get(), &m_residencyList); return S_OK; } @@ -719,7 +719,7 @@ HRESULT Device::EnsureReadBackHeapSize(uint64_t requestedSizeInBytes) ReturnIfFailed(CreateReadBackBuffer(m_resourceAllocator.Get(), newSize, m_readbackHeap)); } - UpdateResidencyIfNeeded(m_readbackHeap.Get(), &m_residencySet); + UpdateResidencyIfNeeded(m_readbackHeap.Get(), &m_residencyList); return S_OK; } diff --git a/src/webnn/native/dmlx/deps/src/device.h b/src/webnn/native/dmlx/deps/src/device.h index 957ea4011..664402a75 100644 --- a/src/webnn/native/dmlx/deps/src/device.h +++ b/src/webnn/native/dmlx/deps/src/device.h @@ -98,7 +98,7 @@ namespace pydml Microsoft::WRL::ComPtr m_temporaryResource; Microsoft::WRL::ComPtr m_persistentResource; - gpgmm::d3d12::ResidencySet m_residencySet; + gpgmm::d3d12::ResidencyList m_residencyList; bool m_useCpuCustomHeapResources = false; bool m_useGpu = true; diff --git a/src/webnn/native/dmlx/deps/src/util.h b/src/webnn/native/dmlx/deps/src/util.h index 7f9d99459..4466575cd 100644 --- a/src/webnn/native/dmlx/deps/src/util.h +++ b/src/webnn/native/dmlx/deps/src/util.h @@ -116,9 +116,9 @@ struct DmlBufferArrayBinding } }; -inline void UpdateResidencyIfNeeded(gpgmm::d3d12::ResourceAllocation* resource, gpgmm::d3d12::ResidencySet* residencySet){ +inline void UpdateResidencyIfNeeded(gpgmm::d3d12::ResourceAllocation* resource, gpgmm::d3d12::ResidencyList* residencyList){ if (resource == nullptr) return; - residencySet->Insert(resource->GetMemory()); + residencyList->Add(resource->GetMemory()); } inline HRESULT CreateResource(