On Fri, 26 Jan 2024, Tobias Burnus wrote: > 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?
I can do that, but there's later reasons it might be ignored as well, so doing this in the caller might be better (you'd get duplicate diagnostic as well, once for counting once for registering). I figured this might better be done as followup? Richard. > >> 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 > -- Richard Biener <rguent...@suse.de> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)