New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add externals for Alpaka and Cupla #5568
Add externals for Alpaka and Cupla #5568
Conversation
@cmsbuild please test |
The tests are being triggered in jenkins. |
cupla.spec
Outdated
|
||
CXXFLAGS="-m64 -std=c++14 -g -O3 -DALPAKA_DEBUG=0 -I$CUDA_ROOT/include -I$TBB_ROOT/include -I$BOOST_ROOT/include -I$ALPAKA_ROOT/include -Iinclude" | ||
HOST_FLAGS="-pthread -fPIC -Wall -Wextra -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-attributes -Wno-reorder -Wno-sign-compare" | ||
NVCC_FLAGS="-w --generate-line-info --source-in-ptx --cudart=shared --expt-extended-lambda --expt-relaxed-constexpr -gencode arch=compute_35,code=sm_35 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These flags should match those in cuda-toolfile.spec.
@smuzaffar is there any way to make it automatic ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fwyzard , only automatic way is to put these flags in a separate file e.g. cuda-flags.file
and then include that file in both cuda-toolfile and here
## INLCUDE cuda-flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhm... I see.
However, the way in which the flags are used is a bit different:
in cupla.spec
(simplified):
NVCC_FLAGS="--generate-line-info --source-in-ptx --expt-extended-lambda --expt-relaxed-constexpr -gencode arch=compute_35,code=sm_35 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 --cudart=shared"
vs cuda-toolfile.spec
(simplified):
<flags CUDA_FLAGS="--generate-line-info --source-in-ptx --expt-relaxed-constexpr --expt-extended-lambda -gencode arch=compute_35,code=sm_35 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 --cudart=shared "/>
Would it work to define a spec macro in a separate file, e.g. cuda-flags.file
%define cuda_flags -O3 -std=c++14 --expt-relaxed-constexpr --expt-extended-lambda
%define cuda_flags %cuda_flags --generate-line-info --source-in-ptx
%ifarch x86_64 ppc64le
%define cuda_flags %cuda_flags -gencode arch=compute_35,code=sm_35
%define cuda_flags %cuda_flags -gencode arch=compute_60,code=sm_60
%define cuda_flags %cuda_flags -gencode arch=compute_70,code=sm_70
%endif
%ifarch aarch64
%define cuda_flags %cuda_flags -gencode arch=compute_70,code=sm_70
%define cuda_flags %cuda_flags -gencode arch=compute_72,code=sm_72
%endif
%define cuda_flags %cuda_flags --cudart=shared
and then include it with something like
## IMPORT cuda-flags
...
NVCC_FLAGS="%{cuda-flags}"
and
## IMPORT cuda-flags
...
<flags CUDA_FLAGS="%{cuda-flags}"/>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes macro will work
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
test parameters:
|
please test |
The tests are being triggered in jenkins. |
+1 |
Comparison job queued. |
Pull request #5568 was updated. |
@cmsbuild, please test |
The tests are being triggered in jenkins. |
+1 |
Comparison job queued. |
@silviodonato @mrodozov from my side this is ready to be merged |
Comparison is ready Comparison Summary:
|
+externals |
unhold |
This pull request is fully signed and it will be integrated in one of the next IB/CMSSW_11_1_X/master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @silviodonato, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
The alpaka library is a header-only C++14 abstraction library for accelerator development. Its aim is to provide performance portability across accelerators through the abstraction of the underlying levels of parallelism.
Cupla is a simple user interface for the platform independent parallel kernel acceleration library alpaka.
Add externals and scram tools for alpaka 0.4.0 and cupla 0.2.0.