Skip to content

Candidate Measurement Fix, main branch (2026.05.13.)#1326

Merged
stephenswat merged 3 commits into
acts-project:mainfrom
krasznaa:CanMeasFix-main-20260513
May 13, 2026
Merged

Candidate Measurement Fix, main branch (2026.05.13.)#1326
stephenswat merged 3 commits into
acts-project:mainfrom
krasznaa:CanMeasFix-main-20260513

Conversation

@krasznaa
Copy link
Copy Markdown
Member

I noticed this one in #1259. Once again this is an issue that CUDA only complains about when paired with Clang as the host compiler. Namely that:

[build] /home/krasznaa/ATLAS/projects/traccc/traccc/core/include/traccc/fitting/kalman_filter/measurement_selector.hpp(31): error #20012-D: __host__ annotation is ignored on a function("operator<=>") that is explicitly defaulted on its first declaration
[build]       __attribute__((host)) __attribute__((device))
[build]                      ^
[build] 
[build] Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
[build] 
[build] /home/krasznaa/ATLAS/projects/traccc/traccc/core/include/traccc/fitting/kalman_filter/measurement_selector.hpp(31): error #20012-D: __device__ annotation is ignored on a function("operator<=>") that is explicitly defaulted on its first declaration
[build]       __attribute__((host)) __attribute__((device))
[build]                                            ^

I've run into similar things in vecmem a couple of times in the past. That one cannot use __device__ and __host__ declarations for auto-generated functions. Luckily since the function is anyway declared to be constexpr, nvcc uses it happily even without the __device__ declaration.

In some compiler combinations combining explicit __host__ and
__device__ labels with "= default" doesn't work.
@krasznaa krasznaa requested a review from niermann999 May 13, 2026 12:59
@krasznaa krasznaa added the bug Something isn't working label May 13, 2026
@stephenswat stephenswat enabled auto-merge (squash) May 13, 2026 14:51
@sonarqubecloud
Copy link
Copy Markdown

@stephenswat stephenswat merged commit 2eb56c8 into acts-project:main May 13, 2026
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants