Skip to content

HIP package only works on AMD platform, not on NVIDIA #26898

@jakub-homola

Description

@jakub-homola

The HIP package seems to only support AMD platform, on NVIDIA platform the HIP tools don't work correctly (because they are set up for AMD).

Before installing the hip package through spack, I made sure the HIP_PLATFORM environment variable was set to nvidia, but it did not have any effect on the installation.

The module load hip command overwrites the HIP_PLATFORM environment variable to amd, even though I amd on nvidia. If I set it back to nvidia and try to compile something using hipcc, another error appears: nvcc fatal : Unknown option '--rocm-path=/home/jakub/apps/spack/opt/spack/linux-ubuntu18.04-zen2/gcc-10.1.0/hip-4.3.1-shn6kb45egbifwo36efh3nyfqhcczr4y'. The core of this is the HIPCC_COMPILE_FLAGS_APPEND environment variable, which was set by the module load to --rocm-path=/home/jakub/apps/spack/opt/spack/linux-ubuntu18.04-zen2/gcc-10.1.0/hip-4.3.1-shn6kb45egbifwo36efh3nyfqhcczr4y. Manually clearing the variable solved the issue and hipcc works, but this is not a very nice way to make it work.

To sum up, the two main issues are:

  • unnecessary dependencies (AMD-specific stuff)
  • incorrect environment setup when loading the module

Please correct this. HIP is supposed to work on both AMD and NVIDIA platform. I can suggest making two distinct packages like hip_nvidia and hip_amd. Steering the installation process based on the HIP_PLATFORM does not seem like a good idea.

I did not test any hip* libraries like hipBLAS, hipSPARSE etc., but it can be assumed that the issue will be similar with them.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions