llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[HIP] Compiling code for different AMD architectures

Open densamoilov opened this issue 3 years ago • 5 comments

DPC++ with HIP AMD backend requires to specify a target architecture via -Xsycl-target-backend --offload-arch=gfx90a. This means that the code should be compiled for each architecture which may be a problem for libraries that have such code.

Is it possible to add support for AMD backend similar to CUDA via -fsycl-targets=nvptx64-nvidia-cuda?

densamoilov avatar Jul 07 '22 00:07 densamoilov

Would it be possible to have just all the AMD GPU targets in -fsycl-targets too, since there is no PTX or SPIR-V before targeting the final ISA?

keryell avatar Jul 08 '22 10:07 keryell

@keryell, is it a question to me?

densamoilov avatar Jul 13 '22 20:07 densamoilov

Yes, I am considering alternatives too.

keryell avatar Jul 14 '22 07:07 keryell

Can you please elaborate on what before targeting the final ISA means and your idea?

densamoilov avatar Jul 15 '22 02:07 densamoilov

I think we agree on the feature. If the AMD workflow targets directly the ISA of the various AMD GPU architectures involved without any future JITing, why not considering them directly in -fsycl-targets as you propose, like -fsycl-targets=gfx90a-amd-hip or whatever?

keryell avatar Aug 04 '22 18:08 keryell

I see, that makes sense. Specifying all architectures via -fsycl-targets would allow the performance libraries to avoid compiling them for a particular AMD architecture.

Is it feasible?

densamoilov avatar Aug 18 '22 22:08 densamoilov

any update on this issue ? This is important for applications targeting AMD GPUs in general.

ph0b avatar Oct 31 '23 06:10 ph0b