Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Windows MSVC DNNL build requires <chrono> include #23854

Closed
Coder666 opened this issue Feb 28, 2025 · 1 comment
Closed

[Build] Windows MSVC DNNL build requires <chrono> include #23854

Coder666 opened this issue Feb 28, 2025 · 1 comment
Labels
build build issues; typically submitted using template platform:windows issues related to the Windows platform

Comments

@Coder666
Copy link

Coder666 commented Feb 28, 2025

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:

#include <chrono>

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

@Coder666 Coder666 added the build build issues; typically submitted using template label Feb 28, 2025
@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Feb 28, 2025
@snnn
Copy link
Member

snnn commented Feb 28, 2025

Will be fixed in the next release.
The header file no longer exists.

@snnn snnn closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template platform:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

2 participants