Skip to content

Commit 61488ca

Browse files
author
Alexander Strack
committed
Add HPX cmake present and components
1 parent f5349b0 commit 61488ca

File tree

8 files changed

+179
-6
lines changed

8 files changed

+179
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ install(FILES
829829
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmHIPTargets.cmake"
830830
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmOpenCLTargets.cmake"
831831
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmOpenMPTargets.cmake"
832+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmHPXTargets.cmake"
832833
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmAdaptiveCppTargets.cmake"
833834
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmDPCPPTargets.cmake"
834835
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmstdparTargets.cmake"

CMakePresets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"version": 6,
33
"include": [
44
"cmake/presets/openmp.json",
5+
"cmake/presets/hpx.json",
56
"cmake/presets/stdpar.json",
67
"cmake/presets/stdpar_gcc.json",
78
"cmake/presets/stdpar_nvhpc.json",
@@ -15,4 +16,4 @@
1516
"cmake/presets/dpcpp.json",
1617
"cmake/presets/all.json"
1718
]
18-
}
19+
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ Available configure presets:
358358
"openmp" - OpenMP backend
359359
"openmp_python" - OpenMP backend + Python bindings
360360
"openmp_test" - OpenMP backend tests
361+
"hpx" - HPX backend
362+
"hpx_python" - HPX backend + Python bindings
363+
"hpx_test" - HPX backend tests
361364
"cuda" - CUDA backend
362365
"cuda_python" - CUDA backend + Python bindings
363366
"cuda_test" - CUDA backend tests
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Authors: Alexander Van Craen, Marcel Breyer, Alexander Strack
2+
## Copyright (C): 2018-today The PLSSVM project - All Rights Reserved
3+
## License: This file is part of the PLSSVM project which is released under the MIT license.
4+
## See the LICENSE.md file in the project root for full license information.
5+
########################################################################################################################
6+
7+
include(CMakeFindDependencyMacro)
8+
9+
# check if the HPX backend is available
10+
if (TARGET plssvm::plssvm-HPX)
11+
# enable HPX
12+
find_dependency(HPX)
13+
# set alias targets
14+
add_library(plssvm::HPX ALIAS plssvm::plssvm-HPX)
15+
add_library(plssvm::hpx ALIAS plssvm::plssvm-HPX)
16+
# set COMPONENT to be found
17+
set(plssvm_HPX_FOUND ON)
18+
else ()
19+
# set COMPONENT to be NOT found
20+
set(plssvm_HPX_FOUND OFF)
21+
endif ()

cmake/plssvm/plssvmOpenMPTargets.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
include(CMakeFindDependencyMacro)
88

9-
# check if the OpenCL backend is available
9+
# check if the OpenMP backend is available
1010
if (TARGET plssvm::plssvm-OpenMP)
1111
# enable OpenMP
1212
find_dependency(OpenMP)
@@ -18,4 +18,4 @@ if (TARGET plssvm::plssvm-OpenMP)
1818
else ()
1919
# set COMPONENT to be NOT found
2020
set(plssvm_OpenMP_FOUND OFF)
21-
endif ()
21+
endif ()

cmake/presets/all.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"cacheVariables": {
1010
"CMAKE_CXX_COMPILER": "clang++",
1111
"PLSSVM_ENABLE_OPENMP_BACKEND": "AUTO",
12+
"PLSSVM_ENABLE_HPX_BACKEND": "AUTO",
1213
"PLSSVM_ENABLE_STDPAR_BACKEND": "OFF",
1314
"PLSSVM_ENABLE_CUDA_BACKEND": "AUTO",
1415
"PLSSVM_ENABLE_HIP_BACKEND": "AUTO",
@@ -23,6 +24,7 @@
2324
"cacheVariables": {
2425
"CMAKE_CXX_COMPILER": "clang++",
2526
"PLSSVM_ENABLE_OPENMP_BACKEND": "AUTO",
27+
"PLSSVM_ENABLE_HPX_BACKEND": "AUTO",
2628
"PLSSVM_ENABLE_STDPAR_BACKEND": "OFF",
2729
"PLSSVM_ENABLE_CUDA_BACKEND": "AUTO",
2830
"PLSSVM_ENABLE_HIP_BACKEND": "AUTO",
@@ -39,6 +41,7 @@
3941
"cacheVariables": {
4042
"CMAKE_CXX_COMPILER": "clang++",
4143
"PLSSVM_ENABLE_OPENMP_BACKEND": "AUTO",
44+
"PLSSVM_ENABLE_HPX_BACKEND": "AUTO",
4245
"PLSSVM_ENABLE_STDPAR_BACKEND": "OFF",
4346
"PLSSVM_ENABLE_CUDA_BACKEND": "AUTO",
4447
"PLSSVM_ENABLE_HIP_BACKEND": "AUTO",
@@ -84,7 +87,7 @@
8487
"inherits": "common",
8588
"filter": {
8689
"include": {
87-
"name": "OpenMP.*|CUDA.*|HIP.*|OpenCL.*|AdaptiveCpp.*|DPCPP.*"
90+
"name": "OpenMP.*|HPX.*|CUDA.*|HIP.*|OpenCL.*|AdaptiveCpp.*|DPCPP.*"
8891
}
8992
}
9093
}
@@ -155,4 +158,4 @@
155158
]
156159
}
157160
]
158-
}
161+
}

