Multiple offloading targets can now be specified in the command
line. An instance of toolchain is created for each unique
combination of Target Triple and Target GPU. Device runtime has
been modified to support binaries containing multiple images,
each for a different target.
Data structure "__tgt_image_info" defined in
"llvm-project/openmp/libomptarget/include/omptarget.h" is used
to pass requirements of each image. E.g. GPU name like gfx906,
sm35, etc are the requirements of the image, which is produced
by clang-offload-wrapper and read by device RTL.
Example:
clang -O2 -target x86_64-pc-linux-gnu -fopenmp \ -fopenmp-targets=amdgcn-amd-amdhsa,amdgcn-amd-amdhsa \ -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 \ -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx908 \ helloworld.c -o helloworld
clang-tidy: warning: private field 'CompileHostOnly' is not used [clang-diagnostic-unused-private-field]
not useful