Skip to content

Commit f5f0a5b

Browse files
authored
Update Presets, main branch (2024.10.25.) (#753)
* Re-designed the project's build presets. * Fixed some newly found FP32<->FP64 issues. * Made the CIs use the updated build presets. Also removed the c++ standard configurability from the GitHub CI, as we only (really) support C++20 at the moment in this project. * Stopped the Alpaka and Kokkos presets from depending on CUDA. I wanted that to serve as a nudge for making the CUDA-enabled variants of those builds functional, but for the CI it is just causing more trouble than it's worth at the moment. * Vc is not available alongside ROOT in the Acts Docker images. * Updated the macOS build to the correct preset.
1 parent 05279ac commit f5f0a5b

File tree

6 files changed

+117
-68
lines changed

6 files changed

+117
-68
lines changed

.github/workflows/builds.yml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ jobs:
2626
platform:
2727
- name: CPU
2828
container: ghcr.io/acts-project/ubuntu2404:56
29-
cxx_standard: "20"
30-
options:
29+
options: --preset host-fp32 -DALGEBRA_PLUGINS_USE_SYSTEM_VC=FALSE
3130
run_tests: true
31+
- name: CPU
32+
container: ghcr.io/acts-project/ubuntu2404:56
33+
options: --preset host-fp64 -DALGEBRA_PLUGINS_USE_SYSTEM_VC=FALSE
34+
run_tests: false
3235
- name: CUDA
3336
container: ghcr.io/acts-project/ubuntu2404_cuda:56
34-
cxx_standard: "20"
35-
options: -DTRACCC_BUILD_CUDA=TRUE -DCMAKE_CUDA_FLAGS="-std=c++20"
37+
options: --preset cuda-fp32
3638
run_tests: false
3739
- name: SYCL
3840
container: ghcr.io/acts-project/ubuntu2404_oneapi:56
39-
cxx_standard: "20"
40-
options: -DTRACCC_BUILD_SYCL=TRUE -DCMAKE_SYCL_FLAGS="-fsycl -fsycl-targets=spir64"
41+
options: --preset sycl-fp32 -DCMAKE_SYCL_FLAGS="-fsycl -fsycl-targets=spir64"
4142
run_tests: true
4243
- name: KOKKOS
4344
container: ghcr.io/acts-project/ubuntu2404:56
44-
cxx_standard: "20"
45-
options: -DTRACCC_BUILD_KOKKOS=TRUE
45+
options: --preset kokkos-fp32
4646
run_tests: false
4747
build:
4848
- Release
@@ -51,34 +51,31 @@ jobs:
5151
- platform:
5252
name: CUDA
5353
container: ghcr.io/acts-project/ubuntu2404_cuda:56
54-
cxx_standard: "20"
55-
options: -DTRACCC_CUSTOM_SCALARTYPE=double -DDETRAY_CUSTOM_SCALARTYPE=double -DTRACCC_BUILD_CUDA=TRUE -DCMAKE_CUDA_FLAGS="-std=c++20"
54+
options: --preset cuda-fp64
5655
run_tests: false
5756
build: Release
5857
- platform:
5958
name: "SYCL"
6059
container: ghcr.io/acts-project/ubuntu2404_cuda_oneapi:56
61-
cxx_standard: "20"
62-
options: -DTRACCC_BUILD_SYCL=TRUE -DTRACCC_BUILD_CUDA=FALSE -DVECMEM_BUILD_CUDA_LIBRARY=FALSE
60+
options: --preset sycl-fp32
61+
run_tests: false
6362
build: Release
6463
- platform:
6564
name: "SYCL"
6665
container: ghcr.io/acts-project/ubuntu2404_rocm_oneapi:56
67-
cxx_standard: "20"
68-
options: -DTRACCC_BUILD_SYCL=TRUE -DVECMEM_BUILD_HIP_LIBRARY=FALSE
66+
options: --preset sycl-fp32
67+
run_tests: false
6968
build: Release
7069
- platform:
7170
name: ALPAKA
7271
container: ghcr.io/acts-project/ubuntu2404:56
73-
cxx_standard: "20"
74-
options: -DTRACCC_BUILD_ALPAKA=TRUE
72+
options: --preset alpaka-fp32
7573
run_tests: true
7674
build: Release
7775
- platform:
7876
name: ALPAKA
7977
container: ghcr.io/acts-project/ubuntu2404:56
80-
cxx_standard: "20"
81-
options: -DTRACCC_BUILD_ALPAKA=TRUE
78+
options: --preset alpaka-fp32
8279
run_tests: false
8380
build: Debug
8481
# Use BASH as the shell from the images.
@@ -92,12 +89,7 @@ jobs:
9289
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.platform.name }}
9390
cmake \
9491
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
95-
-DCMAKE_CXX_STANDARD=${{ matrix.platform.cxx_standard }} \
96-
-DCMAKE_CUDA_STANDARD=${{ matrix.platform.cxx_standard }} \
97-
-DCMAKE_HIP_STANDARD=${{ matrix.platform.cxx_standard }} \
98-
-DCMAKE_SYCL_STANDARD=${{ matrix.platform.cxx_standard }} \
9992
${{ matrix.platform.options }} \
100-
-DTRACCC_FAIL_ON_WARNINGS=TRUE \
10193
-S ${GITHUB_WORKSPACE} \
10294
-B build
10395
- name: Build
@@ -126,7 +118,7 @@ jobs:
126118
- name: Install dependencies
127119
run: brew install boost
128120
- name: Configure
129-
run: cmake --preset base -S ${GITHUB_WORKSPACE} -B build
121+
run: cmake --preset base-fp32 -S ${GITHUB_WORKSPACE} -B build
130122
- name: Build
131123
run: cmake --build build
132124
- name: Download data files

