aboutsummaryrefslogtreecommitdiff
path: root/libgomp/plugin
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2017-05-24 08:59:05 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2017-05-24 08:59:05 +0200
commit78672bd8fdff27789807b81d787202d3b8c3887a (patch)
tree3ab97f113ad7db62296933e10f3acbbb8107d9c0 /libgomp/plugin
parent5726acd7d7f84a27e17719f185e3e4c5e67aeb2d (diff)
downloadgcc-78672bd8fdff27789807b81d787202d3b8c3887a.zip
gcc-78672bd8fdff27789807b81d787202d3b8c3887a.tar.gz
gcc-78672bd8fdff27789807b81d787202d3b8c3887a.tar.bz2
libgomp nvptx plugin: Debugging output when disabling nvptx offloading
libgomp/ * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output when disabling nvptx offloading. From-SVN: r248400
Diffstat (limited to 'libgomp/plugin')
-rw-r--r--libgomp/plugin/plugin-nvptx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index 3ef48dd..0e1b3e2 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);