On 09.09.22 17:36, Jakub Jelinek wrote: Wonder if we instead shouldn't arrange for silent request for no PTX offloading (or one with warning?) if sm_30 and reverse offload is needed. Error might be too harsh, the program can still offload to GCN or host just fine... Attached patch now implements the warning. I think silently failing is not the proper solution. It is too confusing and without telling the user, they may not notice this issue. I also changed the "progname" variable; it seems as if the only user is the diagnostic machinery and it seems to make sense to have: nvptx mkoffload: warning: 'omp requires reverse_offload' requires at least 'sm_35' for '-misa=' - disabling offload-code generation for this device type instead of guessing whether "mkoffload" is for the host, gcn or nvptx. I know that the common way is to use the binary name ("lto1") or ... but I still think this prefix – which is the tool_name. Makes sense. (BTW: gcc/config/i386/intelmic-mkoffload.cc uses "mkoffload-intelmic".) I also changed "-misa=" in the diagnostic to "-march=" as Tom changed the default from "-misa=" (now an alias) to "-march=" in GCC 12 (+plus added -march-map= in addition). I also added a testcase for this – and updated the testsuite for the dg-warning. OK for mainline? Tobias PS: As no code for nvptx is generated, there is no "device present bit not used" warning with GOMP_DEBUG, but as there is a compile-time warning, I guess that's fine. ----------------- 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