.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ build:cuda:
5656
image: ghcr.io/acts-project/ubuntu2204_cuda:56
5757
variables:
5858
TRACCC_BUILD_TYPE: CUDA
59-
TRACCC_BUILD_PRESET: cuda
59+
TRACCC_BUILD_PRESET: cuda-fp32
6060

6161
# CUDA test job.
6262
test:cuda:
@@ -73,7 +73,7 @@ build:sycl_intel:
7373
image: ghcr.io/acts-project/ubuntu2404_oneapi:56
7474
variables:
7575
TRACCC_BUILD_TYPE: SYCL
76-
TRACCC_BUILD_PRESET: sycl
76+
TRACCC_BUILD_PRESET: sycl-fp32
7777
TRACCC_SYCL_FLAGS: -fsycl -fsycl-targets=spir64
7878
TRACCC_CMAKE_ARGS: -DTRACCC_BUILD_CUDA=FALSE
7979

@@ -93,7 +93,7 @@ build:sycl_nvidia:
9393
image: ghcr.io/acts-project/ubuntu2204_cuda_oneapi:56
9494
variables:
9595
TRACCC_BUILD_TYPE: SYCL
96-
TRACCC_BUILD_PRESET: sycl
96+
TRACCC_BUILD_PRESET: sycl-fp32
9797
TRACCC_SYCL_FLAGS: -fsycl -fsycl-targets=nvidia_gpu_sm_75 -Wno-unknown-cuda-version -Wno-deprecated-declarations
9898
TRACCC_CXX_FLAGS: -Wno-deprecated-declarations
9999
TRACCC_CMAKE_ARGS: -DTRACCC_BUILD_CUDA=FALSE

CMakePresets.json

