Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 31 additions & 20 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
}
},
{
"name": "dev-fp32",
"displayName": "FP32 Developer Configuration: Build all Dependencies",
"name": "prefetch-fp32",
"displayName": "FP32 Developer Configuration: Pretech/Configure all Dependencies",
"inherits": [ "default-fp32" ],
"cacheVariables": {
"DETRAY_BUILD_TESTING": "TRUE",
"DETRAY_SETUP_EIGEN": "TRUE",
"DETRAY_SETUP_EIGEN3": "TRUE",
"DETRAY_SETUP_FASTOR": "TRUE",
"DETRAY_SETUP_VC": "TRUE",
"DETRAY_SETUP_ACTSVG": "TRUE",
Expand All @@ -42,9 +42,31 @@
"DETRAY_SETUP_NLOHMANN": "TRUE"
}
},
{
"name": "prefetch-fp64",
"displayName": "FP64 Developer Configuration: Pretech/Configure all Dependencies",
"inherits": [ "prefetch-fp32" ],
"cacheVariables": {
"DETRAY_CUSTOM_SCALARTYPE" : "double"
}
},
{
"name": "dev-fp32",
"displayName": "FP32 Developer Configuration: Build main Components",
"inherits": [ "default-fp32" ],
"cacheVariables": {
"DETRAY_BUILD_TESTING": "TRUE",
"DETRAY_ARRAY_PLUGIN": "TRUE",
"DETRAY_BUILD_UNITTESTS": "TRUE",
"DETRAY_BUILD_INTEGRATIONTESTS": "TRUE",
"DETRAY_BUILD_TUTORIALS": "TRUE",
"DETRAY_BUILD_BENCHMARKS": "TRUE",
"DETRAY_BUILD_CLI_TOOLS": "TRUE"
}
},
{
"name": "dev-fp64",
"displayName": "FP64 Developer Configuration: Build all Dependencies",
"displayName": "FP64 Developer Configuration: Build main Components",
"inherits": [ "dev-fp32" ],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sort of throws the natural-looking dependency stricture out of the window, but I think it's better to make the fp64 versions inherit from the fp32 versions. And then just override "DETRAY_CUSTOM_SCALARTYPE" in them.

This way the "complicated" part of the configuration only has to be written once.

Again, I agree that this is a bit counter-intuitive. But I think that's the best way of organizing this code.

"cacheVariables": {
"DETRAY_CUSTOM_SCALARTYPE" : "double"
Expand All @@ -56,6 +78,7 @@
"inherits": [ "default-fp32" ],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"DETRAY_ARRAY_PLUGIN" : "TRUE",
"DETRAY_EIGEN_PLUGIN" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "TRUE",
"DETRAY_VC_AOS_PLUGIN" : "TRUE",
Expand All @@ -79,7 +102,7 @@
{
"name" : "cuda",
"displayName" : "CUDA Developer Configuration",
"inherits" : [ "default-fp32" ],
"inherits" : [ "dev-fp32" ],
"cacheVariables" : {
"DETRAY_BUILD_CUDA" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "FALSE",
Expand All @@ -91,7 +114,7 @@
{
"name" : "sycl",
"displayName" : "SYCL Developer Configuration",
"inherits" : [ "default-fp32" ],
"inherits" : [ "dev-fp32" ],
"cacheVariables" : {
"DETRAY_BUILD_SYCL" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "FALSE",
Expand All @@ -101,21 +124,9 @@
}
},
{
"name": "hip-fp32",
"displayName": "HIP Developer Configuration",
"inherits" : [ "default-fp32" ],
"cacheVariables" : {
"DETRAY_BUILD_HIP" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "FALSE",
"DETRAY_VC_AOS_PLUGIN" : "FALSE",
"DETRAY_VC_SOA_PLUGIN" : "FALSE",
"DETRAY_SMATRIX_PLUGIN" : "FALSE"
}
},
{
"name": "hip-fp64",
"name": "hip",
"displayName": "HIP Developer Configuration",
"inherits" : [ "default-fp64" ],
"inherits" : [ "dev-fp32" ],
"cacheVariables" : {
"DETRAY_BUILD_HIP" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "FALSE",
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ For a developer build, the `dev-fp32` and `dev-fp64` configurations are availabl
```shell
cmake -S detray -B detray-build --preset dev-fp32
```
The developer presets will fetch all dependencies, but not automatically trigger the build of additional detray components. For example, in order to trigger the build of the unit tests, the corresponding option needs to be specified:
The developer presets will build the components of detray that are most commonly used. The `prefetch` presets on the other hand will configure all possible dependencies, but not automatically trigger the build of the corresponding components. For example, in order to trigger the build of the unit tests with the `prefetch` preset, the corresponding option needs to be specified:
```shell
cmake -S detray -B detray-build --preset dev-fp32 \
-DDETRAY_BUILD_UNITTESTS=ON
cmake -S detray -B detray-build --preset prefetch-fp32 \
-DDETRAY_ARRAY_PLUGIN=ON -DDETRAY_BUILD_UNITTESTS=ON
```
A full build, containing all components (e.g. tests and benchmarks), can be configured using the `full-fp32` and `full-fp64` presets.

Expand Down
Loading