Closed sethrj closed 6 months ago
Are you using clang directly or hipcc? Looking at rocThrust, compiler.h and device_system.h, if __hip__
isn't defined then it's picking cuda. Wouldn't you have to also define __THRUST_DEVICE_SYSTEM_NAMESPACE
@esseivaju This was happening through the .cc
files compiled by clang++
. Thrust was setting THRUST_DEVICE_COMPILER
to THRUST_DEVICE_COMPILER_CLANG
, and then defaulting THRUST_DEVICE_SYSTEM
to THRUST_DEVICE_SYSTEM_CUDA
. By overriding THRUST_DEVICE_SYSTEM
in device_runtime_api.h
we give thrust the correct "device system" , and then it will automatically set __THRUST_DEVICE_SYSTEM_NAMESPACE
.
The change is only to provide Thrust more information when going into device_system.h
, not to replace that header.
OLCF recommends using their wacky Cray compiler wrappers... and those guys forward to llvm directly apparently
This updates the build on Frontier to use the new
hep143
allocation and installation with ROCm 5.7.1.The only weird thing was that somehow thrust now assumes that it's building CUDA when we build from clang (and include it via
device_runtime_api.h
):