From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id E8A513858D28 for ; Wed, 26 Apr 2023 03:00:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E8A513858D28 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-pg1-x530.google.com with SMTP id 41be03b00d2f7-51b4ef5378bso6522120a12.1 for ; Tue, 25 Apr 2023 20:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682478025; x=1685070025; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2sXbBxRtfAp05WJjVvVrkPaYKtUNY22+uRPUPNNEChA=; b=LarGLIz+uOX52WQ+nY0Ott3ug/GgDzMCLB696+pLNw9+H7eoEfVnZ9UmroVPSKTJ5A YlBeqp6b5SqOgxhLjpP8OopJo2re7LMwpQ3YYPmnF6prgO3xsc/wWGmqe9HKzLZCEM0e B9KsggqRbglrpDIwLwrl8WXgJIFbBd4x8CK6Cbwr9AXeCRkQGr9MVBgefFVL5n2x+uee blEt+V7OLQP+HYQjXRGkjYCw3C8RY7Fkg8vxZsA7Uev+MWwLBzpx3vPiwTb31kRd0i91 v9Nifj5kWfhnBgKM6ojcI1x5NhN63dmqPbZMegRi5HkVYQzrCVILh5gsijYwwaKBxUPO HKcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682478025; x=1685070025; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2sXbBxRtfAp05WJjVvVrkPaYKtUNY22+uRPUPNNEChA=; b=jpGceYOmUZU0efjw3zoBouUmtefRRn7JdSHuXFrE5oE86rME/6q5W398NuMi9bkzlE JAHjTiCHss9kFlPtLwspLpJ0JTiY7DpvjfvrO6R4PgUDZhFG4XTvFDv/Va8EbwKDm6ee xRd3ftA8M/PlFpmWLUBGqiX3wdLUZqMCPzD6SB9HnRqwXXh9eaF84P9u5XV+1CzCew8J IC9fOKjsxh8h+m4411Ux89wUWbFWqUUEjSQg3KMW1EQ7Ey6ySCFrOmlDZQneHs7KrABM z7PiOgKg9TIJHMRY4QyCUv2oe4JjI/JbFC5Y8BPDiEJV3UCUt57gm9tfzCQ/dO6EWxvh 3A+A== X-Gm-Message-State: AAQBX9ca+tDyh2FU5dd8y74HKo5F326e3qhNtp/pTuPI6eAzOxSlp62T gCq2dZ/syJSXWKZOSzA9l74= X-Google-Smtp-Source: AKy350Z5RHfyWd36lSiOV42Do4BvjvatfuDiK4BhYugmFHgWXStpg4Bp6moKOopQ3Vyg2Lp1zkSEfw== X-Received: by 2002:a05:6a20:d80e:b0:ee:aa9e:945a with SMTP id iv14-20020a056a20d80e00b000eeaa9e945amr22565226pzb.26.1682478024646; Tue, 25 Apr 2023 20:00:24 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::99f? ([2601:681:8600:13d0::99f]) by smtp.gmail.com with ESMTPSA id q22-20020a63e956000000b005033e653a17sm8726738pgj.85.2023.04.25.20.00.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Apr 2023 20:00:24 -0700 (PDT) Message-ID: Date: Tue, 25 Apr 2023 21:00:22 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 1/3] RISC-V: Add auto-vectorization compile option for RVV Content-Language: en-US To: Richard Biener , juzhe.zhong@rivai.ai Cc: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, palmer@dabbelt.com References: <20230419163634.1030144-1-juzhe.zhong@rivai.ai> <20230419163634.1030144-2-juzhe.zhong@rivai.ai> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 List-Id: On 4/20/23 05:08, Richard Biener wrote: > On Wed, Apr 19, 2023 at 6:38 PM wrote: >> >> From: Ju-Zhe Zhong >> >> This patch is adding 2 compile option for RVV auto-vectorization. >> 1. -param=riscv-autovec-preference= >> This option is to specify the auto-vectorization approach for RVV. >> Currently, we only support scalable and fixed-vlmax. >> >> - scalable means VLA auto-vectorization. The vector-length to compiler is >> unknown and runtime invariant. Such approach can allow us compile the code >> run on any vector-length RVV CPU. >> >> - fixed-vlmax means the compile known the RVV CPU vector-length, compile option >> in fixed-length VLS auto-vectorization. Meaning if we specify vector-length=512. >> The execution file can only run on vector-length = 512 RVV CPU. >> >> - TODO: we may need to support min-length VLS auto-vectorization, means the execution >> file can run on larger length RVV CPU. > > Just as a generic comment - if the option should be exposed to users > rather than just used > for testsuite or development purposes it should eventually become a > -mautovec-preference= > flag (no need to prefix with riscv). I would expect that we don't want users twiddling the autovectorization style in the long term. I do support having the param so that we can can do A/B experiments across the styles to identify gaps. jeff