Lines changed: 92 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,83 +2,140 @@
22
"version" : 3,
33
"configurePresets": [
44
{
5-
"name" : "base",
6-
"displayName" : "Base Configuration",
5+
"name" : "base-fp32",
6+
"displayName" : "Base FP32 Configuration",
77
"warnings": {
88
"deprecated": true
99
},
1010
"cacheVariables": {
11-
"CMAKE_BUILD_TYPE" : "RelWithDebInfo",
12-
"TRACCC_BUILD_TESTING" : "TRUE",
13-
"TRACCC_BUILD_EXAMPLES" : "TRUE",
14-
"TRACCC_FAIL_ON_WARNINGS" : "TRUE",
15-
"TRACCC_USE_ROOT" : "FALSE"
11+
"CMAKE_BUILD_TYPE" : "RelWithDebInfo",
12+
"TRACCC_BUILD_TESTING" : "TRUE",
13+
"TRACCC_BUILD_EXAMPLES" : "TRUE",
14+
"TRACCC_BUILD_BENCHMARKS" : "TRUE",
15+
"TRACCC_FAIL_ON_WARNINGS" : "TRUE",
16+
"TRACCC_USE_ROOT" : "FALSE",
17+
"TRACCC_ALGEBRA_PLUGINS" : "ARRAY",
18+
"TRACCC_CUSTOM_SCALARTYPE" : "float",
19+
"DETRAY_CUSTOM_SCALARTYPE" : "float"
1620
}
1721
},
1822
{
19-
"name" : "cuda",
20-
"displayName" : "CUDA Code Development",
21-
"inherits": ["base"],
23+
"name" : "base-fp64",
24+
"displayName" : "Base FP64 Configuration",
25+
"warnings": {
26+
"deprecated": true
27+
},
28+
"cacheVariables": {
29+
"CMAKE_BUILD_TYPE" : "RelWithDebInfo",
30+
"TRACCC_BUILD_TESTING" : "TRUE",
31+
"TRACCC_BUILD_EXAMPLES" : "TRUE",
32+
"TRACCC_BUILD_BENCHMARKS" : "TRUE",
33+
"TRACCC_FAIL_ON_WARNINGS" : "TRUE",
34+
"TRACCC_USE_ROOT" : "FALSE",
35+
"TRACCC_ALGEBRA_PLUGINS" : "ARRAY",
36+
"TRACCC_CUSTOM_SCALARTYPE" : "double",
37+
"DETRAY_CUSTOM_SCALARTYPE" : "double"
38+
}
39+
},
40+
{
41+
"name" : "cuda-fp32",
42+
"displayName" : "CUDA FP32 Code Development",
43+
"inherits": ["base-fp32"],
2244
"cacheVariables": {
2345
"TRACCC_BUILD_CUDA" : "TRUE",
2446
"VECMEM_BUILD_CUDA_LIBRARY" : "TRUE"
2547
}
2648
},
2749
{
28-
"name" : "sycl",
29-
"displayName" : "SYCL Code Development",
30-
"inherits": ["base"],
50+
"name" : "cuda-fp64",
51+
"displayName" : "CUDA FP64 Code Development",
52+
"inherits": ["base-fp64"],
53+
"cacheVariables": {
54+
"TRACCC_BUILD_CUDA" : "TRUE",
55+
"VECMEM_BUILD_CUDA_LIBRARY" : "TRUE"
56+
}
57+
},
58+
{
59+
"name" : "sycl-fp32",
60+
"displayName" : "SYCL FP32 Code Development",
61+
"inherits": ["base-fp32"],
62+
"cacheVariables": {
63+
"TRACCC_BUILD_SYCL" : "TRUE",
64+
"VECMEM_BUILD_SYCL_LIBRARY" : "TRUE"
65+
}
66+
},
67+
{
68+
"name" : "sycl-fp64",
69+
"displayName" : "SYCL FP64 Code Development",
70+
"inherits": ["base-fp64"],
3171
"cacheVariables": {
3272
"TRACCC_BUILD_SYCL" : "TRUE",
3373
"VECMEM_BUILD_SYCL_LIBRARY" : "TRUE"
3474
}
3575
},
3676
{
37-
"name" : "alpaka",
38-
"displayName" : "Alpaka Code Development",
39-
"inherits": ["cuda"],
77+
"name" : "alpaka-fp32",
78+
"displayName" : "Alpaka FP32 Code Development",
79+
"inherits": ["base-fp32"],
4080
"cacheVariables": {
4181
"TRACCC_BUILD_ALPAKA" : "TRUE"
4282
}
4383
},
4484
{
45-
"name" : "kokkos",
46-
"displayName" : "Kokkos Code Development",
47-
"inherits": ["cuda"],
85+
"name" : "alpaka-fp64",
86+
"displayName" : "Alpaka FP64 Code Development",
87+
"inherits": ["base-fp64"],
88+
"cacheVariables": {
89+
"TRACCC_BUILD_ALPAKA" : "TRUE"
90+
}
91+
},
92+
{
93+
"name" : "kokkos-fp32",
94+
"displayName" : "Kokkos FP32 Code Development",
95+
"inherits": ["base-fp32"],
4896
"cacheVariables": {
4997
"TRACCC_BUILD_KOKKOS" : "TRUE"
5098
}
5199
},
52100
{
53-
"name" : "root",
54-
"displayName" : "ROOT Enabled Code Development",
55-
"inherits": ["base"],
101+
"name" : "kokkos-fp64",
102+
"displayName" : "Kokkos FP64 Code Development",
103+
"inherits": ["base-fp64"],
104+
"cacheVariables": {
105+
"TRACCC_BUILD_KOKKOS" : "TRUE"
106+
}
107+
},
108+
{
109+
"name" : "host-fp32",
110+
"displayName": "Host FP32 Code Development",
111+
"inherits": ["base-fp32"],
56112
"cacheVariables": {
57113
"TRACCC_USE_ROOT" : "TRUE",
58114
"TRACCC_USE_SYSTEM_TBB" : "TRUE",
59115
"ALGEBRA_PLUGINS_USE_SYSTEM_VC" : "TRUE"
60116
}
61117
},
62118
{
63-
"name" : "array",
64-
"displayName" : "ARRAY Backended Code Development",
65-
"inherits": ["base"],
119+
"name" : "host-fp64",
120+
"displayName": "Host FP64 Code Development",
121+
"inherits": ["base-fp64"],
66122
"cacheVariables": {
67-
"TRACCC_ALGEBRA_PLUGINS" : "ARRAY"
123+
"TRACCC_USE_ROOT" : "TRUE",
124+
"TRACCC_USE_SYSTEM_TBB" : "TRUE",
125+
"ALGEBRA_PLUGINS_USE_SYSTEM_VC" : "TRUE"
68126
}
69127
},
70128
{
71-
"name" : "eigen",
72-
"displayName" : "EIGEN Backended Code Development",
73-
"inherits": ["base"],
74-
"cacheVariables": {
75-
"TRACCC_ALGEBRA_PLUGINS" : "EIGEN"
76-
}
129+
"name" : "full-fp32",
130+
"displayName": "Full FP32 Code Development",
131+
"inherits": ["host-fp32", "cuda-fp32", "sycl-fp32", "alpaka-fp32",
132+
"kokkos-fp32"]
77133
},
78134
{
79-
"name" : "default",
80-
"displayName": "Default Build Configuration",
81-
"inherits": ["root", "array"]
135+
"name" : "full-fp64",
136+
"displayName": "Full FP64 Code Development",
137+
"inherits": ["host-fp64", "cuda-fp64", "sycl-fp64", "alpaka-fp64",
138+
"kokkos-fp64"]
82139
}
83140
]
84141
}

