From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id B2C6D3858D1E for ; Wed, 30 Nov 2022 18:51:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2C6D3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-x434.google.com with SMTP id h11so21330121wrw.13 for ; Wed, 30 Nov 2022 10:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:cc:subject:references:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=oVyQr1/ZfvN6uRXf/M6869ZpCgGhj+O1Aq+/ZXFV9PY=; b=oaOAad/yWOhXK0Y+c+1OsFbODRRndb0W+Kr8GbO7qZ6kQPGxcI4xvNhxx8wVdc3bAM NQ4jW8pPTBdWbGFRY7XB0iHhSHR+0qu1+VbLKVbsVvL7RueV9W7LpKZvYgerg8usOUeK AIbdrHhDOolYexuRSACqkbGzKBznE9aO9CtAbuQzeE45Yeetpg+B2vygPgHGZxiV0Dzp UnFI/+qYn8GfOljrc8q7YznwkPHjrEH7II1ajfV2n8baj35AVUSDkKBC/LBtKLwiDgx1 AVNjeUiAYkfhcHQmXbKbWMK+tbApW1M8LeFep92eFF8D259qD2fiGg63wz+8fg6UsnOH fcSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:cc:subject:references:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=oVyQr1/ZfvN6uRXf/M6869ZpCgGhj+O1Aq+/ZXFV9PY=; b=voxTsmTYoRLzvQvSnz6A5M94dlrX/8R/76xjo4vXR7msj7pfsVya5bnH2nohSr3B5i OWc+oWoAD15w0SsiFBxAyhWjikyivrUtQwAq8dynZ+vSXY7utIFI6P0YFmmhfst5/UFO aG5aPQ7veM4/dHswXxRJIdQ892Hs67TvvXD8dXLGSz67pe2H2aNaTSiL9jNtTKvFmJTs TDAV9Yaz0BSe3h5gf2P+aaJpLuljSWjfch7mt6pyFtqH2TSd1XsyjJO7MRvAmburE7Vn 9sI0G06eIPjLwUUFTxD/CKiP8zEziKc5Giou8oFCDP3kQREso3MPvOZY756nFehJAbpj OedA== X-Gm-Message-State: ANoB5pnkVzZ9uOnsvzBJ9bl2lGM9EebYSWbI6pT8gT2xPY+KlHiqkpgI kziHRNw6T9E2oGAmYq9rpxjoTP65bef38A== X-Google-Smtp-Source: AA0mqf79ftcysqfdZQmf+sWSfLCNb4xjewjuZyZUHjyT5UGvOL9o4eVsTYfE+mgMYPqWeTwErvmU3g== X-Received: by 2002:adf:ea0a:0:b0:241:fcd5:6b94 with SMTP id q10-20020adfea0a000000b00241fcd56b94mr20466943wrm.592.1669834268046; Wed, 30 Nov 2022 10:51:08 -0800 (PST) Received: from [10.1.250.15] (cpc124344-ayle4-2-0-cust121.15-2.cable.virginm.net. [81.106.212.122]) by smtp.gmail.com with ESMTPSA id v6-20020adfe286000000b00241f467f888sm2342966wri.74.2022.11.30.10.51.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Nov 2022 10:51:07 -0800 (PST) Message-ID: <202ee18b-90c8-830b-82a5-b705a9ec5c73@gmail.com> Date: Wed, 30 Nov 2022 18:50:30 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 To: pa@codesourcery.com References: Subject: Re: [PATCH][OG12] amdgcn: Support AMD-specific 'isa' and 'arch' traits in OpenMP context selectors Cc: gcc-patches From: Kwok Cheung Yeung In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello PA, > --- libgomp/config/gcn/selector.c > +++ libgomp/config/gcn/selector.c > @@ -36,7 +36,7 @@ GOMP_evaluate_current_device (const char *kind, const char *arch, > if (kind && strcmp (kind, "gpu") != 0) > return false; > > - if (arch && strcmp (arch, "gcn") != 0) > + if (arch && (strcmp (arch, "gcn") != 0 || strcmp (arch, "amdgcn") != 0)) > return false; The logic here looks wrong to me - surely it should return false if arch is not 'gcn' AND it is not 'amdgcn'? > @@ -48,8 +48,17 @@ GOMP_evaluate_current_device (const char *kind, const char *arch, > #endif > > #ifdef __GCN5__ > - if (strcmp (isa, "gfx900") == 0 || strcmp (isa, "gfx906") != 0 > - || strcmp (isa, "gfx908") == 0) > + if (strcmp (isa, "gfx900") == 0 || strcmp (isa, "gfx906") != 0) > + return true; > +#endif > + > +#ifdef __CDNA1__ > + if (strcmp (isa, "gfx908") == 0) > + return true; > +#endif > + > +#ifdef __CDNA2__ > + if (strcmp (isa, "gfx90a") == 0) > return true; > #endif Okay for gfx908 and gfx90a, but is there any way of distinguishing between 'gfx900' and 'gfx906' ISAs? I don't think these are mutually compatible. Thanks Kwok