From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>, Jakub Jelinek <jakub@redhat.com>
Subject: libgomp nvptx plugin: Debugging output for cuInit failure
Date: Mon, 22 May 2017 13:01:00 -0000 [thread overview]
Message-ID: <87efvhyrpn.fsf@hertz.schwinge.homeip.net> (raw)
Hi!
OK for trunk?
commit 7b2f06b7d2fd23b20d81fda8be6ec7453e8b3fe3
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Thu Dec 22 08:30:04 2016 +0100
libgomp nvptx plugin: Debugging output for cuInit failure
libgomp/
* plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output
for cuInit failure.
---
libgomp/plugin/plugin-nvptx.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git libgomp/plugin/plugin-nvptx.c libgomp/plugin/plugin-nvptx.c
index 3ef48dd..0e1b3e2 100644
--- libgomp/plugin/plugin-nvptx.c
+++ 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);
Grüße
Thomas
next reply other threads:[~2017-05-22 12:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 13:01 Thomas Schwinge [this message]
2017-05-23 10:46 ` Jakub Jelinek
2017-05-24 7:15 ` Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efvhyrpn.fsf@hertz.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).