Skip to content

GPU: give Metal a column in the tuning parameter table - #15886

Merged
ktf merged 1 commit into
AliceO2Group:devfrom
ktf:pr15886
Oct 15, 2026
Merged

ktf merged 1 commit into
AliceO2Group:devfrom
ktf:pr15886

Conversation

@ktf

@ktf ktf commented Oct 1, 2026

Copy link
Copy Markdown
Member

Without one, GPUDefParametersDefaultsDevice.h falls through to
'#error GPU TYPE NOT SET' for GPUCA_GPUTYPE_METAL, which the .metal source
defines, so nothing under Definitions/ could be compiled for the backend at all.

The values are copied from OPENCL, the other portable backend with no
vendor-specific tuning, so Metal starts at WARP_SIZE 32 and
THREAD_COUNT_DEFAULT 256. Real numbers want measuring on a device once the
kernels run. The column is appended last, as the earlier ones were; the order
is cosmetic, since the generator keys off the architecture name.

detect_gpu_arch reports METAL alongside the others so the generator emits the
block. Every existing architecture comes out byte-identical; the generated
device header gains only the Metal block and the architecture comment.

@ktf
ktf requested review from a team and davidrohr as code owners October 1, 2026 20:22
@alibuild

alibuild commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 10b5bd3 at 2026-10-08 22:58:

## sw/BUILD/o2codechecker-latest/log
100% tests passed, 0 tests failed out of 1


## sw/BUILD/ThePEG-latest/log
collect2: error: ld returned 1 exit status

Full log here.

davidrohr
davidrohr previously approved these changes Oct 14, 2026

@davidrohr davidrohr left a comment

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.

fine with me.
Somehow I thought I already approved the "refuse deterministic mode on metal", but perhaps I forgot to press submit, no idea...
Obviously we'll need to change FindO2GPU.cmake in aldist first again.

@ktf

ktf commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

i think i made some mistake with the update and introduced extra quotes. i will clean that up before merging.

Without one, GPUDefParametersDefaultsDevice.h falls through to
'#error GPU TYPE NOT SET' for GPUCA_GPUTYPE_METAL, which the .metal source
defines, so nothing under Definitions/ could be compiled for the backend at all.

The values are copied from OPENCL, the other portable backend with no
vendor-specific tuning, so Metal starts at WARP_SIZE 32 and
THREAD_COUNT_DEFAULT 256. Real numbers want measuring on a device once the
kernels run. The column is appended last, as the earlier ones were; the order
is cosmetic, since the generator keys off the architecture name.

detect_gpu_arch reports METAL alongside the others so the generator emits the
block. Every existing architecture comes out byte-identical; the generated
device header gains only the Metal block and the architecture comment.
@ktf

ktf commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Nevermind. It was simply the GUI on the phone which was showing as changed things which were not. Now the commit has also been updated with the version bump. Since we agreed this is fine, I am merging it.

@ktf
ktf merged commit 2cf8e9e into AliceO2Group:dev Oct 15, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants