Skip to content
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

[WIP] GPU Abstraction to also target HIP in cudacpp impementation & Profiling infrastructure #718

Open
wants to merge 497 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
497 commits
Select commit Hold shift + click to select a range
7eb8da7
Removed status badges because they eventually have to get added again
Jooorgen Mar 31, 2023
27cb7d4
Merge branch 'madgraph5:master' into master
Jooorgen Mar 31, 2023
8946a0c
Added script for starting a container running the profiling
Jooorgen Mar 31, 2023
abe5064
Merge branch 'master' of https://github.com/Jooorgen/madgraph4gpu
Jooorgen Mar 31, 2023
c5d0fb7
Reverted changes to the sycl directory
Jooorgen Apr 12, 2023
f531206
Merge branch 'madgraph5:master' into master
Jooorgen Apr 12, 2023
cc39fe8
Remove CVMFS from profiler workflows
Jooorgen Apr 24, 2023
ac6112f
Merge branch 'master' of https://github.com/Jooorgen/madgraph4gpu
Jooorgen Apr 24, 2023
d98e8f6
Removed CVMFS from CXX variable
Jooorgen Apr 24, 2023
6848061
Changed GCC version in CUDA a100 Profiler to whats in container
Jooorgen Apr 24, 2023
5d87a1e
Testing abstraction of CUDA function to seperate header file
May 5, 2023
9608778
Fleshed out HIP macros and added missing macros in code
May 11, 2023
e4dc25e
Added new GpuRuntime to replace CudaRuntime and added macros for kern…
Jooorgen May 31, 2023
39836e0
Added macro for __CUDACC_
Jooorgen May 31, 2023
98d02bb
Changed name of gpu_abstraction to fall inline with naming scheme
Jooorgen Jun 1, 2023
ecee14d
Changed name of GPUCC macro to MGONGPUCPP_GPUIMPL also did some cleanup
Jooorgen Jun 1, 2023
78a8119
Added GPU abstraction in src directory as well
Jooorgen Jun 5, 2023
4f98bcd
Merge branch 'madgraph5:master' into master
Jooorgen Jun 6, 2023
098219a
Added some WIP changes to compile with HIP
Jooorgen Jun 6, 2023
9ecf523
Merge branch 'master' into gpu_abstraction
Jooorgen Jun 6, 2023
11e392d
Dont know what happened here
Jooorgen Jun 6, 2023
e8779eb
Cleanup of sync with master
Jooorgen Jun 7, 2023
e5f1070
More cleanup from sync with master
Jooorgen Jun 7, 2023
a7da6ef
Added first round of fixes from sync with master
Jooorgen Jun 7, 2023
d69762d
Added back include for abstraction in mgOnGpuConfig.h
Jooorgen Jun 7, 2023
5459bbc
Added some fixes
Jooorgen Jun 7, 2023
abbc9af
Made a change to tthe cudaccpp.mk file
Jooorgen Jun 7, 2023
58174f6
Made small fix to makefile
Jooorgen Jun 7, 2023
a46b3f9
Added compilation for HIP in makefile
Jooorgen Jun 14, 2023
ce8a20c
Removed typo
Jooorgen Jun 14, 2023
7830e20
Tweaked some HIP compiler flags
Jooorgen Jun 14, 2023
822816d
Changed __HIPCC__ to __HCC__ in GPU abstraction
Jooorgen Jun 14, 2023
0307eba
Changed typo in file
Jooorgen Jun 14, 2023
1ceace1
Testing some defines
Jooorgen Jun 14, 2023
1043b45
Added define to ignore error for testing
Jooorgen Jun 14, 2023
28afd0b
Testing some things in makefile
Jooorgen Jun 14, 2023
4486ffd
Testing removing rpath
Jooorgen Jun 15, 2023
bc1c26d
Added specified target in makefile
Jooorgen Jun 15, 2023
66566f4
Added check for compiling without curand when compiling with HIP
Jooorgen Jun 15, 2023
8106e42
Removed rpath for testing
Jooorgen Jun 15, 2023
d698eda
Added some testing in abstraction
Jooorgen Jun 15, 2023
a10140f
More testing
Jooorgen Jun 15, 2023
ebc413a
More testing
Jooorgen Jun 15, 2023
33b6971
Testing
Jooorgen Jun 15, 2023
a68b25c
Testing 2
Jooorgen Jun 15, 2023
fcd7a42
Testing 3
Jooorgen Jun 15, 2023
6c0b470
Testing 4
Jooorgen Jun 15, 2023
bfc2782
Testing 6
Jooorgen Jun 15, 2023
fef4e8d
Removing lines for testing
Jooorgen Jun 15, 2023
0fcea2b
Added small changes for HIP compilation
Jooorgen Jun 15, 2023
7905854
Removed more testing lines
Jooorgen Jun 15, 2023
a97d8df
Removed typo
Jooorgen Jun 15, 2023
95bd9cc
Added back hip_runtime.h in abstraction
Jooorgen Jun 15, 2023
eb19aee
Fixed typo
Jooorgen Jun 15, 2023
5783902
Fixed a ifdef that should be CUDA only
Jooorgen Jun 15, 2023
7289a94
Added fixes for comples number ifdefs
Jooorgen Jun 15, 2023
665d37c
Testing in abstraction header
Jooorgen Jun 15, 2023
22b1142
Added some fixes
Jooorgen Jun 15, 2023
dc82909
Added some more fixes in curand
Jooorgen Jun 15, 2023
e77172d
Added some testing lines
Jooorgen Jun 15, 2023
9884b82
Added some testing lines
Jooorgen Jun 15, 2023
7eb0a02
Fixed syntax error
Jooorgen Jun 15, 2023
e1fd37e
Added some syntax fixes
Jooorgen Jun 15, 2023
44aa73d
Added some more syntax changes
Jooorgen Jun 15, 2023
0a29cff
Added some more testing stuff
Jooorgen Jun 15, 2023
dd08b7b
Added some testing lines
Jooorgen Jun 15, 2023
6accaea
Testing 8
Jooorgen Jun 15, 2023
01319ec
Testing 9
Jooorgen Jun 15, 2023
d48c4ab
Testing 10
Jooorgen Jun 15, 2023
20932b8
Removed warnings when compiling and fixes to makefile for HIP compila…
Jun 16, 2023
a36fed5
Made alot of changes to the Makefile, no ROCm-capable device is detec…
Jun 19, 2023
9272a85
Revert to commit and accept incoming
Jooorgen Jun 19, 2023
9a6cf66
Added some QOL improvements to make script for correct output
Jooorgen Jun 19, 2023
ae7d68d
Removed #warnings
Jooorgen Jun 19, 2023
e185405
Added include guards for the gpu abstraction header
Jooorgen Jun 20, 2023
5431d84
Added some redundant features in Makefile and added ToDo list in GpuA…
Jooorgen Jun 21, 2023
2e17a0d
Testing adding stuff to CXXFLAGS
Jooorgen Jun 21, 2023
cd90274
Fixed warnings in GPU abstraction header and removed unused compiler …
Jooorgen Jun 21, 2023
5dc09d0
Fixed syntax error for errorhandling in GpuAbstraction.h
Jooorgen Jun 21, 2023
f196de6
Did some refactoring to keep the abstraction consistent
Jooorgen Jun 21, 2023
199860b
Fixed some syntax errors
Jooorgen Jun 21, 2023
a74b1aa
Reverted some changes to working state with warning
Jooorgen Jun 21, 2023
f29ee2b
Remove redundant options for compilation that is injected elsewhere
Jooorgen Jun 21, 2023
33f69d8
Remove hardcoded variable
Jooorgen Jun 21, 2023
8a1e5fc
Removed more cuda specific code and added comments
Jooorgen Jun 21, 2023
a9a77d2
Merge pull request #3 from Jooorgen/gpu_abstraction
Jooorgen Jun 21, 2023
4da0224
Merge branch 'madgraph5:master' into master
Jooorgen Jun 21, 2023
3d7892c
Fix for including cuda in test compilation when compiling in HIP
Jooorgen Jun 21, 2023
ff18a89
Merge pull request #4 from Jooorgen/gpu_abstraction
Jooorgen Jun 21, 2023
5c8ed77
Removed testing variable and added better detection of compiler paths
Jooorgen Jun 26, 2023
c678f32
Fixed Makefile syntax so compiler detection works
Jooorgen Jun 26, 2023
b6fb061
Fixed typo
Jooorgen Jun 26, 2023
a6ef4c5
Did minor changes to makefile and added flags that were missing in HI…
Jooorgen Jun 26, 2023
bdfc44b
Removed unused option in HIP compilation
Jooorgen Jun 26, 2023
2ffbf6b
Readding -rpath
Jooorgen Jun 26, 2023
cd3ced9
Changed syntax in Makefile
Jooorgen Jun 26, 2023
2c15714
Added some fixes to makefile
Jooorgen Jun 26, 2023
8db62ba
Reworked linking to cuda in tests
Jooorgen Jun 26, 2023
6035cc9
Added some fixes for CUDA compilation
Jooorgen Jun 26, 2023
708340a
Fixed some missing flags in compilation
Jooorgen Jun 26, 2023
d763b13
Fixed typo
Jooorgen Jun 26, 2023
f46c8d5
Removed CUDA specific instructions in HIP compilation
Jooorgen Jun 26, 2023
3aef7d7
Removed unneccessary flag in wrong spot in compilation
Jooorgen Jun 26, 2023
f98768f
Reverted some changes for testing
Jooorgen Jun 26, 2023
cdff55d
Removed CUDACC ifdef in Curand*.cc
Jooorgen Jun 27, 2023
6fa25ab
"-rpath,$variable" not in LLVM's linker using = instead
Jooorgen Jun 27, 2023
8fbc97f
Added error checks in gpu functions
Jooorgen Jun 27, 2023
b2d6aa9
Testing syntax changes
Jooorgen Jun 27, 2023
f7508be
Fixed syntax
Jooorgen Jun 27, 2023
7e54dd7
Second try at fixing syntax
Jooorgen Jun 27, 2023
d09bec0
Removed errors, but warnings presist
Jooorgen Jun 27, 2023
f5365d7
Merge branch 'madgraph5:master' into gpu_abstraction
Jooorgen Jun 29, 2023
1dfeb18
Merge pull request #5 from Jooorgen/master
Jooorgen Jun 29, 2023
d3e5127
Ported GPU abstraction to gg_ttgg
Jooorgen Jun 29, 2023
a7369a3
Forgot to include GpuAbstraction headers in src
Jooorgen Jun 29, 2023
d123d61
Removed CudaRuntime
Jooorgen Jun 29, 2023
8da7f4c
Added GPU abstraction to gg_ttgg.mad
Jooorgen Jul 4, 2023
a6ba2d1
Fixed syntax errors
Jooorgen Jul 4, 2023
c82a5a6
Fixed typo
Jooorgen Jul 4, 2023
0ef2711
Fixed error
Jooorgen Jul 4, 2023
e7df295
Added fix for detecting compiler
Jooorgen Jul 4, 2023
d1ba039
Fixed Curand appering in HIP compilation
Jooorgen Jul 4, 2023
15ddcbf
Fixed Curand appearing in HIP compilation 2
Jooorgen Jul 4, 2023
b6b967d
Fix Curand appearing in HIP compilation 3
Jooorgen Jul 4, 2023
a74ea9d
Removed unneccesary line in Makefile
Jooorgen Jul 4, 2023
f584d5b
Added changes to profiling build script for HIP compilation
Jooorgen Jul 4, 2023
7fd210f
Fixed syntax error
Jooorgen Jul 4, 2023
bea14a4
Fixed syntax error 2
Jooorgen Jul 4, 2023
bfd7534
Fixed path to acual process being compiled
Jooorgen Jul 4, 2023
da61f5a
Fix to getting CUDA_HOME
Jooorgen Jul 4, 2023
c957d69
Did some refactoring of CUDA/HIP build script
Jooorgen Jul 5, 2023
ce4e87d
Last changes for profiling infrastructure for MI250X
Jooorgen Jul 6, 2023
eda96f8
Readded the MI250X performance profiler workflow container setup
Jooorgen Jul 12, 2023
1e4eba8
Fixed the indentation in the MI250X workflow
Jooorgen Jul 13, 2023
b7252ab
Added first file of implementation of rocRand
Jooorgen Jul 13, 2023
63cf27c
Fix to the warnings in HIP compilation
Jooorgen Jul 13, 2023
6741186
[CODEGEN] Added GPU abstraction to CODEGEN
Jooorgen Jul 13, 2023
b5932de
[jthip] change % to %% in CODEGEN cudacpp.mk
valassi Jul 13, 2023
cceba28
[jthip] in ggttgg.mad use the GpuAbstraction.h from codegen (copy as is)
valassi Jul 13, 2023
f6ca346
[jthip] clang-format GpuAbstraction.h both in CODEGEN and in ggttgg.mad
valassi Jul 13, 2023
c33d0af
[jthip] clang-format GpuRuntime.h both in CODEGEN and in ggttgg.mad
valassi Jul 13, 2023
6a451ed
Merge remote-tracking branch 'upstream/master' into jthip
valassi Jul 13, 2023
9872c95
Made the codegenerated files same as the templated files in gg_ttgg
Jooorgen Jul 17, 2023
fc4ef6b
Delete unneccessary file at this point
Jooorgen Jul 18, 2023
67e5613
[jthip] in ggttgg.mad mgOnGpuConfig.h, remove include of GpuRuntime.h
valassi Jul 18, 2023
81cad87
[jthip] in ggttgg.mad, clean up mgOnGpuConfig.h for CUDA/HIP/C++ toge…
valassi Jul 18, 2023
b4bdf47
[jthip] in ggttgg.mad, clean up GpuAbstraction together with Jorgen a…
valassi Jul 18, 2023
806b5c7
[jthip] in ggttgg.mad, add GpuRuntime.h in check.cc and MemoryBuffers.h
valassi Jul 18, 2023
5d9a8e6
[jthip] in ggttgg.mad CurandRandomNumberKernel.cc, change back MGONGP…
valassi Jul 18, 2023
ece2174
[jthip] in ggttgg.mad, clean up #ifdefs in check.cc together with Jorgen
valassi Jul 18, 2023
efe9b83
[jthip] in ggttgg.mad, remove CudaRuntime.h files from the repo
valassi Jul 18, 2023
e3fa17f
[jthip] backport to CODEGEN from ggttgg.mad
valassi Jul 18, 2023
5d218f6
[jthip] in ggttgg.mad mgOnGpuVectors.h, remove include of GpuRuntime.h
valassi Jul 18, 2023
85a746b
[jthip] in ggttgg.mad, remove src/GpuAbstraction.h and src/GpuRuntime…
valassi Jul 18, 2023
6e90139
[jthip] complete backport to CODEGEN from ggttgg.mad, including a few…
valassi Jul 18, 2023
c8d4da4
[jthip] in ggttgg.mad, regenerate DHELAS/aloha_file.inc which takes a…
valassi Jul 18, 2023
334aee7
[jthip] regenerate ggttgg.mad - all ok! a few improvements in CPPProc…
valassi Jul 18, 2023
bfc5b65
[jthip] in CODEGEN, remove the copying to src of GpuRuntime.h and Gpu…
valassi Jul 18, 2023
b83eca5
[jthip] In CODEGEN, acknowledge Joergen in each file and in COPYRIGHT…
valassi Jul 18, 2023
ccb3b30
[jthip] regenerate ggttgg.mad including Jorgen's name in each file - …
valassi Jul 18, 2023
1207f1f
[jthip] regenerate with HIP all other 6 processes mad and 7 processes sa
valassi Jul 18, 2023
1050176
[jthip] rerun 78 tput alltees (for CUDA/C++) after including HIP, all…
valassi Jul 19, 2023
18ffff2
[jthip] rerun 15 tmad alltees (for cuda/c++) after including HIP, all…
valassi Jul 19, 2023
65350c5
[jthip] go back to upstream/master tput/tmad logs for easier merging
valassi Jul 19, 2023
4014dfa
[jthip] go back to 14 upstream/master CODEGEN logs for easier merging
valassi Jul 19, 2023
d2ac310
Moved hip_runtime.h include to mgOnGpuConfig.h
Jooorgen Jul 20, 2023
35913a3
[CODEGEN] Added HIP runtime include in mgOnGpuConfig.h in codegen
Jooorgen Jul 20, 2023
ee8875b
[jthip] go back to pre-HIP changes in all 6 mad (except ggttgg) and 7…
valassi Jul 25, 2023
6b9552e
Merge remote-tracking branch 'upstream/master' into jthip
valassi Jul 25, 2023
ef615f5
[jthip] regenerate ggttgg.mad - all looks ok! so CODEGEN is in sync w…
valassi Jul 25, 2023
70c884a
[jthip] in ggttgg.mad cudacpp_src.mk, use GPUCC instead of NVCC as im…
valassi Jul 25, 2023
a912fc5
[jthip/namespace] in ggttgg.mad, manually check and fix the pending _…
valassi Jul 25, 2023
af0f0d4
[jthip/namespace] backport latest changes from ggttgg.mad to CODEGEN
valassi Jul 25, 2023
1eb284a
[jthip] in CODEGEN, backport also cudacpp_src.mk using GPUCC instead …
valassi Jul 25, 2023
8206a29
[jthip] regenerate ggttgg.mad, all ok
valassi Jul 25, 2023
e32e8ba
[jthip] go back to origin/fpe ggttgg.mad codegen log for easier mergi…
valassi Jul 26, 2023
e467cd4
Merge remote-tracking branch 'upstream/master' into jthip
valassi Jul 26, 2023
9d5b6d9
[jthip] regenerate ggttgg.mad after merging upstream/master - all ok …
valassi Jul 26, 2023
e55d57b
[jthip] revert the ggttgg codegen log for easier merging later on
valassi Jul 26, 2023
980ccbc
Added Github Artifacts to transfer JSON files
Jooorgen Jul 31, 2023
5712fa9
Testing on push in workflow
Jooorgen Jul 31, 2023
7bbfadb
Fixed typo
Jooorgen Jul 31, 2023
e57f4ff
Made runner token not dependent on jq command
Jooorgen Jul 31, 2023
6629f6a
Added correct prefix to singularity pull command
Jooorgen Jul 31, 2023
e51378b
Fixed srun command to start container
Jooorgen Jul 31, 2023
2e53e3a
Fixed syntax error in srun command
Jooorgen Jul 31, 2023
0b28403
Added a --force to the singularity pull command if the image ever get…
Jooorgen Jul 31, 2023
1bd4880
Added tag in container execution
Jooorgen Jul 31, 2023
75afd3a
Changed the syntax of the srun command
Jooorgen Jul 31, 2023
9a23686
Fixed srun syntax again
Jooorgen Jul 31, 2023
d46d4f8
Fixed deprecated github feature and fixed env variables
Jooorgen Jul 31, 2023
61b3ad8
Put sif file to be executed last in srun command
Jooorgen Jul 31, 2023
395bae3
Forgot backslash after next last line in srun
Jooorgen Jul 31, 2023
d7cf2de
Changed srun syntax again
Jooorgen Jul 31, 2023
c7fe974
Added the enviroment variables to the workflow instead of the command
Jooorgen Jul 31, 2023
ec7d843
Switched back to run command instead of exec
Jooorgen Jul 31, 2023
95bcc39
Added back env variables in the command because they were not picked …
Jooorgen Jul 31, 2023
4eb1393
Reworked workflow file for mi250x profiling
Jooorgen Jul 31, 2023
e70adb5
Fixed syntax error
Jooorgen Jul 31, 2023
4305bbc
Fixed silly error in performanceProfiler script and changed CUDAVerst…
Jooorgen Jul 31, 2023
eeb1d9b
Added elif to HIP building as well in performanceProfiler
Jooorgen Jul 31, 2023
b41b33c
Added correct modules for compilation
Jooorgen Jul 31, 2023
c4532c6
Fixed correct name prefix for DB JSON file uploads
Jooorgen Jul 31, 2023
f1371e9
Chane directory to one with more space
Jooorgen Jul 31, 2023
d1a8d31
Added singularity cachedir env variable and exported correct CXX vari…
Jooorgen Aug 1, 2023
217b752
Moved the slurm command to the profiler
Jooorgen Aug 1, 2023
412b30d
Added linebreaks for correct execution
Jooorgen Aug 1, 2023
1aff7a4
Remove unneccessary things in workflow
Jooorgen Aug 1, 2023
9b5ba92
Updated name prefix for profiling
Jooorgen Aug 1, 2023
a97f9ff
Added singularity tmpdir variable
Jooorgen Aug 1, 2023
7fe49f7
Added HIP include in mgOnGPUconfig.h for correct compilation on HIP
Jooorgen Aug 3, 2023
61d944f
Changed references to CUDA in HIP profiler
Jooorgen Aug 3, 2023
240b52c
Added back ROCm option for testing in srun command
Jooorgen Aug 7, 2023
4bf8d98
Changed position of ROCm option
Jooorgen Aug 7, 2023
c41e2d2
Changed position of ROCm option again
Jooorgen Aug 7, 2023
2861007
Added gpu option to srun command in MI250x profiling
Jooorgen Aug 8, 2023
c5eb939
Fixed bug in buildCUDAProcess script
Jooorgen Aug 8, 2023
4bfc6fa
Improved HIP_HOME/CUDA_HOME assignment
Jooorgen Aug 8, 2023
a0658ec
Removed CVMFS for CI tests
Jooorgen Aug 9, 2023
441bd79
Revert changes to CUDA_HOME
Jooorgen Aug 9, 2023
7dbb79b
Merge pull request #8 from Jooorgen/gpu_abstraction
Jooorgen Aug 9, 2023
cad35cc
Merge remote-tracking branch 'andrea/jthip' into gpu_abstraction
Jooorgen Aug 9, 2023
e89ae42
[CODEGEN] Regenerated all .sa and .mad processes with new HIP compila…
Jooorgen Aug 9, 2023
b79fe00
Reverted changes to FC env variable
Jooorgen Aug 9, 2023
fafcb95
Merge branch 'gpu_abstraction' of github.com:Jooorgen/madgraph4gpu in…
Jooorgen Aug 9, 2023
9bb4d3f
Merge pull request #9 from Jooorgen/gpu_abstraction
Jooorgen Aug 9, 2023
3b8ce7e
Changed position of exporting GPUCC and GPUFLAGS in cudacpp.mk
Jooorgen Aug 9, 2023
609d548
Added correct HIP_PLATFORM when compiling for HIP in cudacpp_src.mk
Jooorgen Aug 10, 2023
e1bb745
Moved "-c -x cu" behind an ifeq nvcc
Jooorgen Aug 10, 2023
5097e9d
Changed ifdef back to __CUDACC__ in mgOnGpuCxtypes.h
Jooorgen Aug 10, 2023
762122b
Revert changes from last commit because it is handled elsewhere inn code
Jooorgen Aug 10, 2023
ab3a60b
Added back -c to HIP compilation in src mkfile
Jooorgen Aug 10, 2023
e3e11dc
Fix for compilation error with std::complex using cxsmpl
Jooorgen Aug 10, 2023
87031ad
Export HIPARCHFLAGS and set AMD ARCH in cudacpp_src.mk, also change C…
Jooorgen Aug 10, 2023
e859159
[CODEGEN] Added changes from gg_ttgg.mad to code generator
Jooorgen Aug 10, 2023
2920ff2
[CODEGEN] Added export of GPUCC and GPUFLAGS to codegen
Jooorgen Aug 10, 2023
be4bf04
[CODEGEN] Regenerate all 5 .sa/.mad processes (ee_mumu -> gg_ttggg) b…
Jooorgen Aug 10, 2023
ac8a2e8
Merge pull request #10 from Jooorgen/gpu_abstraction
Jooorgen Aug 10, 2023
4defb73
Fixed warning and changed HIPARCHFLAGS export so it exports to cudacp…
Jooorgen Aug 10, 2023
088b329
Added -std=c++17 to GPUFLAGS in cudacpp_src.mk
Jooorgen Aug 10, 2023
1899fe3
Revert changes to cudacpp_src.mk, exporting GPUFLAGS now working as e…
Jooorgen Aug 10, 2023
d38ba00
[CODEGEN] Fixed error in runTest.cc and reverted changes in cudacpp_s…
Jooorgen Aug 10, 2023
62b3e36
Added changes from CODEGEN into gg_ttgg.mad
Jooorgen Aug 10, 2023
efef15d
[CODEGEN] Regeneratead all 5 .sa/.mad processes ro remove all errors …
Jooorgen Aug 10, 2023
dbe3240
Merge pull request #11 from Jooorgen/gpu_abstraction
Jooorgen Aug 10, 2023
8949571
Merge remote-tracking branch 'upstream/master'
Jooorgen Aug 10, 2023
d889085
Added warnings if name prefix variable is not set
Jooorgen Aug 15, 2023
3821d30
Merge remote-tracking branch 'upstream/master'
Jooorgen Aug 16, 2023
a30343c
Merge latest remote-tracking branch 'upstream/master'
Jooorgen Aug 16, 2023
2f97348
Merge branch 'madgraph5:master' into master
Jooorgen Aug 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .github/workflows/a100_profiler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: A100 Performance Profiler

