[Build] Windows MSVC DNNL build requires <chrono> include #23854
Labels
build
build issues; typically submitted using template
platform:windows
issues related to the Windows platform
Describe the issue
I get a build error on MSVC because chrono is not included in this file, it makes use of std::chrono
onnxruntime-1.20.2\include\onnxruntime\core\platform\ort_mutex.h
adding:
fixes the build issue.
Urgency
No response
Target platform
Windows 11 x64
Build script
set(onnxruntime_ENABLE_PYTHON OFF)
set(onnxruntime_USE_CUDA OFF)
set(onnxruntime_USE_DNNL ON)
set(onnxruntime_BUILD_FOR_NATIVE_MACHINE ON)
set(onnxruntime_USE_AVX ON)
set(onnxruntime_USE_AVX2 OFF)
set(onnxruntime_USE_AVX512 OFF)
set(onnxruntime_ENABLE_LTO ON)
set(onnxruntime_DNNL_GPU_RUNTIME "C:\Program Files (x86)\Intel\oneAPI\dnnl\2025.0")
set(onnxruntime_DNNL_OPENCL_ROOT ${CMAKE_SOURCE_DIR}/${OPEN_CL_DIR})
add_definitions("-D_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS=1")
add_subdirectory(${ONNX_DIR}/cmake)
Error / output
std::chrono does not contain system_clock
Visual Studio Version
VS 2022
GCC / Compiler Version
Microsoft (R) C/C++ Optimizing Compiler Version 19.43.34808 for x86
The text was updated successfully, but these errors were encountered: