https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102544

            Bug ID: 102544
           Summary: GCN offloading not working for
                    'amdgcn-amd-amdhsa--gfx906:sramecc+:xnack-'
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: openacc, openmp
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: ams at gcc dot gnu.org, caplanr at predsci dot com,
                    jules at gcc dot gnu.org
  Target Milestone: ---
            Target: GCN

Ron Caplan (in CC) is always eager to try his computational codes with GCC (in
addition to other/proprietary/vendor-provided compilers), and I very much
appreciate him providing feedback of any kind, which I find is always
constructive.

He's recently reported that "using Ubuntu 20.04 with the latest rocm and a
Radeon VII", they got GCN offloading "to compile but when we run it we get:
'libgomp: target function wasn't mapped'".

He sent me 'rocm-smi' and 'rocminfo' output, and comparing his vs. that of our
amd_ryzen3 system, I find the following differences:

    -/+ Agent [...]
     *******
       Name:                    gfx906
    -/+  Uuid:                    [...]
    -  Marketing Name:          Vega 20
    +  Marketing Name:          Vega 20 [Radeon VII]
       Vendor Name:             AMD
     [...]
    -  Node:                    1
    +  Node:                    2
       Device Type:             GPU
       Cache Info:
         L1:                      16(0x10) KB
    +    L2:                      8192(0x2000) KB
       Chip ID:                 26287(0x66af)
       Cacheline Size:          64(0x40)
    -/+  Max Clock Freq. (MHz):   [...]
    -  BDFID:                   2816
    +  BDFID:                   33536
    -  Internal Node ID:        1
    +  Internal Node ID:        2
       Compute Unit:            60
       SIMDs per CU:            4
       Shader Engines:          4
    @@ -128,7 +188,7 @@ Agent 2
           Accessible by all:       FALSE
       ISA Info:
         ISA 1
    -      Name:                    amdgcn-amd-amdhsa--gfx906:sramecc-:xnack-
    +      Name:                    amdgcn-amd-amdhsa--gfx906:sramecc+:xnack-

The very last item, I suppose, is the crucial one: 'sramecc-' vs. 'sramecc+' --
Andrew?

(a) How do we improve upon the run-time 'libgomp: target function wasn't
mapped' error reporting mode?

(b) What needs to be done to make this work?

Reply via email to