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.
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_PLATFORMenvironment variable was set tonvidia, but it did not have any effect on the installation.The
module load hipcommand overwrites theHIP_PLATFORMenvironment variable toamd, even though I amd on nvidia. If I set it back tonvidiaand try to compile something usinghipcc, 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 theHIPCC_COMPILE_FLAGS_APPENDenvironment 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 andhipccworks, but this is not a very nice way to make it work.To sum up, the two main issues are:
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_PLATFORMdoes 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.