Skip to content

kokkos,hip: fix rocthrust dependency

Vicente Bolea requested to merge vbolea/vtk-m:fix-thrust-kokkos-dep into master

Even after the previous iteration thrust was not being used, in this MR we re-arrange the source code so that THRUST is being included. As this changes add thrust to the kokkos device adaptor, this MR also solve two errors:

  • One observed in Spack occurring due to the fact that rocthrust and rocprim is not bundled with ROCm, this could be fixed by having linking our newly vtkm_cont_kokkos target with rocprim.

  • One observed in our CI consisting in the roc::rocthrust target not discriminating between sources files of different languages. For instance the can apply HIP compiler options to the CXX source files leading to build errors. This was resolved by adding a new library, vtkm_cont_kokkos, which contains sources files that will be compiled with HIP and wraps the rocthrust dependency.

A byproduct of this is that we cannot build anymore with static kokkos lib without PIC which in any case makes a lot of sense. The reason for this is that we cannot mix symbol existing static and share libs while linking a binary.

Edited by Vicente Bolea

Merge request reports

Loading