From df8a8864f2fb3aa6f61c0be6869576cd780c8aa2 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:16:45 +0100 Subject: [PATCH] GPU: give the device propagator the device address of the material table UpdateGPUCalibObjects prepares the device copy of the o2::base::Propagator in the host shadow of the flat calib objects. It sets the GPU field to its device address, but the material table to the address of the host shadow copy, mFlatObjectsShadow.mCalibObjects.matLUT, instead of the device one. On backends that cannot dereference host memory from the device, the material lookups of the GPU refit with the O2 track model, of the TRD tracking with the O2 propagator and of the ITS GPU tracking then do not find the table, so no material correction is applied (seen on Metal). On CUDA and HIP the host memory pool is pinned and mapped, so this presumably works, but the device code reads the table header over the bus. --- GPU/GPUTracking/Global/GPUChainTracking.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUTracking/Global/GPUChainTracking.cxx b/GPU/GPUTracking/Global/GPUChainTracking.cxx index fec4914219a7b..444d020f5075d 100644 --- a/GPU/GPUTracking/Global/GPUChainTracking.cxx +++ b/GPU/GPUTracking/Global/GPUChainTracking.cxx @@ -448,7 +448,7 @@ void GPUChainTracking::UpdateGPUCalibObjects(int32_t stream, const GPUCalibObjec if (processors()->calibObjects.o2Propagator && (ptrMask == nullptr || ptrMask->o2Propagator)) { memcpy((void*)mFlatObjectsShadow.mCalibObjects.o2Propagator, (const void*)processors()->calibObjects.o2Propagator, sizeof(*processors()->calibObjects.o2Propagator)); mFlatObjectsShadow.mCalibObjects.o2Propagator->setGPUField(&processorsDevice()->param.polynomialField); - mFlatObjectsShadow.mCalibObjects.o2Propagator->setMatLUT(mFlatObjectsShadow.mCalibObjects.matLUT); + mFlatObjectsShadow.mCalibObjects.o2Propagator->setMatLUT(mFlatObjectsDevice.mCalibObjects.matLUT); } TransferMemoryResourceLinkToGPU(RecoStep::NoRecoStep, mFlatObjectsShadow.mMemoryResFlat, stream); memcpy((void*)&processorsShadow()->calibObjects, (void*)&mFlatObjectsDevice.mCalibObjects, sizeof(mFlatObjectsDevice.mCalibObjects));