summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2017-05-24 06:59:05 +0000
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2017-05-24 06:59:05 +0000
commitd5f081f8cfa23d74aec1cea4dd4ae3061c4498c8 (patch)
tree3ab97f113ad7db62296933e10f3acbbb8107d9c0 /libgomp
parenta440faa54f9964c7451f99e731453bc2b2c565dc (diff)
downloadgcc-d5f081f8cfa23d74aec1cea4dd4ae3061c4498c8.tar.gz
libgomp nvptx plugin: Debugging output when disabling nvptx offloading
libgomp/ * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output when disabling nvptx offloading. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248400 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/plugin/plugin-nvptx.c12
2 files changed, 15 insertions, 2 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 32f8bf10b2b..14e95ef9ba9 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-24 Thomas Schwinge <thomas@codesourcery.com>
+
+ * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output
+ when disabling nvptx offloading.
+
2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Update.
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index 3ef48dd5d82..0e1b3e2d4f3 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -838,7 +838,11 @@ nvptx_get_num_devices (void)
/* PR libgomp/65099: Currently, we only support offloading in 64-bit
configurations. */
if (sizeof (void *) != 8)
- return 0;
+ {
+ GOMP_PLUGIN_debug (0, "Disabling nvptx offloading;"
+ " only 64-bit configurations are supported\n");
+ 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
@@ -852,7 +856,11 @@ nvptx_get_num_devices (void)
/* This is not an error: e.g. we may have CUDA libraries installed but
no devices available. */
if (r != CUDA_SUCCESS)
- return 0;
+ {
+ GOMP_PLUGIN_debug (0, "Disabling nvptx offloading; cuInit: %s\n",
+ cuda_error (r));
+ return 0;
+ }
}
CUDA_CALL_ERET (-1, cuDeviceGetCount, &n);