You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when updated from cuda 12. to cuda 12.5 and using cuda::std::complex <<, >> (ostream,istream) operator cause to compilation error.
The compilation error are:
home/Yehonatans/CLionProjects/ComplexJitLtoProject/main.cu(9): error: no operator "<<" matches these operands
operand types are: std::ostream << Complex
std::cout<<a;
^
/usr/include/c++/11/ostream(283): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type ) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(__streambuf_type __sb);
^
/usr/include/c++/11/ostream(250): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(nullptr_t)
^
/usr/include/c++/11/ostream(245): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(const void ) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(const void __p)
^
/usr/include/c++/11/ostream(232): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(long double __f)
^
/usr/include/c++/11/ostream(224): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(float __f)
^
/usr/include/c++/11/ostream(220): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(double __f)
^
/usr/include/c++/11/ostream(205): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned long long) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(unsigned long long __n)
^
/usr/include/c++/11/ostream(201): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(long long) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(long long __n)
^
/usr/include/c++/11/ostream(192): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(unsigned int __n)
^
/usr/include/c++/11/ostream(189): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(int __n);
^
/usr/include/c++/11/ostream(181): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned short) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(unsigned short __n)
^
/usr/include/c++/11/ostream(178): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(short) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(short __n);
^
/usr/include/c++/11/ostream(174): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(bool __n)
^
/usr/include/c++/11/ostream(170): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned long) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(unsigned long __n)
^
/usr/include/c++/11/ostream(166): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(long) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(long __n)
^
/usr/include/c++/11/ostream(127): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base &()(std::ios_base &)) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(ios_base& (__pf) (ios_base&))
^
/usr/include/c++/11/ostream(117): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type &()(std::basic_ostream<_CharT, _Traits>::__ios_type &)) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(__ios_type& (__pf)(__ios_type&))
^
/usr/include/c++/11/ostream(108): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type &()(std::basic_ostream<_CharT, _Traits>::__ostream_type &)) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(__ostream_type& (__pf)(__ostream_type&))
^
/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/cuda/12.5/include/cuda/std/detail/libcxx/include/__type_traits/../cstddef(150): note #3326-D: function template "cuda::std::operator<<" does not match because argument #1 does not match parameter
operator<< (byte __lhs, _Integer __shift) noexcept
^
/usr/include/c++/11/cstddef(126): note #3326-D: function template "std::operator<<(std::byte, _IntegerType) noexcept" does not match because argument #1 does not match parameter
operator<<(byte __b, _IntegerType __shift) noexcept
^
/usr/include/c++/11/complex(555): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const std::complex<_Tp> &)" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
^
/usr/include/c++/11/ostream(750): note #3327-D: candidate function template "std::operator<<(_Ostream &&, const _Tp &)" failed deduction
operator<<(_Ostream&& __os, const _Tp& __x)
^
/usr/include/c++/11/ostream(629): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, const unsigned char )" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, const unsigned char __s)
^
/usr/include/c++/11/ostream(624): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, const signed char )" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, const signed char __s)
^
/usr/include/c++/11/ostream(611): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, const char )" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, const char __s)
^
/usr/include/c++/11/bits/ostream.tcc(321): note #3326-D: function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const char )" does not match because argument #2 does not match parameter
operator<<(basic_ostream<_CharT, _Traits>& __out, const char __s)
^
/usr/include/c++/11/ostream(594): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const _CharT )" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT __s)
^
/usr/include/c++/11/ostream(535): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, unsigned char)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
^
/usr/include/c++/11/ostream(530): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, signed char)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
^
/usr/include/c++/11/ostream(524): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, char)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, char __c)
^
/usr/include/c++/11/ostream(518): note #3326-D: function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, char)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
^
/usr/include/c++/11/ostream(513): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, _CharT)" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
^
/usr/include/c++/11/system_error(279): note #3326-D: function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const std::error_code &)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
^
/usr/include/c++/11/bits/basic_string.h(6531): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc> &)" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/include/c++/11/string_view(670): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, std::basic_string_view<_CharT, _Traits>)" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/include/c++/11/system_error(206): note #3328-D: built-in operator<<(, ) does not match because argument #1 does not match parameter
enable_if<is_error_code_enum<_ErrorCodeEnum>::value>::type>
``
How to Reproduce
Compile and execute the next code with the following setup
OS: rocky linux 9
Cuda version 12.5
C++ compiler clang or gcc11
The toy code to stimulate the issue is:
#include <iostream>
#include <cuda/std/complex>
int main()
{
using Complex = cuda::std::complex<float>;
Complex a(1,2);
std::cout<<a;
return 0;
}
### Expected behavior
The code should compile and work correctly
### Reproduction link
_No response_
### Operating System
Rocky linux 9
### nvidia-smi output
[yehonatans@srv12 build]$ nvidia-smi
Wed Sep 11 21:04:43 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1080 Ti Off | 00000000:02:00.0 Off | N/A |
| 18% 35C P5 16W / 250W | 0MiB / 11264MiB | 1% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 1 NVIDIA GeForce GTX 1080 Ti Off | 00000000:04:00.0 Off | N/A |
| 27% 43C P5 15W / 250W | 0MiB / 11264MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 2 NVIDIA GeForce GTX 1080 Ti Off | 00000000:83:00.0 Off | N/A |
| 22% 40C P0 59W / 250W | 0MiB / 11264MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 3 NVIDIA GeForce GTX 1080 Ti Off | 00000000:84:00.0 Off | N/A |
| 18% 35C P0 56W / 250W | 0MiB / 11264MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
### NVCC version
/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/cuda/12.5/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Jun__6_02:18:23_PDT_2024
Cuda compilation tools, release 12.5, V12.5.82
Build cuda_12.5.r12.5/compiler.34385749_0
The text was updated successfully, but these errors were encountered:
Is this a duplicate?
Type of Bug
Compile-time Error
Component
libcu++
Describe the bug
when updated from cuda 12. to cuda 12.5 and using cuda::std::complex <<, >> (ostream,istream) operator cause to compilation error.
home/Yehonatans/CLionProjects/ComplexJitLtoProject/main.cu(9): error: no operator "<<" matches these operands
operand types are: std::ostream << Complex
std::cout<<a;
^
/usr/include/c++/11/ostream(283): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type ) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(__streambuf_type __sb);
^
/usr/include/c++/11/ostream(250): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(nullptr_t)
^
/usr/include/c++/11/ostream(245): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(const void ) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(const void __p)
^
/usr/include/c++/11/ostream(232): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(long double __f)
^
/usr/include/c++/11/ostream(224): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(float __f)
^
/usr/include/c++/11/ostream(220): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(double __f)
^
/usr/include/c++/11/ostream(205): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned long long) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(unsigned long long __n)
^
/usr/include/c++/11/ostream(201): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(long long) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(long long __n)
^
/usr/include/c++/11/ostream(192): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(unsigned int __n)
^
/usr/include/c++/11/ostream(189): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(int __n);
^
/usr/include/c++/11/ostream(181): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned short) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(unsigned short __n)
^
/usr/include/c++/11/ostream(178): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(short) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(short __n);
^
/usr/include/c++/11/ostream(174): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(bool __n)
^
/usr/include/c++/11/ostream(170): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned long) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(unsigned long __n)
^
/usr/include/c++/11/ostream(166): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(long) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(long __n)
^
/usr/include/c++/11/ostream(127): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base &()(std::ios_base &)) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(ios_base& (__pf) (ios_base&))
^
/usr/include/c++/11/ostream(117): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type &()(std::basic_ostream<_CharT, _Traits>::__ios_type &)) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(__ios_type& (__pf)(__ios_type&))
^
/usr/include/c++/11/ostream(108): note #3326-D: function "std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type &()(std::basic_ostream<_CharT, _Traits>::__ostream_type &)) [with _CharT=char, _Traits=std::char_traits]" does not match because argument #1 does not match parameter
operator<<(__ostream_type& (__pf)(__ostream_type&))
^
/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/cuda/12.5/include/cuda/std/detail/libcxx/include/__type_traits/../cstddef(150): note #3326-D: function template "cuda::std::operator<<" does not match because argument #1 does not match parameter
operator<< (byte __lhs, _Integer __shift) noexcept
^
/usr/include/c++/11/cstddef(126): note #3326-D: function template "std::operator<<(std::byte, _IntegerType) noexcept" does not match because argument #1 does not match parameter
operator<<(byte __b, _IntegerType __shift) noexcept
^
/usr/include/c++/11/complex(555): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const std::complex<_Tp> &)" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
^
/usr/include/c++/11/ostream(750): note #3327-D: candidate function template "std::operator<<(_Ostream &&, const _Tp &)" failed deduction
operator<<(_Ostream&& __os, const _Tp& __x)
^
/usr/include/c++/11/ostream(629): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, const unsigned char )" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, const unsigned char __s)
^
/usr/include/c++/11/ostream(624): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, const signed char )" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, const signed char __s)
^
/usr/include/c++/11/ostream(611): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, const char )" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, const char __s)
^
/usr/include/c++/11/bits/ostream.tcc(321): note #3326-D: function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const char )" does not match because argument #2 does not match parameter
operator<<(basic_ostream<_CharT, _Traits>& __out, const char __s)
^
/usr/include/c++/11/ostream(594): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const _CharT )" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT __s)
^
/usr/include/c++/11/ostream(535): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, unsigned char)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
^
/usr/include/c++/11/ostream(530): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, signed char)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
^
/usr/include/c++/11/ostream(524): note #3326-D: function template "std::operator<<(std::basic_ostream<char, _Traits> &, char)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<char, _Traits>& __out, char __c)
^
/usr/include/c++/11/ostream(518): note #3326-D: function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, char)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
^
/usr/include/c++/11/ostream(513): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, _CharT)" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
^
/usr/include/c++/11/system_error(279): note #3326-D: function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const std::error_code &)" does not match because argument #2 does not match parameter
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
^
/usr/include/c++/11/bits/basic_string.h(6531): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc> &)" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/include/c++/11/string_view(670): note #3327-D: candidate function template "std::operator<<(std::basic_ostream<_CharT, _Traits> &, std::basic_string_view<_CharT, _Traits>)" failed deduction
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/include/c++/11/system_error(206): note #3328-D: built-in operator<<(, ) does not match because argument #1 does not match parameter
enable_if<is_error_code_enum<_ErrorCodeEnum>::value>::type>
``
How to Reproduce
Compile and execute the next code with the following setup
OS: rocky linux 9
Cuda version 12.5
C++ compiler clang or gcc11
The toy code to stimulate the issue is:
The text was updated successfully, but these errors were encountered: