mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Fix build warnings and address PR comment
This commit is contained in:
parent
1621a1fef1
commit
407492472f
4 changed files with 6 additions and 6 deletions
|
|
@ -515,7 +515,6 @@ if (onnxruntime_USE_DML)
|
|||
target_link_libraries(${target} PRIVATE "${DML_PACKAGE_DIR}/bin/${onnxruntime_target_platform}/DirectML.lib")
|
||||
target_compile_definitions(${target} PRIVATE DML_TARGET_VERSION_USE_LATEST)
|
||||
endif()
|
||||
target_link_options(${target} PUBLIC /DELAYLOAD:directml.dll /DELAYLOAD:dxgi.dll /DELAYLOAD:d3d11.dll /DELAYLOAD:d3d12.dll)
|
||||
endfunction()
|
||||
|
||||
target_add_dml(onnxruntime_providers_dml)
|
||||
|
|
@ -527,7 +526,7 @@ if (onnxruntime_USE_DML)
|
|||
target_link_libraries(onnxruntime_providers_dml PRIVATE delayimp.lib)
|
||||
endif()
|
||||
|
||||
set(onnxruntime_DELAYLOAD_FLAGS "${onnxruntime_DELAYLOAD_FLAGS} /DELAYLOAD:DirectML.dll /DELAYLOAD:d3d12.dll /DELAYLOAD:dxgi.dll")
|
||||
set(onnxruntime_DELAYLOAD_FLAGS "${onnxruntime_DELAYLOAD_FLAGS} /DELAYLOAD:DirectML.dll /DELAYLOAD:d3d12.dll /DELAYLOAD:dxgi.dll /ignore:4199")
|
||||
|
||||
# The DML EP requires C++17
|
||||
set_target_properties(onnxruntime_providers_dml PROPERTIES CXX_STANDARD 17)
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ set_target_properties(winml_adapter
|
|||
target_link_libraries(winml_adapter PRIVATE wil)
|
||||
if (onnxruntime_USE_DML)
|
||||
target_add_dml(winml_adapter)
|
||||
endif(onnxruntime_USE_DML)
|
||||
endif()
|
||||
|
||||
# add it to the onnxruntime shared library
|
||||
set(onnxruntime_winml winml_adapter)
|
||||
|
|
@ -593,7 +593,7 @@ set_target_properties(winml_dll
|
|||
set(os_component_link_flags_list ${os_component_link_flags})
|
||||
separate_arguments(os_component_link_flags_list)
|
||||
|
||||
target_link_options(winml_dll PRIVATE /DEF:${WINML_DIR}/winml.def ${os_component_link_flags_list} /DELAYLOAD:api-ms-win-core-libraryloader-l1-2-1.dll /DELAYLOAD:api-ms-win-core-threadpool-legacy-l1-1-0.dll /DELAYLOAD:api-ms-win-core-processtopology-obsolete-l1-1-0.dll /DELAYLOAD:api-ms-win-core-kernel32-legacy-l1-1-0.dll /DELAYLOAD:d3d12.dll /DELAYLOAD:d3d11.dll /DELAYLOAD:dxgi.dll)
|
||||
target_link_options(winml_dll PRIVATE /DEF:${WINML_DIR}/winml.def ${os_component_link_flags_list} /DELAYLOAD:api-ms-win-core-libraryloader-l1-2-1.dll /DELAYLOAD:api-ms-win-core-threadpool-legacy-l1-1-0.dll /DELAYLOAD:api-ms-win-core-processtopology-obsolete-l1-1-0.dll /DELAYLOAD:api-ms-win-core-kernel32-legacy-l1-1-0.dll /DELAYLOAD:d3d12.dll /DELAYLOAD:d3d11.dll /DELAYLOAD:dxgi.dll /DELAYLOAD:directml.dll)
|
||||
|
||||
|
||||
if (EXISTS ${dxcore_header})
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace Dml
|
|||
m_readbackHeap = CreateReadbackHeap(m_device.Get(), m_capacity);
|
||||
}
|
||||
|
||||
assert(gsl::narrow_cast<ptrdiff_t>(m_readbackHeap->GetDesc().Width) >= size);
|
||||
assert(m_readbackHeap->GetDesc().Width >= size);
|
||||
}
|
||||
|
||||
void ReadbackHeap::ReadbackFromGpu(
|
||||
|
|
|
|||
|
|
@ -188,10 +188,11 @@ namespace ImageTestHelper {
|
|||
|
||||
// Create the GPU upload buffer.
|
||||
auto heap_properties = CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_UPLOAD);
|
||||
auto buffer_desc = CD3DX12_RESOURCE_DESC::Buffer(bufferbytesize);
|
||||
WINML_EXPECT_NO_THROW(pD3D12Device->CreateCommittedResource(
|
||||
&heap_properties,
|
||||
D3D12_HEAP_FLAG_NONE,
|
||||
&CD3DX12_RESOURCE_DESC::Buffer(bufferbytesize),
|
||||
&buffer_desc,
|
||||
D3D12_RESOURCE_STATE_GENERIC_READ,
|
||||
nullptr,
|
||||
__uuidof(ID3D12Resource),
|
||||
|
|
|
|||
Loading…
Reference in a new issue