on:
schedule:
- cron: '00 00 * * *'

jobs:
sycl_A100_Profiling:
name: SYCL A100 Profiling
env:
SYCL_NAME_PREFIX: sycl_AMD-Epyc-7313_a100_gcc-11.3_cuda-12.0.1
ENABLE_CI_PROFILER: 1

MADGRAPH4GPU_DB_SECRET: ${{ secrets.MADGRAPH4GPU_DB_SECRET }}
runs-on: [self-hosted, linux, a100]
steps:
- uses: actions/checkout@v2
- name: Runs SYCL performanceProfiler.py script
run: cd tools/profiling/;
python3 performanceProfiler.py -l 'SYCL' -b 'master'
- name: Uploads SYCL JSON files to DB
run: cd tools/profiling/; python3 sendData.py --absLayer SYCL --profiler 1 --branch master

cuda_a100_Profiling:
name: CUDA A100 Profiling
env:
CUDA_NAME_PREFIX: cudacpp_AMD-Epyc-7313_a100_gcc-11.2.1_cuda-12.0.1
ENABLE_CI_PROFILER: 1

MADGRAPH4GPU_DB_SECRET: ${{ secrets.MADGRAPH4GPU_DB_SECRET }}
runs-on: [self-hosted, linux, a100]
steps:
- uses: actions/checkout@v2
- name: Runs CUDA performanceProfiler.py script
run: cd tools/profiling/;
python3 performanceProfiler.py -l 'CUDA' -b 'master'
- name: Uploads CUDA JSON files to DB
run: cd tools/profiling/; python3 sendData.py --absLayer CUDA --profiler 1 --branch master
33 changes: 24 additions & 9 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epoch1/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum , epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum ]
folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum,
epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx,
epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg,
epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg,
epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg ]
fail-fast: false
steps:

