Message ID | 20240126120220.67D7C3858289@sourceware.org |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp608032dyb; Fri, 26 Jan 2024 04:02:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEL7GYNjViB/X3pIGJiLxWl5pNiZUvYvoYzQ2kC5RHOa8O92jxJpb63Eoh1gqGFH/YI3o/U X-Received: by 2002:a05:620a:2142:b0:783:d8c8:1eca with SMTP id m2-20020a05620a214200b00783d8c81ecamr467310qkm.127.1706270540699; Fri, 26 Jan 2024 04:02:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706270540; cv=pass; d=google.com; s=arc-20160816; b=ImNBQzYmtZiRpuP+wbaTQ09kQkaRx3r6nAOW/y2ccLRwMgEskBSOi/bCJBwyi+WcJR eXiXJf31SwGIM2QNLEv4UNLGjwpAGdficHxODic3BoGQpeUhaXtsIpvj4+CP5/8iRAI1 /taUk4lm3HP55V6oFvOkCaLE7gz1NraE+A8GEuIPaq9ApCRhJkJitM15J9n89j+ZnsDl r1efww0JKR+QuschAk5j5C5coEaGDc5Q+GC93VjxDQUMsgBKGq5AsPZSOiiSkG0uSFlM fgF+0cG0/d63pJm2FrJ3fLc2YQB1xeWqIw3jvsFPz9R+ct1E2vC6WCA6wUVnMANx+rSp rp8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:errors-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :subject:cc:to:from:date:dkim-signature:dkim-signature :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=jymNGTLW8hDPw4JOuS/IaZBU+4Ye0XvdSVRsT5EsCc0=; fh=WafaRBu98zStSTLJ3F2+0jkIRrCdRYw9kz8Gxtj95sk=; b=vRt2al8xx08KJ2TIB1ThbTa5BpNlgNvpk04nAAgzZ41MoGaie7S4Djmr2a86GIu8F2 9AQCYmlmnZ0cYGgH8COu1KOux8pBk0mdMGSPe2ZmsjU+obWexvyJRsB0QbH6h8/LmLfE Cg27snRmoko23+nqomZCAePRrB5d+/I5/oJOjSZo/z8RI07YJ3PVr2Wpk0W2U3e16ufi h/lap/QGdD6dzOrbg2hGK+7APwE38vgpnHMT40Hk8M/h/N7eEpORvlMCiZdIG8WBV+Gc J2FNGONB84RAMhwfLs0D4YBaCI3+QAmCG9GrKLSUfYU5TF6zX6ilhHIQS3U0w1VAnSwe b20A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=B0XIhAxM; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=B0XIhAxM; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id x12-20020a05620a448c00b007836d3975b3si1205184qkp.273.2024.01.26.04.02.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 04:02:20 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=B0XIhAxM; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=B0XIhAxM; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 67D7C3858289 for <ouuuleilei@gmail.com>; Fri, 26 Jan 2024 12:02:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id 55D073858289 for <gcc-patches@gcc.gnu.org>; Fri, 26 Jan 2024 12:01:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 55D073858289 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 55D073858289 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706270499; cv=none; b=Jy/Yg0Pxw0B8aHI91QpWc60Y1iv9/7xN82Qa9LNO3++1CJ6hEpW9uUoVcYjG80FeX0jLWp9UYfLXRwwi/1r/MuAGYIExaYTVzB9aqVxtRJRo4cEctDzRBIpSCfTpP7uO1affe3cHMzSh2yTof3zdSqzj0LwEGvTIZr8ieDvzwaE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706270499; c=relaxed/simple; bh=szsva4/6N7vy8aIBDI+KXnRlWRCvHwsEufaQjCu0W3g=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date: From:To:Subject:MIME-Version; b=pNYHbLvcwF3Qgo0573qiqM/SNsDn3OZQDu6hlfDWxG2mpZ1th4q01d2ECemfam/h7xzaSgPd3uV1D7VgBBvENk8QBy0Ee1cRQOpgPYuLJQySE60aPmw9CFWETddik1Y6zeLPkOpUWT4uz5pE++WlzZ1y51L/yXyQagqk3QCLpVA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [10.168.4.150] (unknown [10.168.4.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 659ED1FB7E; Fri, 26 Jan 2024 12:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706270496; h=from:from:reply-to:date:date:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=jymNGTLW8hDPw4JOuS/IaZBU+4Ye0XvdSVRsT5EsCc0=; b=B0XIhAxMaDdNhTv7xQz2NGEgD30kD/4BvjSh7OK2GEeOxTkc8iSDmILV7xS6TmAN2xiBSv TrOrd9rSTSQiEGqyZfxdVRJqtTtA9l0z8n5g0jZqSnLO4hbw6my6sjy85KU1Ddfh19FkS6 iwEhaNqvCME7Ka3vT/8z0E6npVEky/g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706270496; h=from:from:reply-to:date:date:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=jymNGTLW8hDPw4JOuS/IaZBU+4Ye0XvdSVRsT5EsCc0=; b=9aPuD8gmBEboA7dOyV7Ym4yRmcKNHEQ/SEhuZ38DVagemS3WTPKTdzuCPlzgT/bXfpqCps WXCNza/wR1TIdQAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706270496; h=from:from:reply-to:date:date:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=jymNGTLW8hDPw4JOuS/IaZBU+4Ye0XvdSVRsT5EsCc0=; b=B0XIhAxMaDdNhTv7xQz2NGEgD30kD/4BvjSh7OK2GEeOxTkc8iSDmILV7xS6TmAN2xiBSv TrOrd9rSTSQiEGqyZfxdVRJqtTtA9l0z8n5g0jZqSnLO4hbw6my6sjy85KU1Ddfh19FkS6 iwEhaNqvCME7Ka3vT/8z0E6npVEky/g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706270496; h=from:from:reply-to:date:date:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=jymNGTLW8hDPw4JOuS/IaZBU+4Ye0XvdSVRsT5EsCc0=; b=9aPuD8gmBEboA7dOyV7Ym4yRmcKNHEQ/SEhuZ38DVagemS3WTPKTdzuCPlzgT/bXfpqCps WXCNza/wR1TIdQAQ== Date: Fri, 26 Jan 2024 13:00:28 +0100 (CET) From: Richard Biener <rguenther@suse.de> To: gcc-patches@gcc.gnu.org cc: ams@baylibre.com Subject: [PATCH] Avoid registering unsupported OMP offload devices MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Authentication-Results: smtp-out2.suse.de; none X-Spam-Score: 2.31 X-Spamd-Result: default: False [2.31 / 50.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_SHORT(2.80)[0.934]; MISSING_MID(2.50)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-1.89)[94.40%] X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Message-Id: <20240126120220.67D7C3858289@sourceware.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789154338232839308 X-GMAIL-MSGID: 1789154338232839308 |
Series |
Avoid registering unsupported OMP offload devices
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Richard Biener
Jan. 26, 2024, noon UTC
The following avoids registering unsupported GCN offload devices when iterating over available ones. With a Zen4 desktop CPU you will have an IGPU (unspported) which will otherwise be made available. This causes testcases like libgomp.c-c++-common/non-rect-loop-1.c which iterate over all decives to FAIL. I'll run a bootstrap with both pending changes and will do another round of full libgomp testing with this. OK if that succeeds? Thanks, Richard. libgomp/ * plugin/plugin-gcn.c (suitable_hsa_agent_p): Filter out agents with unsupported ISA. --- libgomp/plugin/plugin-gcn.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index 588358bbbf9..88ed77ff049 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -1427,6 +1427,8 @@ init_hsa_runtime_functions (void) #undef DLSYM_FN } +static gcn_isa isa_code(const char *isa); + /* Return true if the agent is a GPU and can accept of concurrent submissions from different threads. */ @@ -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; case HSA_DEVICE_TYPE_CPU: if (!support_cpu_devices)