Skip to content

GPU TPC: let InterpolationErrors compile as Metal code - #149

Merged
davidrohr merged 1 commit into
davidrohr:devfrom
ktf:fix-metal-phase2
Nov 21, 2026
Merged

davidrohr merged 1 commit into
davidrohr:devfrom
ktf:fix-metal-phase2

Conversation

@ktf

@ktf ktf commented Nov 20, 2026

Copy link
Copy Markdown

The static constexpr data member added by the merger rebuild is a program-scope variable in MSL, which must be in the constant address space: the Metal IR fails with "program scope variable must reside in constant address space". An enumerator gives the same constant without a variable.

The static constexpr data member added by the merger rebuild is a
program-scope variable in MSL, which must be in the constant address
space: the Metal IR fails with "program scope variable must reside in
constant address space". An enumerator gives the same constant without
a variable.
@ktf
ktf requested a review from davidrohr as a code owner November 20, 2026 22:51
@ktf

ktf commented Nov 20, 2026

Copy link
Copy Markdown
Author

@davidrohr as discussed. Notice AliceO2Group#16112 seems to still help (~3%) on Metal.


struct InterpolationErrors {
static constexpr size_t size = constants::MERGER_MAX_TRACK_CLUSTERS;
enum : uint32_t { size = constants::MERGER_MAX_TRACK_CLUSTERS }; // Not a static data member: Metal and OpenCL allow program-scope variables only in the constant address space

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why do you write metal and OpenCL? With OpenCL this is compiling correctly? In any case, will merge this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You are right. Hallucinated from OpenCL 1.0, i guess.

@davidrohr
davidrohr merged commit 1765f99 into davidrohr:dev Nov 21, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants