system: nightly pytorch 2.9+cu128 RTX 5090
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1134): error C2872: 'std': ambiguous symbol
C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/include\valarray(20): note: could be 'std'
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1134): note: or 'std'
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1134): note: the template instantiation context (the oldest one first) is
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1181): note: see reference to class template instantiation 'torch::dynamo::autograd::IValuePacker<__int64>' being compiled
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1108): note: while compiling class template member function 'c10::TypePtr torch::dynamo::autograd::IValuePacker<__int64>::packed_type(void)'
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1181): note: see the first reference to 'torch::dynamo::autograd::IValuePacker<__int64>::packed_type' in 'torch::dynamo::autograd::IValuePacker<unsigned __int64>::packed_type'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "C:\Users\rst22\.venv\Lib\site-packages\torch\utils\cpp_extension.py", line 2595, in _run_ninja_build
subprocess.run(
File "C:\Program Files\Python312\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
DISCLAIMER: I know sod all about python or coding I was just troubleshooting with google gemini and it said:
error C2872: 'std': ambiguous symbol
This is a C++ compiler error. It means that the compiler found two different definitions for the symbol 'std'. The compiler can't decide which one to use, so it stops and reports an error.
The error message also tells us exactly where the conflict is:
One definition of std is coming from a standard C++ header file in your Visual Studio installation (valarray).
The other definition is coming from a PyTorch header file (compiled_autograd.h).
This is a compatibility issue between PyTorch and the C++ standard library headers in your Visual Studio installation. It's a bug in the SageAttention source code, not in your system configuration
system: nightly pytorch 2.9+cu128 RTX 5090
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1134): error C2872: 'std': ambiguous symbol
C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/include\valarray(20): note: could be 'std'
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1134): note: or 'std'
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1134): note: the template instantiation context (the oldest one first) is
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1181): note: see reference to class template instantiation 'torch::dynamo::autograd::IValuePacker<__int64>' being compiled
C:/Users/rst22/.venv/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1108): note: while compiling class template member function 'c10::TypePtr torch::dynamo::autograd::IValuePacker<__int64>::packed_type(void)'
DISCLAIMER: I know sod all about python or coding I was just troubleshooting with google gemini and it said:
error C2872: 'std': ambiguous symbol
This is a C++ compiler error. It means that the compiler found two different definitions for the symbol 'std'. The compiler can't decide which one to use, so it stops and reports an error.
The error message also tells us exactly where the conflict is:
One definition of std is coming from a standard C++ header file in your Visual Studio installation (valarray).
The other definition is coming from a PyTorch header file (compiled_autograd.h).
This is a compatibility issue between PyTorch and the C++ standard library headers in your Visual Studio installation. It's a bug in the SageAttention source code, not in your system configuration