Jakub Jelinek wrote:
On Fri, Jan 26, 2024 at 01:00:28PM +0100, Richard Biener wrote:
libgomp/
* plugin/plugin-gcn.c (suitable_hsa_agent_p): Filter out
agents with unsupported ISA.
...
@@ -1443,6 +1445,13 @@ suitable_hsa_agent_p (hsa_agent_t agent)
switch (device_type)
{
case HSA_DEVICE_TYPE_GPU:
+ {
+ char name[64];
+ if ((hsa_fns.hsa_agent_get_info_fn (agent, HSA_AGENT_INFO_NAME, name)
+ != HSA_STATUS_SUCCESS)
+ || isa_code (name) == EF_AMDGPU_MACH_UNSUPPORTED)
+ return false;
+ }
break;
I wonder whether we want to add a diagnostic for this or not - like:
GCN_DEBUG ("Ignoring unsupported GPU %s", name)? Or is this more
confusing than helpful?
case HSA_DEVICE_TYPE_CPU:
if (!support_cpu_devices)
Otherwise it looks reasoanble to me, but let's see what Andrew thinks.
Likewise: looks reasonable but I also would wait for Andrew.
Tobias