[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-08-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can you document the device binary embedding scheme for multiple GPU's in clang documentation? This will help tool developers to develop tools to extract device binaries from executables or shared libraries. Also this may help interoperability with other offloading langu

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-08-19 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added reviewers: ronlieb, pdhaliwal. JonChesterfield added a comment. Spent some time reading through this. I think the idea is to create a host binary that contains code objects for multiple variants of amdgpu - e.g. one that runs on gfx906 and another on gfx908, or one that run

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-08-19 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. I think this patch needs to split up into a large number of much smaller pieces. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106870/new/ https://reviews.llvm.org/D106870 __

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-07-28 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added inline comments. Comment at: openmp/libomptarget/src/rtl.cpp:306 + std::string cmd_bin; + cmd_bin.assign(libomptarget_dir_name).append("/../bin/amdgpu-arch"); + struct stat stat_buffer; saiislam wrote: > Call to amdgpu-arch binary is going to be

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-07-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. There seems to be a bunch of different things in this patch. There's some driver plumbing to compile for more than one arch (presumably by calling the target compiler N times). That's a great feature, I want to build an application bthat can run on nvptx or amdg

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-07-27 Thread Ye Luo via Phabricator via cfe-commits
ye-luo added a comment. In D106870#2907257 , @saiislam wrote: > In D106870#2907252 , @ye-luo wrote: > >> `-fopenmp-targets=amdgcn-amd-amdhsa,amdgcn-amd-amdhsa` seems burdensome. >> Could you just count how many `

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-07-27 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added inline comments. Comment at: openmp/libomptarget/src/rtl.cpp:306 + std::string cmd_bin; + cmd_bin.assign(libomptarget_dir_name).append("/../bin/amdgpu-arch"); + struct stat stat_buffer; Call to amdgpu-arch binary is going to be replaced with cal

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-07-27 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. In D106870#2907252 , @ye-luo wrote: > `-fopenmp-targets=amdgcn-amd-amdhsa,amdgcn-amd-amdhsa` seems burdensome. > Could you just count how many `-Xopenmp-target=amdgcn-amd-amdhsa` there are > on the comand line and then count th

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-07-27 Thread Ye Luo via Phabricator via cfe-commits
ye-luo added a comment. `-fopenmp-targets=amdgcn-amd-amdhsa,amdgcn-amd-amdhsa` seems burdensome. Could you just count how many `-Xopenmp-target=amdgcn-amd-amdhsa` there are on the comand line and then count the unique ones? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-07-27 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam created this revision. saiislam added reviewers: jdoerfert, yaxunl, JonChesterfield, RaviNarayanaswamy. Herald added subscribers: kerbowa, pengfei, guansong, nhaehnle, jvesely. saiislam requested review of this revision. Herald added subscribers: openmp-commits, cfe-commits, sstefan1. Hera