onnxruntime build with --enable_training option fails using MSVC v143 due to ambiguous definition of byte #19269
Labels
platform:windows
issues related to the Windows platform
training
issues related to ONNX Runtime training; typically submitted using template
Describe the issue
training_session_test_utils.cc fails to compile with the following error:
This is an STL issue described here: microsoft/STL#204 which references WinSDK issue https://microsoft.visualstudio.com/OS/_workitems/edit/11785508
The suggested workaround is to define
_HAS_STD_BYTE 0
before any include. While this solves the original issue it introduces a new error:because
std::byte
isn't defined anymore after adding the define. This makes it impossible to build the full training with tests on windows.To reproduce
I used to the following cmdline to trigger this problem using Visual Studio 2022 17.8.5.
Urgency
No response
Platform
Windows
OS Version
22H2
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
5f3113e
ONNX Runtime API
C++
Architecture
X64
Execution Provider
Other / Unknown
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: