[Build] 'DXCoreHardwareIDParts': undeclared identifier
I'm building commit f217402897f40ebba457e2421bc0a4702771968e on Windows with these settings:
cmake -G"Visual Studio 17 2022" -T host=x64 -A x64 ^
--compile-no-warning-as-error ^
%= GENERAL FLAGS =% ^
-DCMAKE_INSTALL_PREFIX=%output_dir% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_SKIP_BUILD_RPATH=On ^
-DCMAKE_C_FLAGS_RELEASE="/MT -DORT_DLL_IMPORT" ^
-DCMAKE_CXX_FLAGS_RELEASE="/MT -DORT_DLL_IMPORT" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>" ^
%= ONNXRUNTIME SPECIFIC =% ^
-Donnxruntime_BUILD_SHARED_LIB=ON ^
-Donnxruntime_USE_DNNL=ON ^
-Donnxruntime_USE_DML=ON ^
-Donnxruntime_USE_CUSTOM_DIRECTML=ON ^
-Ddml_INCLUDE_DIR=%directml_dir:\=/%\include ^
-Ddml_LIB_DIR=%directml_dir:\=/%\bin\x64-win ^
-Donnxruntime_USE_TELEMETRY=OFF ^
-Donnxruntime_BUILD_UNIT_TESTS=OFF ^
-Donnxruntime_DISABLE_RTTI=OFF %= see Readme =%^
-DONNX_USE_MSVC_STATIC_RUNTIME=ON ^
-Dprotobuf_MSVC_STATIC_RUNTIME=ON ^
%= OPENMP =% ^
-DOpenMP_C_FLAGS="-I%mkl_dir:\=/% /openmp" ^
-DOpenMP_CXX_FLAGS="-I%mkl_dir:\=/% /openmp" ^
-DOpenMP_C_LIB_NAMES="libiomp5" ^
-DOpenMP_CXX_LIB_NAMES="libiomp5" ^
-DOpenMP_libiomp5_LIBRARY="%mkl_dir:\=/%/libiomp5md.lib" ^
%onnxruntime_dir%\cmake
When building with Windows SDK 10.0.19041.0 compilation fails with this error:
onnxruntime\onnxruntime\core\platform\windows\device_discovery.cc(340,7): error C2065: 'DXCoreHardwareIDParts': undeclared identifier
When using SDK 10.0.22621.0 instead, the build completes.
Questions:
- Is there a way to build with DML support using SDK 10.0.19041.0, possibly selecting a different commit for the codebase?
- My goal is to produce a build which works on Windows 11 and Windows 10 21H2. Is
DXCoreHardwareIDPartsavailable in the Windows 10 runtime?
The build error is broader and not related to the DML EP specifically. @skottmckay would know more about device selection. @jywu-msft also noted here that there were build failures with a missing dxcore header (perhaps using an older SDK).
@fdwr @skottmckay @jywu-msft a ping on this
When using SDK 10.0.22621.0 instead, the build completes
Build with 10.0.22621.0? The SDK you use is independent from your target OS, as I can build my apps using even the very latest SDK and still target Windows 7.
same issue with Windows SDK 10.0.19041.0
Applying stale label due to no activity in 30 days