- uses: actions/checkout@v2
- name: make epoch1
- name: make epochX
run: make -C ${{ matrix.folder }} debug
CPU:
runs-on: ubuntu-latest
strategy:
matrix:
folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg ]
folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum,
epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx,
epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg,
epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg,
epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg ]
precision: [ d , f , m ]
fail-fast: false
steps:
Expand All @@ -38,7 +47,11 @@ jobs:
FC: gfortran-11
strategy:
matrix:
folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum, epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg ]
folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum,
epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx,
epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg,
epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg,
epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg ]
precision: [ d , f , m ]
fail-fast: false
steps:
Expand All @@ -50,20 +63,22 @@ jobs:
- name: make check
run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} check
GPU:
runs-on: self-hosted
runs-on: [self-hosted, linux, a100]
env:
CUDA_HOME: /usr/local/cuda/
FC: gfortran
REQUIRE_CUDA: 1
FC: gfortran
strategy:
matrix:
folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg ]
folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum,
epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx,
epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg,
epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg,
epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg ]
precision: [ d , f , m ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: path
run: echo "PATH=$PATH"
- name: make info
run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} info
- name: make
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/mi250x_profiler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: MI250X Performance Profiler

on:
push:
branches: [ gpu_abstraction ]