benchmarks/common/benchmarks/toy_detector_benchmark.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class ToyDetectorBenchmark : public benchmark::Fixture {
129129

130130
// Set constrained step size to 1 mm
131131
sim.get_config().propagation.stepping.step_constraint =
132-
1.f * detray::unit<traccc::scalar>::mm;
132+
1.f * detray::unit<float>::mm;
133133

134134
sim.run();
135135

tests/common/tests/kalman_fitting_wire_chamber_test.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class KalmanFittingWireChamberTests : public KalmanFittingTests {
3434
static constexpr vector3 B{0, 0, 2 * detray::unit<scalar>::T};
3535

3636
/// Step constraint
37-
static const inline scalar step_constraint = 1 * detray::unit<scalar>::mm;
37+
static const inline float step_constraint = 1.f * detray::unit<float>::mm;
3838

3939
// Set mask tolerance to a large value not to miss the surface during KF
4040
static const inline scalar mask_tolerance = 75.f * detray::unit<scalar>::um;

tests/cpu/test_seeding.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ TEST(seeding, case1) {
3939
traccc::seedfilter_config filter_config;
4040

4141
// Adjust parameters
42-
finder_config.deltaRMax = 100.f * unit<scalar>::mm;
43-
finder_config.maxPtScattering = 0.5f * unit<scalar>::GeV;
42+
finder_config.deltaRMax = 100.f * unit<float>::mm;
43+
finder_config.maxPtScattering = 0.5f * unit<float>::GeV;
4444
traccc::seeding_algorithm sa(finder_config, grid_config, filter_config,
4545
host_mr);
4646

@@ -81,8 +81,8 @@ TEST(seeding, case2) {
8181
traccc::seedfilter_config filter_config;
8282

8383
// Adjust parameters
84-
finder_config.deltaRMax = 100.f * unit<scalar>::mm;
85-
finder_config.maxPtScattering = 0.5f * unit<scalar>::GeV;
84+
finder_config.deltaRMax = 100.f * unit<float>::mm;
85+
finder_config.maxPtScattering = 0.5f * unit<float>::GeV;
8686
traccc::seeding_algorithm sa(finder_config, grid_config, filter_config,
8787
host_mr);
8888

0 commit comments

Comments
 (0)