Skip to content

GPU: provide the std type_traits subset used on Metal - #15794

Merged
davidrohr merged 2 commits into
AliceO2Group:devfrom
ktf:pr15794
Sep 16, 2026
Merged

davidrohr merged 2 commits into
AliceO2Group:devfrom
ktf:pr15794

Conversation

@ktf

@ktf ktf commented Sep 14, 2026

Copy link
Copy Markdown
Member

MSL has no standard library, so the handful of traits the GPU code relies on
are defined for METAL, as is already done for the other device compilers.

@ktf
ktf requested a review from davidrohr as a code owner September 14, 2026 12:17
@davidrohr

Copy link
Copy Markdown
Collaborator

I don't understand this PR. It seems to just copy and paste everything from the other architectures into a separate block for Metal. Why? Is this AI generated without having a look? I think it could be simplified significantly.
And actually, I don't really know why it is needed at all, since for GPU code except for CUDA and HIP we alraedy use the ad-hoc type_trairs replacement, so it should be active for METAL already.

ktf added 2 commits September 15, 2026 13:19
MSL has no standard library, so the handful of traits the GPU code relies on
are defined for __METAL__, as is already done for the other device compilers.
@ktf

ktf commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

As discussed privately, this the a forward port of some old "bio" attempt where I was keeping things separate, mostly because of the enum syntax rather than constexpr bool. If you are fine with it, this is the folding of the two branches of the ifdef.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 0663dd6 at 2026-09-15 20:45:

## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:111:32: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:114:31: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:140:43: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:148:25: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:152:32: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:259:16: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:355:52: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:359:50: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:365:86: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/Upgrades/ALICE3/TRKFT3/FT3/base/src/GeometryTGeo.cxx:368:32: error: statement should be inside braces [readability-braces-around-statements]
++ [[ 0 == 0 ]]
++ exit 1
--

Full log here.

@davidrohr
davidrohr merged commit 1b8f9aa into AliceO2Group:dev Sep 16, 2026
16 of 17 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