jobs:
Container_Setup_and_Execution:
runs-on: [self-hosted, linux, a100]
name: Container Setup and Execution
steps:
- name: Generate runner token
id: generate_token
run: |
TOKEN=$(curl -XPOST -fsSL \
-H "Authorization: token ${{ secrets.PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/actions/runners/registration-token" \
| grep -o '"token": *"[^"]*"' | cut -d '"' -f 4)
echo "token=$TOKEN" >> $GITHUB_OUTPUT
- name: SSH and run Docker container
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
MI250X_PROFILING_HOST: ${{ secrets.MI250X_PROFILING_HOST }}
MI250X_PROFILING_USER: ${{ secrets.MI250X_PROFILING_USER }}
HPC_ACCOUNT: ${{ secrets.HPC_ACCOUNT }}
HPC_PROJECT: ${{ secrets.HPC_PROJECT }}
SINGULARITY_CACHEDIR: /scratch/$HPC_ACCOUNT/$MI250X_PROFILING_USER/
SINGULARITY_TMPDIR: /scratch/$HPC_ACCOUNT/$MI250X_PROFILING_USER/
continue-on-error: true
run: |
echo "$SSH_PRIVATE_KEY" > id_rsa
chmod 600 id_rsa
ssh -o StrictHostKeyChecking=no -i id_rsa $MI250X_PROFILING_USER@$MI250X_PROFILING_HOST "\
cd /scratch/$HPC_ACCOUNT/$MI250X_PROFILING_USER/ && \
singularity pull --force oras://ghcr.io/${{ github.repository_owner }}/github_runner_mi250x:latest && \
srun --account=$HPC_ACCOUNT -p $HPC_PROJECT --gpus=1 --time=03:00:00 singularity run --rocm \
--env GITHUB_TOKEN=${{ steps.generate_token.outputs.token }} \
--env REPO_URL=https://github.com/${{ github.repository }} \
--env RUNNER_NAME=github_runner_mi250x \
--env GITHUB_RUNNER_TAGS='Linux,x64,mi250x' \
--env RUNNER_URL=https://github.com/actions/runner/releases/download/v2.303.0/actions-runner-linux-x64-2.303.0.tar.gz \
github_runner_mi250x_latest.sif"

