diff options
author | Tobias Burnus <tburnus@baylibre.com> | 2024-11-11 12:17:42 +0100 |
---|---|---|
committer | Tobias Burnus <tburnus@baylibre.com> | 2024-11-11 12:17:42 +0100 |
commit | 8473010807a264af35fb7cecad6f9406feab929f (patch) | |
tree | f398eb730c93fff4365c5363329f7631440618db | |
parent | 2a4ce8d0c2fd253bbf018f254156bb1fb3ffc47d (diff) | |
download | gcc-8473010807a264af35fb7cecad6f9406feab929f.zip gcc-8473010807a264af35fb7cecad6f9406feab929f.tar.gz gcc-8473010807a264af35fb7cecad6f9406feab929f.tar.bz2 |
libgomp/plugin/plugin-gcn.c: Show device number in ISA error message
libgomp/ChangeLog:
* plugin/plugin-gcn.c (isa_matches_agent): Mention the device number
and ROCR_VISIBLE_DEVICES when reporting an ISA mismatch error.
-rw-r--r-- | libgomp/plugin/plugin-gcn.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index 592a7b6..f2f2940 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -2414,14 +2414,17 @@ isa_matches_agent (struct agent_info *agent, Elf64_Ehdr *image) if (isa_field != agent->device_isa) { - char msg[120]; + char msg[204]; const char *agent_isa_s = isa_name (agent->device_isa); assert (agent_isa_s); snprintf (msg, sizeof msg, - "GCN code object ISA '%s' does not match GPU ISA '%s'.\n" - "Try to recompile with '-foffload-options=-march=%s'.\n", - isa_s, agent_isa_s, agent_isa_s); + "GCN code object ISA '%s' does not match GPU ISA '%s' " + "(device %d).\n" + "Try to recompile with '-foffload-options=-march=%s',\n" + "or use ROCR_VISIBLE_DEVICES to disable incompatible " + "devices.\n", + isa_s, agent_isa_s, agent->device_id, agent_isa_s); hsa_error (msg, HSA_STATUS_ERROR); return false; |