From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 968C1A0546; Fri, 30 Apr 2021 17:11:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F2084014F; Fri, 30 Apr 2021 17:11:31 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 66C324013F for ; Fri, 30 Apr 2021 17:11:30 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id j6so9308296pfh.5 for ; Fri, 30 Apr 2021 08:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9+CSb/CZ9j/CKSlwjxIdfBswKDcw9LyPkOofaHF1o/4=; b=vZwA8VhAO8Ks4Yeq5UOWjXjf8BJZAzOGAZ4YLxgl31VAv+SVQo5bqkRb6p7MywKdXE FfyVMWSUTTcOtYbeijaBWhWuwGcp8HBo3p9Tnd0IjjhzD1DTvwfHAvRyfDh0pAnNCNQ8 rzcFEAKf14EbvMfcXvraxZloO3Xg4tzZXWwCzRn3FMbF0Hhwi24bpfMTZfJK8ekTtswb yZ61yWx2z+xlz6gE2QqutmWjiR34VMD4yRZo9dB0JFFt0BhR6k/4gQmo4vNgRmSHfveN KOv9krgONXdiH6p/TsGVd8LIcX/YZYHj1tPnuaKShgD38cg1dQSoq3r14lb0hJqnfiZQ VDlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9+CSb/CZ9j/CKSlwjxIdfBswKDcw9LyPkOofaHF1o/4=; b=VNlphY/coqzaSPx1oMU0nbw288hwUb2kkgHBv1ylOlsZFqWPnj76iadvZ5nD6tykGP 4HJ5HeWu47jhXXERYyy26PHtU5fnF5u706UbZuErhJ5w9WSGt3mNCWXXZoooBt5MVipj 3meUxVyzsrYmgMbmWfQ7VOtCelcjuJpDOvJQ6LBEGeNsBJqAFvqzvKwOecK2icyZscu9 sNQdcraSI/9QLL4pJcDCBvuDlc/9C/2PpHlfnt6btJC/CIsXpVhVdcS8C8jE9zT5Oi0z p0tNf84NfyeegESfoRF22BkqIEWxutzUOM87howIsh/UwgkE9gtjlkLwvVbA21jpACmM AIiw== X-Gm-Message-State: AOAM532mxiJuW3mcDLuJX2TJeMnnHS1xqR7WyQKZ75qcKMJHJxw5GA9Q sti0CrL8T6GFhB+ycvvLzzIShGHVmeFr9V42R6Q= X-Google-Smtp-Source: ABdhPJyv5Gz93UjkUAW2pSMX0V/R3xnelCwGHPbjORFWSViwPyU1P3g+xc/7UDCn6VdMZmNl3tJGevKRO0Hhe5sNXbo= X-Received: by 2002:a62:178f:0:b029:28d:bc9:5bc7 with SMTP id 137-20020a62178f0000b029028d0bc95bc7mr2342488pfx.69.1619795489505; Fri, 30 Apr 2021 08:11:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jerin Jacob Date: Fri, 30 Apr 2021 20:41:13 +0530 Message-ID: To: fengchengwen , "Richardson, Bruce" , Thomas Monjalon , David Marchand , Honnappa Nagarahalli , Stephen Hemminger , "Ananyev, Konstantin" Cc: "dev@dpdk.org" , Jerin Jacob , "Ruifeng Wang (Arm Technology China)" , "humin29@huawei.com" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] How to disable SVE auto vectorization while using GCC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Apr 30, 2021 at 5:27 PM fengchengwen wrote: > > Hi, ALL > We have a question for your help: > 1. We have two platforms, both of which are ARM64, one of which supports > both NEON and SVE, the other only support NEON. > 2. We want to run on both platforms with a single binary file, and use the > highest vector capability of the corresponding platform whenever possible. I see VPP has a similar feature. IMO, it is not present in DPDK. Basically, In order to do this. - Compile slow-path code(90% of DPDK) with minimal CPU instruction set support - Have fastpath function compile with different CPU instruction set levels -In slowpath, Attach the fastpath function pointer-based on CPU instruction-level support. > 3. So we build the DPDK program with -march=armv8-a+sve+crc (GCC 10.2). > However, it is found that invalid instructions occur when the program > runs on a machine that does not support SVE (pls see below). > 4. The problem is caused by the introduction of SVE in GCC automatic vector > optimization. > > So Is there a way to disable GCC automatic vector optimization or use only > NEON to perform automatic vector optimization? > > BTW: we already test -fno-tree-vectorize (as link below) but found no effect. > https://stackoverflow.com/questions/7778174/how-can-i-disable-vectorization-while-using-gcc > > > The GDB output: > EAL: Detected 128 lcore(s) > EAL: Detected 4 NUMA nodes > Option -w, --pci-whitelist is deprecated, use -a, --allow option instead > > Program received signal SIGILL, Illegal instruction. > 0x0000000000671b88 in eal_adjust_config () > (gdb) > (gdb) where > #0 0x0000000000671b88 in eal_adjust_config () > #1 0x0000000000682840 in rte_eal_init () > #2 0x000000000051c870 in main () > (gdb) > > The disassembly output of eal_adjust_config: > 671b7c: f8237a81 str x1, [x20, x3, lsl #3] > 671b80: f110001f cmp x0, #0x400 > 671b84: 54ffff21 b.ne 671b68 // b.any > 671b88: 043357f5 addvl x21, x19, #-1 > 671b8c: 043457e1 addvl x1, x20, #-1 > 671b90: 910562b5 add x21, x21, #0x158 > 671b94: 04e0e3e0 cntd x0 > 671b98: 914012b5 add x21, x21, #0x4, lsl #12 > 671b9c: 52800218 mov w24, #0x10 // #16 > 671ba0: 25d8e3e1 ptrue p1.d > 671ba4: 25f80fe0 whilelo p0.d, wzr, w24 > 671ba8: a5e04020 ld1d {z0.d}, p0/z, [x1, x0, lsl #3] > > > Best regards. >