-
- Downloads
nvptx/mkoffload.cc: Warn instead of error when reverse offload is not possible
Reverse offload requests at least -misa=sm_35; with this patch, a warning instead of an error is shown, still permitting reverse offload for all other configured device types. This is achieved by not calling GOMP_offload_register_ver (and stopping generating pointless 'static const char' variables, once known.) The tool_name as progname changes adds "nvptx " and "gcn " to the "mkoffload: warning/error:" diagnostic. gcc/ChangeLog: * config/nvptx/mkoffload.cc (process): Replace a fatal_error by a warning + not enabling offloading if -misa=sm_30 prevents reverse offload. (main): Use tool_name as progname for diagnostic. * config/gcn/mkoffload.cc (main): Likewise. libgomp/ChangeLog: * libgomp.texi (Offload-Target Specifics: nvptx): Document that reverse offload requires >= -march=sm_35. * testsuite/libgomp.c-c++-common/requires-4.c: Build for nvptx with -misa=sm_35. * testsuite/libgomp.c-c++-common/requires-5.c: Likewise. * testsuite/libgomp.c-c++-common/requires-6.c: Likewise. * testsuite/libgomp.c-c++-common/reverse-offload-1.c: Likewise. * testsuite/libgomp.fortran/reverse-offload-1.f90: Likewise. * testsuite/libgomp.c/reverse-offload-sm30.c: New test.
Showing
- gcc/config/gcn/mkoffload.cc 1 addition, 1 deletiongcc/config/gcn/mkoffload.cc
- gcc/config/nvptx/mkoffload.cc 14 additions, 4 deletionsgcc/config/nvptx/mkoffload.cc
- libgomp/libgomp.texi 3 additions, 0 deletionslibgomp/libgomp.texi
- libgomp/testsuite/libgomp.c-c++-common/requires-4.c 1 addition, 0 deletionslibgomp/testsuite/libgomp.c-c++-common/requires-4.c
- libgomp/testsuite/libgomp.c-c++-common/requires-5.c 1 addition, 0 deletionslibgomp/testsuite/libgomp.c-c++-common/requires-5.c
- libgomp/testsuite/libgomp.c-c++-common/requires-6.c 2 additions, 0 deletionslibgomp/testsuite/libgomp.c-c++-common/requires-6.c
- libgomp/testsuite/libgomp.c-c++-common/reverse-offload-1.c 1 addition, 0 deletionslibgomp/testsuite/libgomp.c-c++-common/reverse-offload-1.c
- libgomp/testsuite/libgomp.c/reverse-offload-sm30.c 15 additions, 0 deletionslibgomp/testsuite/libgomp.c/reverse-offload-sm30.c
- libgomp/testsuite/libgomp.fortran/reverse-offload-1.f90 1 addition, 0 deletionslibgomp/testsuite/libgomp.fortran/reverse-offload-1.f90
Loading
Please register or sign in to comment