Skip to content

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

Open
ktf wants to merge 2 commits into
AliceO2Group:devfrom
ktf:pr15886
Open

ktf wants to merge 2 commits 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 added 2 commits October 1, 2026 22:10
Simply not working for now
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-03 07:09:

-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindOpenMPMacOS.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindRapidJSON.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindFairRoot.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindAliRoot.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindVGM.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindGeant4.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindAliceGridUtils.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindlibjalienO2.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindGLFW.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindXRootD.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/O2SimulationDependencies.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindHepMC3.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindO2GPUWayland.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/Findpythia6.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindGeant4VMC.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindLibUV.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/Findpythia.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindFlukaVMC.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindVMC.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindGeant3.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindMCStepLogger.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindVtune.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindHepMC.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindJAliEnROOT.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/FindO2GPU.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/CMakeLists.txt
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/O2CompileFlags.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/O2TestsAdapter.cmake
-- Installing: /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/lib/cmake/O2/O2Dependencies.cmake
+ mkdir -p /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/etc/modulefiles
+ rsync -a --delete etc/modulefiles/ /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11/etc/modulefiles
+ cp /sw/BUILD/a573ca3531dea6ac70d6081237dc1afe1d70696b/O2/compile_commands.json /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local11
++ readlink /sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0
+ DEVEL_SOURCES=/O2
+ '[' /O2 '!=' /sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0 ']'
+ perl -p -i -e 's|/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0|/O2|' compile_commands.json
+ ln -sf /sw/BUILD/a573ca3531dea6ac70d6081237dc1afe1d70696b/O2/compile_commands.json /O2/compile_commands.json
+ [[ -n '' ]]
+ checkFindO2GPU
+ [[ -n /alidist ]]
+ [[ -f /alidist/resources/FindO2GPU.cmake ]]
+ cmp -s /alidist/resources/FindO2GPU.cmake /sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/dependencies/FindO2GPU.cmake
++ grep '# FindO2GPU.cmake Version ' /alidist/resources/FindO2GPU.cmake
++ awk '{print $4}'
++ grep '# FindO2GPU.cmake Version ' /sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/dependencies/FindO2GPU.cmake
++ awk '{print $4}'
+ [[ ! 21 -gt 21 ]]
+ echo 'FindO2GPU.cmake differs in O2 compared to alidist, please sync O2/dependencies/FindO2GPU.cmake to alidist/resources and make sure to update the version number'
FindO2GPU.cmake differs in O2 compared to alidist, please sync O2/dependencies/FindO2GPU.cmake to alidist/resources and make sure to update the version number
+ exit 1

Full log here.

This branch has not been deployed

No deployments
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.

2 participants