[arch-commits] Commit in root/trunk (4 files)
Konstantin Gizdov
kgizdov at archlinux.org
Fri Jul 24 20:54:58 UTC 2020
Date: Friday, July 24, 2020 @ 20:54:57
Author: kgizdov
Revision: 665205
cuda c++17
Added:
root/trunk/fix_cuda_cxx17.patch
Modified:
root/trunk/PKGBUILD
root/trunk/settings-cuda.cmake
root/trunk/settings.cmake
----------------------+
PKGBUILD | 14 +++--
fix_cuda_cxx17.patch | 127 +++++++++++++++++++++++++++++++++++++++++++++++++
settings-cuda.cmake | 2
settings.cmake | 2
4 files changed, 137 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-07-24 20:15:44 UTC (rev 665204)
+++ PKGBUILD 2020-07-24 20:54:57 UTC (rev 665205)
@@ -7,7 +7,7 @@
pkgbase=root
pkgname=('root' 'root-cuda')
pkgver=6.22.00
-pkgrel=1
+pkgrel=2
pkgdesc='C++ data analysis framework and interpreter from CERN'
arch=('x86_64')
url='https://root.cern'
@@ -37,7 +37,7 @@
'sqlite'
'unuran'
'vc'
- 'xrootd>=4.6.0-2'
+ 'xrootd4'
'z3'
)
depends=(
@@ -79,7 +79,7 @@
'tcsh: Legacy CSH support'
'unuran: Support non-uniform random numbers'
'vc: Add types for portable and intuitive SIMD programming'
- 'xrootd: Support remote file server and client'
+ 'xrootd4: Support remote file server and client'
'z3: Suuport the Z3 theorem prover'
)
source=(
@@ -93,17 +93,19 @@
'nbman-for-arch.patch'
'thisroot.fail'
'adapt_tmva_to_support_cudnn8.patch'
+ 'fix_cuda_cxx17.patch'
)
sha512sums=('9e3c54bbc146b0abb0a2d960af380255ec59d0b3a11a4a97a2a25cb7ac567b07280c4eb48dddf99c1fa2e692881f6396a842ce125d3a253037e52f719739f01e'
'af8f178fc9df66997d5495b271e38adcd1636aab4c8fc994c6600c2496127829d831250d73d3fc229b02dfe49b9867d0be979beacb959f2f3a05351b8118a4a6'
'1fe6f4aa09d583d33f27cc766f4935510bb7ab6bbb8d4700baa1aaab92ea6c876500b67da1e4f6e0b510aa5616e4e193b860264b86925de85f2d9f558d75d5dc'
'3c81d255a17b902ffac0187af1752847036137e16641a88b17eef0d9c944e6f0d3c954bc93307d6270603f43f6c23f2e04f98dc7a68f9d076dbaa8006a2527d6'
- '9ee5b6606dbd352608a2a4998344ca4026d677c86823e62fff615f6e84efcecdffc07a1e9182a356aa35035e7f35df5a107127722a6bad4b97d1f49cffebf5b9'
- '7665bc8cbe79162e0b969b08802e1b7b2ed22ed8b1402d50cf194172a644f647dcaf0f5abb76f8b6007dfab8dbc811604479be826b345d8fd77edfb51032110b'
+ '8e40247d4531d690e4d2897de4672e9fb289d4787c55cd17e8ac8be693e9bedb20ee0f5bb471d22088f34ecea81fd8b0d2aa2f311403870fa71c2377bfbdeacd'
+ '324adbff951f5fd60307ce12591be2c6c583021bf4645c4d2043e37d3313cecb841f13997bf23587beac85158333b49359709b385592ec74cd006c37a170290e'
'1c905ee7a3f8f5f3f567d957f9be6b503a8631565d4d9b9bfea5e496ef86865c5a8be1a1f8c7842754029879cf0afd2465249f532a116cc43660aa2e460ae682'
'12814f50b7016bd86d3f91e0e31c052783a0c0fa72b7d6a072d3ae6f86c2437323d585e531235377ebbfdd9cb76abd7da84d9631de821151547f1d4b13417e69'
'ff555ac4db568affe139701907f86d919a2206f3e304f69dd317b756ea0904b5934d9364a524060778aa507809ce78448621619bb34039ba34c5a71af71a4a8c'
- '2ae126795df4127c27a6287a1499bdb8b2bacb74cfbec17dabe378a5fb9fc7c755644e4090a4da1d0045bf5d4f542f06da827a0f48a5927ee8509874045f18b6')
+ '2ae126795df4127c27a6287a1499bdb8b2bacb74cfbec17dabe378a5fb9fc7c755644e4090a4da1d0045bf5d4f542f06da827a0f48a5927ee8509874045f18b6'
+ 'f7dbbd4ba08dd6e7d631b1cd9414ea51bfe64d8074835c9ccd95bcbdba1e72107b928df97738dde04c8e2e5399432cc748fd6b6188c372eb085b188962255640')
get_pyver () {
python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
Added: fix_cuda_cxx17.patch
===================================================================
--- fix_cuda_cxx17.patch (rev 0)
+++ fix_cuda_cxx17.patch 2020-07-24 20:54:57 UTC (rev 665205)
@@ -0,0 +1,127 @@
+From 62fff7d03d8785a69f56115b27081fe1081edc9b Mon Sep 17 00:00:00 2001
+From: Konstantin Gizdov <kgizdov at gmail.com>
+Date: Fri, 24 Jul 2020 18:23:49 +0300
+Subject: [PATCH 1/2] fix regression in f8edeb9 not using correct string_view
+ when CUDA C++ standard allows it
+
+---
+ cmake/modules/RootConfiguration.cmake | 3 +++
+ config/RConfigure.in | 1 +
+ tmva/tmva/inc/TMVA/DNN/Architectures/Cuda/CudaMatrix.h | 3 +++
+ tmva/tmva/src/DNN/Architectures/Cuda.cu | 3 +++
+ tmva/tmva/src/DNN/Architectures/Cudnn.cu | 5 ++++-
+ 5 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake
+index 1fe84d1515a..a19eafabb71 100644
+--- a/cmake/modules/RootConfiguration.cmake
++++ b/cmake/modules/RootConfiguration.cmake
+@@ -531,6 +531,9 @@ endif()
+ if(found_stdstringview)
+ CHECK_CXX_SOURCE_COMPILES("#include <string_view>
+ int main() { size_t pos; std::string_view str; std::stod(str,&pos); return 0;}" found_stod_stringview)
++ if(CMAKE_CUDA_STANDARD GREATER_EQUAL CMAKE_CXX_STANDARD)
++ set(cudahasstdstringview define)
++ endif()
+ elseif(found_stdexpstringview)
+ CHECK_CXX_SOURCE_COMPILES("#include <experimental/string_view>
+ int main() { size_t pos; std::experimental::string_view str; std::stod(str,&pos); return 0;}" found_stod_stringview)
+diff --git a/config/RConfigure.in b/config/RConfigure.in
+index 14921f244b0..43daff4cd66 100644
+--- a/config/RConfigure.in
++++ b/config/RConfigure.in
+@@ -33,6 +33,7 @@
+ #@usecxxmodules@ R__USE_CXXMODULES /**/
+ #@uselibc++@ R__USE_LIBCXX /**/
+ #@hasstdstringview@ R__HAS_STD_STRING_VIEW /**/
++#@cudahasstdstringview@ R__CUDA_HAS_STD_STRING_VIEW /**/
+ #@hasstdexpstringview@ R__HAS_STD_EXPERIMENTAL_STRING_VIEW /**/
+ #@hasstodstringview@ R__HAS_STOD_STRING_VIEW /**/
+ #@hasopplusequalstringview@ R__HAS_OP_EQUAL_PLUS_STRING_VIEW /**/
+diff --git a/tmva/tmva/inc/TMVA/DNN/Architectures/Cuda/CudaMatrix.h b/tmva/tmva/inc/TMVA/DNN/Architectures/Cuda/CudaMatrix.h
+index 3c224f185f1..72581eaedcd 100644
+--- a/tmva/tmva/inc/TMVA/DNN/Architectures/Cuda/CudaMatrix.h
++++ b/tmva/tmva/inc/TMVA/DNN/Architectures/Cuda/CudaMatrix.h
+@@ -20,11 +20,14 @@
+ #define TMVA_DNN_ARCHITECTURES_CUDA_CUDAMATRIX
+
+ // in case we compile C++ code with std-17 and cuda with lower standard
++// use experimental string_view, otherwise keep as is
+ #include "RConfigure.h"
+ #ifdef R__HAS_STD_STRING_VIEW
++#ifndef R__CUDA_HAS_STD_STRING_VIEW
+ #undef R__HAS_STD_STRING_VIEW
+ #define R__HAS_STD_EXPERIMENTAL_STRING_VIEW
+ #endif
++#endif
+
+ #include "cuda.h"
+ #include "cuda_runtime.h"
+diff --git a/tmva/tmva/src/DNN/Architectures/Cuda.cu b/tmva/tmva/src/DNN/Architectures/Cuda.cu
+index 56daac79850..547460017b2 100644
+--- a/tmva/tmva/src/DNN/Architectures/Cuda.cu
++++ b/tmva/tmva/src/DNN/Architectures/Cuda.cu
+@@ -15,11 +15,14 @@
+ /////////////////////////////////////////////////////////////////
+
+ // in case we compile C++ code with std-17 and cuda with lower standard
++// use experimental string_view, otherwise keep as is
+ #include "RConfigure.h"
+ #ifdef R__HAS_STD_STRING_VIEW
++#ifndef R__CUDA_HAS_STD_STRING_VIEW
+ #undef R__HAS_STD_STRING_VIEW
+ #define R__HAS_STD_EXPERIMENTAL_STRING_VIEW
+ #endif
++#endif
+
+ #include "TMVA/DNN/Architectures/Cuda.h"
+ #include "Cuda/Propagation.cu"
+diff --git a/tmva/tmva/src/DNN/Architectures/Cudnn.cu b/tmva/tmva/src/DNN/Architectures/Cudnn.cu
+index 4b32d4b2d8e..15e4277d6be 100644
+--- a/tmva/tmva/src/DNN/Architectures/Cudnn.cu
++++ b/tmva/tmva/src/DNN/Architectures/Cudnn.cu
+@@ -15,11 +15,14 @@
+ ///////////////////////////////////////////////////////////////////
+
+ // in case we compile C++ code with std-17 and cuda with lower standard
++// use experimental string_view, otherwise keep as is
+ #include "RConfigure.h"
+ #ifdef R__HAS_STD_STRING_VIEW
++#ifndef R__CUDA_HAS_STD_STRING_VIEW
+ #undef R__HAS_STD_STRING_VIEW
+ #define R__HAS_STD_EXPERIMENTAL_STRING_VIEW
+ #endif
++#endif
+
+ #include "TMVA/DNN/Architectures/TCudnn.h"
+ #include "Cudnn/Propagate.cu"
+@@ -54,4 +57,4 @@ template class TCudnn<Double_t>;
+ // size_t TCudnn<Double_t>::CNNOptions::ConvMaxWorkspaceSize = 0;
+
+ } // end namespace DNN
+-} // end namespace TMVA
+\ No newline at end of file
++} // end namespace TMVA
+
+From d30bf0190f668434f23875e201a80450b6d2dddb Mon Sep 17 00:00:00 2001
+From: Konstantin Gizdov <kgizdov at gmail.com>
+Date: Fri, 24 Jul 2020 18:53:53 +0300
+Subject: [PATCH 2/2] set R__CUDA_HAS_STD_STRING_VIEW to undef in all other
+ cases
+
+---
+ cmake/modules/RootConfiguration.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake
+index a19eafabb71..c9f7206d12c 100644
+--- a/cmake/modules/RootConfiguration.cmake
++++ b/cmake/modules/RootConfiguration.cmake
+@@ -528,6 +528,7 @@ else()
+ endif()
+ endif()
+
++set(cudahasstdstringview undef)
+ if(found_stdstringview)
+ CHECK_CXX_SOURCE_COMPILES("#include <string_view>
+ int main() { size_t pos; std::string_view str; std::stod(str,&pos); return 0;}" found_stod_stringview)
Modified: settings-cuda.cmake
===================================================================
--- settings-cuda.cmake 2020-07-24 20:15:44 UTC (rev 665204)
+++ settings-cuda.cmake 2020-07-24 20:54:57 UTC (rev 665205)
@@ -8,7 +8,7 @@
set (CMAKE_INSTALL_SYSCONFDIR /etc/root CACHE PATH "" FORCE)
set (CMAKE_INSTALL_DATAROOTDIR /usr/share CACHE PATH "" FORCE)
set (CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
-set (CMAKE_CUDA_STANDARD 14 CACHE STRING "" FORCE)
+set (CMAKE_CUDA_STANDARD 17 CACHE STRING "" FORCE)
set (PYTHIA8_DATA /usr/share/pythia8/xmldoc CACHE PATH "" FORCE) # sync with pythia8 package
set (GLEW_DIR /usr/include/GL CACHE PATH "" FORCE) # need to set manually
set (alien OFF CACHE BOOL "" FORCE)
Modified: settings.cmake
===================================================================
--- settings.cmake 2020-07-24 20:15:44 UTC (rev 665204)
+++ settings.cmake 2020-07-24 20:54:57 UTC (rev 665205)
@@ -8,7 +8,7 @@
set (CMAKE_INSTALL_SYSCONFDIR /etc/root CACHE PATH "" FORCE)
set (CMAKE_INSTALL_DATAROOTDIR /usr/share CACHE PATH "" FORCE)
set (CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
-set (CMAKE_CUDA_STANDARD 14 CACHE STRING "" FORCE)
+set (CMAKE_CUDA_STANDARD 17 CACHE STRING "" FORCE)
set (PYTHIA8_DATA /usr/share/pythia8/xmldoc CACHE PATH "" FORCE) # sync with pythia8 package
set (GLEW_DIR /usr/include/GL CACHE PATH "" FORCE) # need to set manually
set (alien OFF CACHE BOOL "" FORCE)
More information about the arch-commits
mailing list