From patchwork Sat Jan 20 09:57:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1888747 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=dqCkS+kh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4THBkF2X51z1yPv for ; Sat, 20 Jan 2024 20:57:56 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0CC2F3858419 for ; Sat, 20 Jan 2024 09:57:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 60BEB3858D39 for ; Sat, 20 Jan 2024 09:57:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 60BEB3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 60BEB3858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705744655; cv=none; b=MM7yRGWHW8fQb/bM2dM7NtpaxBC0mukPGGIFhZtwk53w+AjcIQZbWZz1yPErx9qa6H42pAgYX5c/OsORd2GD8E4AxCxA6HAgE/AUFEuas2mQhq1IlGguHs8sI++lKE5TfMfbGUK7Y0h5VM3sl/FoHfIxaN/0G59v20LkfPrScZQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705744655; c=relaxed/simple; bh=RQor4bQcdOO+hIEaPpLDtxcUMofHq+GdJsTLcEH0YcM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject; b=J4rdgkAngevoHxB+J+IjDS6/UH6GU9aKZTRgoeOAiyCUKKQBxiqBiauVr4n+VVfoLf6BuL7ruJ8lFp17GaUdNJVlr3pdtNXLEtNpnnvlam+oe0FUPlxqipSdt9LV+PCu7lCXRzfkzV5GCo3qkTninplbPNjsDvhXDI0B/oGvcC0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a2dd05e02ffso151028666b.3 for ; Sat, 20 Jan 2024 01:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1705744652; x=1706349452; darn=gcc.gnu.org; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=cevOohpDF+qps9VeXxWvdi7iZXo2SDB/TGH20ifyOsQ=; b=dqCkS+khfU0l6okKc6xMCEIiIYY92qnD2f9MDx/do8+ZWhN3Xtod09TNL913vO9WTO f9MbibQJIXwZdvdMkiEiFYwYkP5OO3m4RNDQcEE6o1dLUyKvPd/9pABcEsE70QYGdLbF DMmDKAzuzGspI7LixsbPLrMb45P1bitW3rKLKXEKn5X2viGdbPNTny61BnpoSWgs0l8D LtPEgGFgyNrzWKtyT9PHCjnQRTG/SLmveNSs6sk0uVwMe9+Pzt2MXzt1wJteHrjM6+Td EqnHh+hzM6VVaES+NTrwIBPAQU9hO0X5CH5CNQTlAPms5+uewpqYjHAGtlPhqcnGiqY4 hUsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705744652; x=1706349452; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cevOohpDF+qps9VeXxWvdi7iZXo2SDB/TGH20ifyOsQ=; b=hwCyS726n5Hb455xVDzWvM1v0Sb9xEwLHGEywRN5B1MJ4hdqkxnONd0oj/QBoW86XR +cvk8XP0LFL9EN6sq07eB+R1nOCmCzW/e2E2nfsfwCd4RcaA6caOx1CYAGL/N/RE+xyW JN7VMGzS9NXPtUe/VFsuVBLpPryoZ7s2vdMG4Sali5KkvCYazIKP/RPzwuqUX8Ijh5Jk xqFPZ8nreDmVgNYvgOKVHnCZaVkd3RlWNXgniFPY2WPDsjMU7GGZKc/R3o5NWFMrvu/8 P0TicFzEUFDnWYPIoy9KzMBlatHRO0a/mKN5dBs7VvKMCm9WdKxGMt5MgfaFb4uhu2b/ N6Kw== X-Gm-Message-State: AOJu0Ywa+KlyuwbVLY7INrQWKaCGdx6+ft8aChrsec6l2ZqIxNa6pic7 MfqbqY9bVZt4SINLEXfXLxmIcU/90OLtyJzPu6Jal1zSEKpM0Scklre+QCRnORcw5rNQTxssyR/ j7aWUmg== X-Google-Smtp-Source: AGHT+IGvcZ+x9j/9BVg6GVa7bXbmu4R4y/KaTRs6H829ZH2Waz7DEeR5aqlDhSIMZZU0Tm7GSC3mwA== X-Received: by 2002:a17:906:4108:b0:a2e:711f:643f with SMTP id j8-20020a170906410800b00a2e711f643fmr432599ejk.221.1705744651590; Sat, 20 Jan 2024 01:57:31 -0800 (PST) Received: from ?IPV6:2001:16b8:3fec:9600:be03:58ff:fe31:f74? ([2001:16b8:3fec:9600:be03:58ff:fe31:f74]) by smtp.gmail.com with ESMTPSA id v18-20020a170906381200b00a2699a54888sm11219261ejc.64.2024.01.20.01.57.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Jan 2024 01:57:31 -0800 (PST) Message-ID: <94930db9-831d-432c-9d3a-337dba678f09@baylibre.com> Date: Sat, 20 Jan 2024 10:57:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches , Thomas Schwinge , Tom de Vries From: Tobias Burnus Subject: [patch] nvptx.opt: Add sm_89 and sm_90a to -march-map= X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Stumbled over this as we recently got a sm_89 card. -march-map= is mostly a future proof method for user to ensure to use always the best code gen for a specific card - without needing to know which GCC version added support for what --march=sm_... (or -misa=sm_... - those are aliases). sm_89 was added in CUDA 11.8 (ptx isa 7.8) and sm_90a in CUDA 12.0 (ptx isa 8.0) but that's just FYI as -march-map=sm_xx, xx >= 80 is mapping to -march=sm_80 and implies -mptx=7.0 (i.e. ptx isa 7.0, added in CUDA 11.0); hence, any CUDA 11.0+ will do. OK for mainline? Tobias nvptx.opt: Add sm_89 and sm_90a to -march-map= The -march-map= options maps the compute capability to the closest lower compute capability that has been implemented; for sm_89 and sm_90a, that were previously missing, that's currently -march=sm_80 alias -misa=sm_80. gcc/ChangeLog: * config/nvptx/nvptx.opt (march-map=): Add sm_89 and sm_90a. Signed-off-by: Tobias Burnus diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt index 09d75fca037..deb006663d7 100644 --- a/gcc/config/nvptx/nvptx.opt +++ b/gcc/config/nvptx/nvptx.opt @@ -108,9 +108,15 @@ Target RejectNegative Alias(misa=,sm_80) march-map=sm_87 Target RejectNegative Alias(misa=,sm_80) +march-map=sm_89 +Target RejectNegative Alias(misa=,sm_80) + march-map=sm_90 Target RejectNegative Alias(misa=,sm_80) +march-map=sm_90a +Target RejectNegative Alias(misa=,sm_80) + Enum Name(ptx_version) Type(int) Known PTX ISA versions (for use with the -mptx= option):