On Tue, May 17, 2022 at 02:45:09PM +0200, Tobias Burnus wrote: > Hi Jakub, hi Andrew, > > On 17.05.22 10:01, Jakub Jelinek wrote: > > But the above patch only implements it partially. > > What is in omp-device-properties-* is for the sake of the host compiler, > > [...] > > You need to also change gcc/config/gcn/gcn.cc (gcn_omp_device_kind_arch_isa) > > case omp_device_arch: handling so that it accepts both "gcn" and "amdgcn" > > equally. > > Done with the attached patch, which I intent to commit after the lunch break, > unless there are further comments. > > * * * > > Additionally, I am considering to document the permitted values → second > patch. > The idea is to later add more device-specific information, separately for gcn > and nvptx like simd/teams/threads handling or similar information (additional > envvar, where it makes sense etc.), which is currently spread over several > slides, wikipages, mouth-to-mouth information etc. > > Thoughts regarding the second patch? > > Tobias > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 > München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas > Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht > München, HRB 106955
> gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602] > > Improve cross-compiler handling. > > gcc/ChangeLog: > > PR target/105602 > * config/gcn/t-omp-device (arch): Add 'amdgcn' besides existing 'gcn'. > * config/gcn/gcn.cc (gcn_omp_device_kind_arch_isa): Likewise. > > gcc/config/gcn/gcn.cc | 2 +- > gcc/config/gcn/t-omp-device | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc > index e2e9335ad75..92896ab972f 100644 > --- a/gcc/config/gcn/gcn.cc > +++ b/gcc/config/gcn/gcn.cc > @@ -2632,7 +2632,7 @@ gcn_omp_device_kind_arch_isa (enum > omp_device_kind_arch_isa trait, > case omp_device_kind: > return strcmp (name, "gpu") == 0; > case omp_device_arch: > - return strcmp (name, "gcn") == 0; > + return (strcmp (name, "amdgcn") == 0 || strcmp (name, "gcn") == 0); The ()s around it aren't needed and don't make it more readable. Otherwise LGTM. > +@headitem @code{arch} @tab @code{kind} @tab @code{isa} > +@item @code{intel_mic}, @code{86}, @code{86_64}, @code{386}, @code{486}, > + @code{586}, @code{686}, @code{a32} You've lost the first letter of most of the above arches. x86, x86_64, i386, i486, i586, i686, ia32 Otherwise LGTM. Jakub