Skip to content

Commit c594038

Browse files
committed
GPU: WORKAROUND for CUDA bug exposing device code via host symbols
1 parent 86fca7e commit c594038

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

DataFormats/Reconstruction/src/TrackParametrization.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,8 +956,10 @@ GPUd() typename TrackParametrization<value_T>::value_t TrackParametrization<valu
956956

957957
namespace o2::track
958958
{
959+
#if !defined(GPUCA_GPUCODE) || defined(GPUCA_GPUCODE_DEVICE) // FIXME: DR: WORKAROUND to avoid CUDA bug creating host symbols for device code.
959960
template class TrackParametrization<float>;
960-
#ifndef GPUCA_GPUCODE_DEVICE
961+
#endif
962+
#ifndef GPUCA_GPUCODE
961963
template class TrackParametrization<double>;
962964
#endif
963965
} // namespace o2::track

DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,8 +1245,10 @@ GPUd() void TrackParametrizationWithError<value_T>::printHexadecimal()
12451245

12461246
namespace o2::track
12471247
{
1248+
#if !defined(GPUCA_GPUCODE) || defined(GPUCA_GPUCODE_DEVICE) // FIXME: DR: WORKAROUND to avoid CUDA bug creating host symbols for device code.
12481249
template class TrackParametrizationWithError<float>;
1249-
#ifndef GPUCA_GPUCODE_DEVICE
1250+
#endif
1251+
#ifndef GPUCA_GPUCODE
12501252
template class TrackParametrizationWithError<double>;
12511253
#endif
12521254
} // namespace o2::track

Detectors/Base/src/Propagator.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,10 @@ GPUd() void PropagatorImpl<value_T>::getFieldXYZ(const math_utils::Point3D<doubl
786786

787787
namespace o2::base
788788
{
789+
#if !defined(GPUCA_GPUCODE) || defined(GPUCA_GPUCODE_DEVICE) // FIXME: DR: WORKAROUND to avoid CUDA bug creating host symbols for device code.
789790
template class PropagatorImpl<float>;
790-
#ifndef GPUCA_GPUCODE_DEVICE
791+
#endif
792+
#ifndef GPUCA_GPUCODE
791793
template class PropagatorImpl<double>;
792794
#endif
793795
#ifndef __HIPCC__ // TODO: Fixme: must prevent HIP from compiling this, should file bug report

0 commit comments

Comments
 (0)