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

            Bug ID: 104283
           Summary: nvptx-none needs more user friendly architecture
                    handling
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xw111luoye at gmail dot com
  Target Milestone: ---

x86_64-pc-linux-gnu-accel-nvptx-none-gcc needs both -misa and -mptx to select a
specific target.

When I use OpenMP offload.
-foffload-options=nvptx-none="-misa=sm_80"
I got error
```
ptxas /tmp/ccW7wYQT.o, line 3; error   : PTX .version 3.1 does not support
.target sm_80
ptxas /tmp/ccW7wYQT.o, line 2622; warning : Instruction 'shfl' without '.sync'
may produce unpredictable results on sm_70 and later architectures
```

Then I have to get it through with
-foffload-options=nvptx-none="-misa=sm_80 -mptx=7.0"

I think GPU users know what sm_80 is but they rarely know PTX.
Can we -mptx default to highest -misa selection supports?

Or introduce something like -march=sm_80 and map it to appropriate -misa and
-mptx.

Simplify the need of options is much appreciated.

Reply via email to