diff options
author | tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-08 14:59:59 +0000 |
---|---|---|
committer | tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-08 14:59:59 +0000 |
commit | fe265ad3c9624da88f43be349137696449148f4f (patch) | |
tree | 49238907f42004f77228eb1e7c9ae4aa57f88eed /libgomp | |
parent | 9ba13af9db8cf5190b38e3d02c31fdad15c3dadd (diff) | |
download | gcc-fe265ad3c9624da88f43be349137696449148f4f.tar.gz |
[nvptx offloading] Only 64-bit configurations are currently supported
PR libgomp/65099
gcc/
* config/nvptx/mkoffload.c (main): Create an offload image only in
64-bit configurations.
libgomp/
* plugin/plugin-nvptx.c (nvptx_get_num_devices): Return 0 if not
in a 64-bit configuration.
* testsuite/libgomp.oacc-c++/c++.exp: Don't attempt nvidia
offloading testing if no such device is available.
* testsuite/libgomp.oacc-c/c.exp: Likewise.
* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225560 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 10 | ||||
-rw-r--r-- | libgomp/plugin/plugin-nvptx.c | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-c++/c++.exp | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-c/c.exp | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-fortran/fortran.exp | 6 |
5 files changed, 33 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 88393974756..34f3a1c86db 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,13 @@ +2015-07-08 Thomas Schwinge <thomas@codesourcery.com> + + PR libgomp/65099 + * plugin/plugin-nvptx.c (nvptx_get_num_devices): Return 0 if not + in a 64-bit configuration. + * testsuite/libgomp.oacc-c++/c++.exp: Don't attempt nvidia + offloading testing if no such device is available. + * testsuite/libgomp.oacc-c/c.exp: Likewise. + * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. + 2015-07-08 Tom de Vries <tom@codesourcery.com> * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Fix diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index ee3a0ae14a9..b67d3015ca5 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -777,6 +777,11 @@ nvptx_get_num_devices (void) int n; CUresult r; + /* PR libgomp/65099: Currently, we only support offloading in 64-bit + configurations. */ + if (sizeof (void *) != 8) + return 0; + /* This function will be called before the plugin has been initialized in order to enumerate available devices, but CUDA API routines can't be used until cuInit has been called. Just call it now (but don't yet do any diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp index 80d135919cf..3b97024492c 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp +++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp @@ -85,6 +85,12 @@ if { $lang_test_file_found } { set acc_mem_shared 0 } nvidia { + if { ![check_effective_target_openacc_nvidia_accel_present] } { + # Don't bother; execution testing is going to FAIL. + untested "$subdir $offload_target_openacc offloading" + continue + } + # Copy ptx file (TEMPORARY) remote_download host $srcdir/libgomp.oacc-c-c++-common/subr.ptx diff --git a/libgomp/testsuite/libgomp.oacc-c/c.exp b/libgomp/testsuite/libgomp.oacc-c/c.exp index c0c70bbacad..326b988d99a 100644 --- a/libgomp/testsuite/libgomp.oacc-c/c.exp +++ b/libgomp/testsuite/libgomp.oacc-c/c.exp @@ -48,6 +48,12 @@ foreach offload_target_openacc $offload_targets_s_openacc { set acc_mem_shared 0 } nvidia { + if { ![check_effective_target_openacc_nvidia_accel_present] } { + # Don't bother; execution testing is going to FAIL. + untested "$subdir $offload_target_openacc offloading" + continue + } + # Copy ptx file (TEMPORARY) remote_download host $srcdir/libgomp.oacc-c-c++-common/subr.ptx diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp index a8f62e84d67..a8aaff0e2b1 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp +++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp @@ -77,6 +77,12 @@ if { $lang_test_file_found } { set acc_mem_shared 0 } nvidia { + if { ![check_effective_target_openacc_nvidia_accel_present] } { + # Don't bother; execution testing is going to FAIL. + untested "$subdir $offload_target_openacc offloading" + continue + } + set acc_mem_shared 0 } default { |