Skip to content
Closed
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
97 changes: 45 additions & 52 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,23 @@
},
{
"name": "dev-fp32",
"displayName": "FP32 Developer Configuration: Build all Dependencies",
"displayName": "FP32 Developer Configuration: Build main components",
"inherits": [ "default-fp32" ],
"cacheVariables": {
"DETRAY_BUILD_TESTING": "TRUE",
"DETRAY_SETUP_EIGEN": "TRUE",
"DETRAY_SETUP_FASTOR": "TRUE",
"DETRAY_SETUP_VC": "TRUE",
"DETRAY_SETUP_ACTSVG": "TRUE",
"DETRAY_SETUP_BENCHMARK": "TRUE",
"DETRAY_SETUP_COVFIE": "TRUE",
"DETRAY_SETUP_NLOHMANN": "TRUE"
"DETRAY_BUILD_BENCHMARKS": "TRUE",
"DETRAY_BUILD_UNITTESTS": "TRUE",
"DETRAY_BUILD_INTEGRATIONTESTS": "TRUE",
"DETRAY_EIGEN_PLUGIN": "TRUE",
"DETRAY_VC_AOS_PLUGIN": "TRUE",
"DETRAY_VC_SOA_PLUGIN": "TRUE",
"DETRAY_SVG_DISPLAY": "TRUE",
"DETRAY_FAIL_ON_WARNINGS": "TRUE"
}
},
{
"name": "dev-fp64",
"displayName": "FP64 Developer Configuration: Build all Dependencies",
"displayName": "FP64 Developer Configuration: Build main components",
"inherits": [ "dev-fp32" ],
"cacheVariables": {
"DETRAY_CUSTOM_SCALARTYPE" : "double"
Expand All @@ -53,19 +54,13 @@
{
"name": "full-fp32",
"displayName": "FP32 Developer Configuration: Full Build",
"inherits": [ "default-fp32" ],
"inherits": [ "dev-fp32" ],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"DETRAY_EIGEN_PLUGIN" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "TRUE",
"DETRAY_VC_AOS_PLUGIN" : "TRUE",
"DETRAY_VC_SOA_PLUGIN" : "TRUE",
"DETRAY_SMATRIX_PLUGIN" : "TRUE",
"DETRAY_BUILD_UNITTESTS": "TRUE",
"DETRAY_BUILD_INTEGRATIONTESTS": "TRUE",
"DETRAY_BUILD_TUTORIALS": "TRUE",
"DETRAY_BUILD_BENCHMARKS": "TRUE",
"DETRAY_BUILD_CLI_TOOLS": "TRUE"
"DETRAY_BUILD_CLI_TOOLS": "TRUE",
"DETRAY_FASTOR_PLUGIN" : "TRUE",
"DETRAY_SMATRIX_PLUGIN" : "TRUE"
}
},
{
Expand All @@ -77,65 +72,63 @@
}
},
{
"name" : "cuda",
"displayName" : "CUDA Developer Configuration",
"inherits" : [ "default-fp32" ],
"name" : "cuda-fp32",
"displayName" : "CUDA FP32 Developer Configuration",
"inherits" : [ "dev-fp32" ],
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is it possible to have it inherit from the full build preset instead of modifying the dev preset? The dev preset is, in fact, not meant to turn on any of the builds by default...

The additional algebra plugins will also not do anything CUDA related and only slow the build down, so they should remain turned off for the CUDA build.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure why you're worried about modifying the dev preset. 😕 Are you using it in your own private builds?

The presets to me personally are mainly there to make development life easier. So that I could build the project in a terminal, or in an IDE, as conveniently as possible. Using these in the CI is a nice added benefit. But if we need to write a long configuration command into the CI setup, that doesn't bother me too much. What bothers me is writing those long configuration commands into a terminal while working on the code. 🤔

With that said, the CI only uses the following presets at the moment:

So again: Are you using the dev presets yourself? Because if not, the settings proposed in this PR make a lot more sense for the way that I build this code for my own purposes. 🤔

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I very rarely build all of detray when I develop, so I don't prefer to add a lot of configurations to turn everything off again. For people who like to build all of it, there is the full preset.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In case you need an intermediate way, we can also add a new preset

"cacheVariables" : {
"DETRAY_BUILD_CUDA" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "FALSE",
"DETRAY_VC_AOS_PLUGIN" : "FALSE",
"DETRAY_VC_SOA_PLUGIN" : "FALSE",
"DETRAY_SMATRIX_PLUGIN" : "FALSE"
"DETRAY_VC_SOA_PLUGIN" : "FALSE"
}
},
{
"name": "cuda-fp64",
"displayName": "CUDA FP64 Developer Configuration",
"inherits" : [ "cuda-fp32" ],
"cacheVariables" : {
"DETRAY_CUSTOM_SCALARTYPE" : "double"
}
},
{
"name" : "sycl",
"displayName" : "SYCL Developer Configuration",
"inherits" : [ "default-fp32" ],
"name" : "sycl-fp32",
"displayName" : "SYCL FP32 Developer Configuration",
"inherits" : [ "dev-fp32" ],
"cacheVariables" : {
"DETRAY_BUILD_SYCL" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "FALSE",
"DETRAY_VC_AOS_PLUGIN" : "FALSE",
"DETRAY_VC_SOA_PLUGIN" : "FALSE",
"DETRAY_SMATRIX_PLUGIN" : "FALSE"
"DETRAY_VC_SOA_PLUGIN" : "FALSE"
}
},
{
"name": "hip-fp32",
"displayName": "HIP Developer Configuration",
"inherits" : [ "default-fp32" ],
"name": "sycl-fp64",
"displayName": "SYCL FP64 Developer Configuration",
"inherits" : [ "sycl-fp32" ],
"cacheVariables" : {
"DETRAY_BUILD_HIP" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "FALSE",
"DETRAY_VC_AOS_PLUGIN" : "FALSE",
"DETRAY_VC_SOA_PLUGIN" : "FALSE",
"DETRAY_SMATRIX_PLUGIN" : "FALSE"
"DETRAY_CUSTOM_SCALARTYPE" : "double"
}
},
{
"name": "hip-fp64",
"displayName": "HIP Developer Configuration",
"inherits" : [ "default-fp64" ],
{
"name": "hip-fp32",
"displayName": "HIP FP32 Developer Configuration",
"inherits" : [ "dev-fp32" ],
"cacheVariables" : {
"DETRAY_BUILD_HIP" : "TRUE",
"DETRAY_FASTOR_PLUGIN" : "FALSE",
"DETRAY_VC_AOS_PLUGIN" : "FALSE",
"DETRAY_VC_SOA_PLUGIN" : "FALSE",
"DETRAY_SMATRIX_PLUGIN" : "FALSE"
"DETRAY_VC_SOA_PLUGIN" : "FALSE"
}
},
{
"name" : "smatrix",
"displayName" : "SMatrix Developer Configuration",
"inherits" : [ "default-fp64" ],
"name": "hip-fp64",
"displayName": "HIP FP64 Developer Configuration",
"inherits" : [ "hip-fp32" ],
"cacheVariables" : {
"DETRAY_SMATRIX_PLUGIN" : "TRUE"
"DETRAY_CUSTOM_SCALARTYPE" : "double"
}
},
{
"name" : "gitlab-cuda-ci",
"displayName" : "Gitlab CUDA CI Configuration",
"inherits" : [ "default-fp32", "cuda" ],
"inherits" : [ "default-fp32", "cuda-fp32" ],
"cacheVariables" : {
"BUILD_TESTING" : "TRUE",
"DETRAY_BUILD_HOST" : "FALSE",
Expand All @@ -151,7 +144,7 @@
{
"name" : "gitlab-sycl-ci",
"displayName" : "Gitlab SYCL CI Configuration",
"inherits" : [ "default-fp32", "sycl" ],
"inherits" : [ "default-fp32", "sycl-fp32" ],
"cacheVariables" : {
"BUILD_TESTING" : "TRUE",
"DETRAY_BUILD_HOST" : "FALSE",
Expand Down
13 changes: 11 additions & 2 deletions cmake/detray-compiler-options-cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,17 @@ if(PROJECT_IS_TOP_LEVEL)

# Make CUDA generate debug symbols for the device code as well in a debug
# build.
detray_add_flag( CMAKE_CUDA_FLAGS_DEBUG "-G -src-in-ptx" )
detray_add_flag( CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-lineinfo -src-in-ptx" )
detray_add_flag( CMAKE_CUDA_FLAGS_DEBUG "-G" )
detray_add_flag( CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-lineinfo" )
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL "12.8")
message(
STATUS
"Disabling C++ source in PTX in order to work around a bug in CUDA 12.8."
)
else()
detray_add_flag( CMAKE_CUDA_FLAGS_DEBUG "-src-in-ptx" )
detray_add_flag( CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-src-in-ptx" )
endif()

# Fail on warnings, if asked for that behaviour.
if(DETRAY_FAIL_ON_WARNINGS)
Expand Down
Loading