Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hipErrorNoBinaryForGpu when built for HIP #11

Open
PavelStishenko opened this issue Sep 11, 2024 · 3 comments
Open

hipErrorNoBinaryForGpu when built for HIP #11

PavelStishenko opened this issue Sep 11, 2024 · 3 comments

Comments

@PavelStishenko
Copy link

PavelStishenko commented Sep 11, 2024

I am trying to build MAGMA for HIP on gfx90a GPU (AMD MI210, it's ARCHER2 supercomputer).

I use the following cmake command:

cmake -DMAGMA_ENABLE_CUDA=OFF -DMAGMA_ENABLE_HIP=ON -DCMAKE_LIBRARY_PATH=${CRAY_LIBSCI_PREFIX_DIR}/lib -DCMAKE_CXX_COMPILER=hipcc -DGPU_TARGET=gfx90a -DBUILD_SHARED_LIBS=off -DUSE_FORTRAN=on -DLAPACK_LIBRARIES='-L/opt/cray/pe/libsci/22.12.1.1/AMD/4.0/x86_64/lib -lsci_amd -lsci_amd_mpi -ldl -lhipblas -lhipsparse -lamdhip64' ..

Build goes succesfully, but almost all tests fail with message 
"hipErrorNoBinaryForGpu: Unable to find code object for all current devices!"

CMake and Make logs are attached:
cmake.log
make.log.gz
Here is also a log of make with VERBOSE=1
make_VERBOSE.log.gz

  • I have tried manually recompile a test with  --offload-arch=gfx90a but it had no effect.
  • I have tried adding 90a In CMakeLists.txt, as Mark Gates suggested here, to this list:
    set(VALID_GFXS "700;701;702;703;704;705;801;802;803;805;810;900;902;904;906;908;909;90c;1010;1011;1012;1030;1031;1032;1033")

But it also didn't help

@lamikr
Copy link

lamikr commented Oct 28, 2024

Can you specify some exact test which is failing for you? And could you be able to test by building the rocm_sdk_builder for gfx90a enabled? It includes the latest version of magma and I have not seen that error on radeon devices I have tested. Build instructions:

https://github.com/lamikr/rocm_sdk_builder

After building, this is example how to try out the magma test apps:

 #  source /opr/rocm_sdk_612/bin/env_rocm.sh
 #  cd ocm_sdk_builder_612/builddir/037_magma/testing
 # ./testing_sswap

@GZGavinZhao
Copy link

It's because of this line:

set(VALID_GFXS "700;701;702;703;704;705;801;802;803;805;810;900;902;904;906;908;909;90c;1010;1011;1012;1030;1031;1032;1033")

Only a number of hard-coded GPU architectures are supported. If you pass other architectures when building, they will get ignored.

It was added 3 years ago so probably a unnecessary check now.

@cgmb
Copy link

cgmb commented Dec 19, 2024

If you apply the patch from #15 (or even just sed -i 's/hip::host/hip::device/' CMakeLists.txt), you can instead pass -DAMDGPU_TARGETS=gfx90a and that seems to be sufficient to build magma for the selected hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants