AMD GPU targets list

Issue #49 resolved
Nair, Jithun created an issue

In CMakeLists.txt, a list of valid AMD GPU targets is maintained. Is Magma tested on all these GPU targets? If not, it just seems like a maintenance burden to keep it constantly up-to-date. The hipcc compiler will anyway flag invalid GPU targets, so I’m not sure why the additional vetting is needed here. Also, the way the code is written, it silently removes any gfx targets it doesn’t recognize. This means that we cannot use GPU_TARGETS to specify any new AMD targets that we are testing with (instead having to append to DEVCCFLAGS directly).

I’d propose that only the list of targets which Magma is regularly tested against is kept current as the default for GPU_TARGET. If you do continue to have the list of valid GPU targets, it should error out on invalid targets.

Comments (3)

  1. Stan Tomov

    We have tested some targets, but definitely not all. The assumption is that the list is valid, as we took it from AMD documents.

    However, note that currently we only create the variable GPU_ARCH_FLAGS without using it, i.e., we don’t add them to the compiler options:

    #add_compile_options(${GPU_ARCH_FLAGS})
    

    There is a default GPU target if the user doesn’t provide one, and if the user provides targets, I think cmake adds the corresponding flags. I have to verify this and see if we want to change the behavior. Basically what we have now is very close to what you were pointing out. A question is if we allow the user to provides the GPU_TARGET as a name like kaveri, hawaii, etc., and we translate this into a correct gfx and add to the compiler options.

  2. Ahmad Abdelfattah

    This issue has been inactive for more than 2 years. According to the discussion, it seems safe to mark this as resolved. Feel free to reopen the issue if needed.

  3. Log in to comment