HIP_MI250X_Profiling:
runs-on: [self-hosted, linux, mi250x]
name: HIP MI250X Profiling
env:
HIP_NAME_PREFIX: hip_AMD-Epyc-7A53_MI250X_gcc-11.2.1_rocm-5.2.3
ENABLE_CI_PROFILER: 1
MADGRAPH4GPU_DB_SECRET: ${{ secrets.MADGRAPH4GPU_DB_SECRET }}
steps:
- uses: actions/checkout@v2
- name: Runs HIP performanceProfiler.py script
run: cd tools/profiling/;
python3 performanceProfiler.py -l 'HIP' -b 'master'

- name: Uploads workplace_mg4gpu directory as an artifact
uses: actions/upload-artifact@v3
with:
name: profiling-results
path: tools/profiling/workplace_mg4gpu

Upload_JSON_files:
needs: HIP_MI250X_Profiling
runs-on: [self-hosted, linux]
name: Upload JSON files to DB
env:
HIP_NAME_PREFIX: hip_AMD-Epyc-7A53_MI250X_gcc-11.2.1_rocm-5.2.3
ENABLE_CI_PROFILER: 1
MADGRAPH4GPU_DB_SECRET: ${{ secrets.MADGRAPH4GPU_DB_SECRET }}
steps:
- uses: actions/checkout@v2
- name: Download artifact containing profiling data
uses: actions/download-artifact@v3
with:
name: profiling-results
path: tools/profiling
- name: Uploads HIP JSON files to DB
run: cd tools/profiling; python3 sendData.py --absLayer HIP --profiler 1 --branch master
49 changes: 49 additions & 0 deletions .github/workflows/sycl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: SYCL CI

on:
push:
branches: [ master ]
paths:
- 'epochX/sycl/**'
pull_request:
branches: [ master ]
paths:
- 'epochX/sycl/**'

jobs:
GPU:
runs-on: [self-hosted, linux, a100]
env:
FC: gfortran
REQUIRE_CUDA: 1
SYCLFLAGS: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -Xclang -fdenormal-fp-math=ieee
ENABLE_CI_PROFILER: 1
strategy:
matrix:
folder: [ epochX/sycl/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum,
epochX/sycl/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx,
epochX/sycl/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg,
epochX/sycl/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg,
epochX/sycl/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg ]
precision: [ d , f ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: make info
run: source /cvmfs/sft.cern.ch/lcg/releases/gcc/11.3.0-ad0f5/x86_64-centos8/setup.sh;
source /cvmfs/projects.cern.ch/intelsw/oneAPI/linux/x86_64/2023/setvars.sh --include-intel-llvm;
CXX=/cvmfs/projects.cern.ch/intelsw/oneAPI/linux/x86_64/2023/compiler/2023.0.0/linux/bin-llvm/clang++;
LD_LIBRARY_PATH=${{ github.workspace }}/${{ matrix.folder }}/../../lib:$LD_LIBRARY_PATH;
make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} info
- name: make
run: source /cvmfs/sft.cern.ch/lcg/releases/gcc/11.3.0-ad0f5/x86_64-centos8/setup.sh;
source /cvmfs/projects.cern.ch/intelsw/oneAPI/linux/x86_64/2023/setvars.sh --include-intel-llvm;
CXX=/cvmfs/projects.cern.ch/intelsw/oneAPI/linux/x86_64/2023/compiler/2023.0.0/linux/bin-llvm/clang++;
LD_LIBRARY_PATH=${{ github.workspace }}/${{ matrix.folder }}/../../lib:$LD_LIBRARY_PATH;
make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }}
- name: make check
run: source /cvmfs/sft.cern.ch/lcg/releases/gcc/11.3.0-ad0f5/x86_64-centos8/setup.sh;
source /cvmfs/projects.cern.ch/intelsw/oneAPI/linux/x86_64/2023/setvars.sh --include-intel-llvm;
CXX=/cvmfs/projects.cern.ch/intelsw/oneAPI/linux/x86_64/2023/compiler/2023.0.0/linux/bin-llvm/clang++;
LD_LIBRARY_PATH=${{ github.workspace }}/${{ matrix.folder }}/../../lib:$LD_LIBRARY_PATH;
make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} check
39 changes: 39 additions & 0 deletions .github/workflows/v100s_profiler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: V100s Performance Profiler

on:
schedule:
- cron: '00 00 * * *'

jobs:

sycl_v100s_Profiling:
name: SYCL V100S Profiling
env:
SYCL_NAME_PREFIX: sycl_Xeon-Silver-4216_v100s_gcc-11.3_cuda-12.0.1
ENABLE_CI_PROFILER: 1

MADGRAPH4GPU_DB_SECRET: ${{ secrets.MADGRAPH4GPU_DB_SECRET }}
runs-on: [self-hosted, linux, v100s]
steps:
- uses: actions/checkout@v2
- name: Runs SYCL performanceProfiler.py script
run: cd tools/profiling/;
python3 performanceProfiler.py -l 'SYCL' -b 'master'
- name: Uploads SYCL JSON files to DB
run: cd tools/profiling/; python3 sendData.py --absLayer SYCL --profiler 1 --branch master

cuda_v100s_Profiling:
name: CUDA V100S Profiling
env:
CUDA_NAME_PREFIX: cudacpp_Xeon-Silver-4216_v100s_gcc-11.3_cuda-12.0.1
ENABLE_CI_PROFILER: 1

MADGRAPH4GPU_DB_SECRET: ${{ secrets.MADGRAPH4GPU_DB_SECRET }}
runs-on: [self-hosted, linux, v100s]
steps:
- uses: actions/checkout@v2
- name: Runs CUDA performanceProfiler.py script
run: cd tools/profiling/;
python3 performanceProfiler.py -l 'CUDA' -b 'master'
- name: Uploads CUDA JSON files to DB
run: cd tools/profiling/; python3 sendData.py --absLayer CUDA --profiler 1 --branch master
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ generates includes the following authors:
Stephan Hageboeck (CERN)
Olivier Mattelaer (Universite Catholique de Louvain, original author)
Stefan Roiser (CERN, original author)
Joergen Teig (CERN)
Andrea Valassi (CERN, original author)
Zenny Wettersten (CERN)

Expand All @@ -28,5 +29,4 @@ acknowledged collaboration with the following collaborators:
Taran Singhania (PES University Bangalore)
David Smith (CERN)
Carl Vuosalo (University of Wisconsin-Madison)
Joergen Teig (CERN)

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The full development team currently includes the following authors :
Stephan Hageboeck (CERN)
Olivier Mattelaer (Universite Catholique de Louvain, original author)
Stefan Roiser (CERN, original author)
Joergen Teig (CERN)
Andrea Valassi (CERN, original author)
Zenny Wettersten (CERN)
See https://github.com/madgraph5/madgraph4gpu for more details. For the full
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Copyright (C) 2020-2023 CERN and UCLouvain.
// Licensed under the GNU Lesser General Public License (version 3 or later).
// Modified by: A. Valassi (Sep 2021) for the MG5aMC CUDACPP plugin.
// Further modified by: A. Valassi (2021-2023) for the MG5aMC CUDACPP plugin.
// Further modified by: J. Teig, A. Valassi (2021-2023) for the MG5aMC CUDACPP plugin.
//==========================================================================
// This file has been automatically generated for CUDA/C++ standalone by
%(info_lines)s
Expand All @@ -15,7 +15,7 @@
#include <iomanip>
#include <iostream>

#ifdef __CUDACC__
#ifdef MGONGPUCPP_GPUIMPL
using namespace mg5amcGpu;
#else
using namespace mg5amcCpu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "read_slha.h"

// NB: namespaces mg5amcGpu and mg5amcCpu includes types which are defined in different ways for CPU and GPU builds (see #318 and #725)
#ifdef __CUDACC__
#ifdef MGONGPUCPP_GPUIMPL
namespace mg5amcGpu
#else
namespace mg5amcCpu
Expand Down Expand Up @@ -85,7 +85,7 @@ namespace mg5amcCpu
#include <limits>

// NB: namespaces mg5amcGpu and mg5amcCpu includes types which are defined in different ways for CPU and GPU builds (see #318 and #725)
#ifdef __CUDACC__
#ifdef MGONGPUCPP_GPUIMPL
namespace mg5amcGpu
#else
namespace mg5amcCpu
Expand Down Expand Up @@ -155,7 +155,7 @@ namespace mg5amcCpu
//==========================================================================

// NB: namespaces mg5amcGpu and mg5amcCpu includes types which are defined in different ways for CPU and GPU builds (see #318 and #725)
#ifdef __CUDACC__
#ifdef MGONGPUCPP_GPUIMPL
namespace mg5amcGpu
#else
namespace mg5amcCpu
Expand All @@ -172,7 +172,7 @@ namespace mg5amcCpu
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable" // e.g. <<warning: unused variable ‘mdl_G__exp__2’ [-Wunused-variable]>>
#pragma GCC diagnostic ignored "-Wunused-parameter" // e.g. <<warning: unused parameter ‘G’ [-Wunused-parameter]>>
#ifdef __CUDACC__
#ifdef MGONGPUCPP_GPUIMPL
#pragma nv_diagnostic push
#pragma nv_diag_suppress 177 // e.g. <<warning #177-D: variable "mdl_G__exp__2" was declared but never referenced>>
#endif
Expand All @@ -196,7 +196,7 @@ namespace mg5amcCpu
%(eftspecial2)s
return out;
}
#ifdef __CUDACC__
#ifdef MGONGPUCPP_GPUIMPL
#pragma GCC diagnostic pop
#pragma nv_diagnostic pop
#endif
Expand Down
Loading
Loading