Browse Source

Untitled commit
commit_hash:c82d1093fb7e721a5c6c42e3a24d7f94e8a1dd21

pg 5 months ago
parent
commit
64ffa9dea7

+ 2 - 1
build/ymake.core.conf

@@ -3274,7 +3274,6 @@ when ($IDE_MSVS_CALL == "yes") {
     NVCC_CFLAGS+=/Fd$(TEMP)
 }
 
-NVCC_STD_VER=17
 when ($MSVC == "yes") {
     NVCC_STD=/std:c++${NVCC_STD_VER}
 }
@@ -5673,6 +5672,7 @@ when ($CUDA11) {
     CUDA_VERSION=11.4
     CUDNN_VERSION=8.0.5
     TENSORRT_VERSION=7
+    NVCC_STD_VER=17
 }
 
 when ($CUDA12) {
@@ -5680,6 +5680,7 @@ when ($CUDA12) {
     CUDNN_VERSION=8.6.0
     TENSORRT_VERSION=8
     CUDA_ARCHITECTURES=
+    NVCC_STD_VER=20
 }
 
 when ($TENSORFLOW_WITH_CUDA) {

+ 7 - 0
build/ymake_conf.py

@@ -2425,6 +2425,13 @@ class Cuda(object):
         emit('NVCC_ENV', '${env:_NVCC_ENV}')
         emit('_NVCC_ENV', 'PATH=$CUDA_ROOT/nvvm/bin:$CUDA_ROOT/bin')
 
+        if self.cuda_version.value.startswith('10.'):
+            emit('NVCC_STD_VER', '17')
+        elif self.cuda_version.value.startswith('11.'):
+            emit('NVCC_STD_VER', '17')
+        else:
+            emit('NVCC_STD_VER', '20')
+
     def print_macros(self):
         mtime = ' '
         custom_pid = ' '

+ 1 - 1
contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h

@@ -144,7 +144,7 @@ public:
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
     reference operator*() const {_Iter __tmp = current; return *--__tmp;}
 
-#if _LIBCPP_STD_VER >= 20
+#if (_LIBCPP_STD_VER >= 20) && !defined(__NVCC__)
     _LIBCPP_INLINE_VISIBILITY
     constexpr pointer operator->() const
       requires is_pointer_v<_Iter> || requires(const _Iter __i) { __i.operator->(); }