cmake/presets/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"binaryDir": "build/${presetName}",
88
"cacheVariables": {
99
"PLSSVM_ENABLE_OPENMP_BACKEND": "OFF",
10+
"PLSSVM_ENABLE_HPX_BACKEND": "OFF",
1011
"PLSSVM_ENABLE_STDPAR_BACKEND": "OFF",
1112
"PLSSVM_ENABLE_CUDA_BACKEND": "OFF",
1213
"PLSSVM_ENABLE_HIP_BACKEND": "OFF",
@@ -61,4 +62,4 @@
6162
}
6263
}
6364
]
64-
}
65+
}

cmake/presets/hpx.json

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
{
2+
"version": 6,
3+
"include": ["common.json"],
4+
"configurePresets": [
5+
{
6+
"name": "hpx",
7+
"displayName": "HPX backend",
8+
"inherits": "build",
9+
"cacheVariables": {
10+
"PLSSVM_ENABLE_HPX_BACKEND": "ON",
11+
"PLSSVM_TARGET_PLATFORMS": "cpu"
12+
}
13+
},
14+
{
15+
"name": "hpx_python",
16+
"displayName": "HPX backend + Python bindings",
17+
"inherits": "build",
18+
"cacheVariables": {
19+
"PLSSVM_ENABLE_HPX_BACKEND": "ON",
20+
"PLSSVM_TARGET_PLATFORMS": "cpu",
21+
"PLSSVM_ENABLE_LANGUAGE_BINDINGS": "ON",
22+
"PLSSVM_ENABLE_PYTHON_BINDINGS": "ON"
23+
}
24+
},
25+
{
26+
"name": "hpx_test",
27+
"displayName": "HPX backend tests",
28+
"inherits": "test",
29+
"cacheVariables": {
30+
"PLSSVM_ENABLE_HPX_BACKEND": "ON",
31+
"PLSSVM_TARGET_PLATFORMS": "cpu"
32+
}
33+
}
34+
],
35+
"buildPresets": [
36+
{
37+
"name": "hpx",
38+
"displayName": "HPX backend",
39+
"configurePreset": "hpx",
40+
"configuration": "RelWithDebInfo",
41+
"inherits": "common"
42+
},
43+
{
44+
"name": "hpx_python",
45+
"displayName": "HPX backend + Python bindings",
46+
"configurePreset": "hpx_python",
47+
"configuration": "RelWithDebInfo",
48+
"inherits": "common"
49+
},
50+
{
51+
"name": "hpx_test",
52+
"displayName": "HPX backend tests",
53+
"configurePreset": "hpx_test",
54+
"configuration": "Debug",
55+
"inherits": "common"
56+
}
57+
],
58+
"testPresets": [
59+
{
60+
"name": "hpx_test",
61+
"displayName": "HPX backend all tests",
62+
"configurePreset": "hpx_test",
63+
"inherits": "common"
64+
},
65+
{
66+
"name": "hpx_backend_test",
67+
"displayName": "HPX backend specific tests",
68+
"configurePreset": "hpx_test",
69+
"inherits": "common",
70+
"filter": {
71+
"include": {
72+
"name": "HPX.*"
73+
}
74+
}
75+
}
76+
],
77+
"workflowPresets": [
78+
{
79+
"name": "hpx",
80+
"displayName": "HPX backend workflow",
81+
"steps": [
82+
{
83+
"name": "hpx",
84+
"type": "configure"
85+
},
86+
{
87+
"name": "hpx",
88+
"type": "build"
89+
}
90+
]
91+
},
92+
{
93+
"name": "hpx_python",
94+
"displayName": "HPX backend + Python bindings workflow",
95+
"steps": [
96+
{
97+
"name": "hpx_python",
98+
"type": "configure"
99+
},
100+
{
101+
"name": "hpx_python",
102+
"type": "build"
103+
}
104+
]
105+
},
106+
{
107+
"name": "hpx_test",
108+
"displayName": "HPX test workflow",
109+
"steps": [
110+
{
111+
"name": "hpx_test",
112+
"type": "configure"
113+
},
114+
{
115+
"name": "hpx_test",
116+
"type": "build"
117+
},
118+
{
119+
"name": "hpx_test",
120+
"type": "test"
121+
}
122+
]
123+
},
124+
{
125+
"name": "hpx_backend_test",
126+
"displayName": "HPX backend test workflow",
127+
"steps": [
128+
{
129+
"name": "hpx_test",
130+
"type": "configure"
131+
},
132+
{
133+
"name": "hpx_test",
134+
"type": "build"
135+
},
136+
{
137+
"name": "hpx_backend_test",
138+
"type": "test"
139+
}
140+
]
141+
}
142+
]
143+
}

0 commit comments

Comments
 (0)