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 D88EE41E9D; Wed, 15 Mar 2023 11:02:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6E5240A7A; Wed, 15 Mar 2023 11:02:31 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2074.outbound.protection.outlook.com [40.107.6.74]) by mails.dpdk.org (Postfix) with ESMTP id 1252340141 for ; Wed, 15 Mar 2023 11:02:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TwmEhNvhZ5nfjZ9TDnuNpwve/rkUQvHksOlRErwSPKQ=; b=D0nhn5VcGEAM04tDn4SAlZCHjAezu9j/nG8Pug+w+LhFd5ZUgcixDu7QI/UeWycMVEF1OTKROfggmtYB5k/Wux5DTb2avxHH135dXZ2Ku11XAJOzHtlAvPBhXFIjwRfpx/xzHcsR38fnv7v7uc9zDT3woUuJziBDc1Di/rn8RaQ= Received: from AS9PR05CA0091.eurprd05.prod.outlook.com (2603:10a6:20b:498::6) by DB8PR08MB5449.eurprd08.prod.outlook.com (2603:10a6:10:119::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.26; Wed, 15 Mar 2023 10:02:22 +0000 Received: from AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:498:cafe::92) by AS9PR05CA0091.outlook.office365.com (2603:10a6:20b:498::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.26 via Frontend Transport; Wed, 15 Mar 2023 10:02:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT037.mail.protection.outlook.com (100.127.140.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6199.16 via Frontend Transport; Wed, 15 Mar 2023 10:02:22 +0000 Received: ("Tessian outbound 55ffa3012b8f:v135"); Wed, 15 Mar 2023 10:02:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 239bbed1dbf21def X-CR-MTA-TID: 64aa7808 Received: from d1c511f06c5f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3249E533-F84C-4885-A1F0-20806D421D08.1; Wed, 15 Mar 2023 10:02:16 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d1c511f06c5f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 15 Mar 2023 10:02:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bdFEe/TSBVFgzwJgQvucPs1G20op630bc1GnsDVrMvw4mTpYVbwU71QHx+wnvJOaGUBi3HuwfjEh00ZdZbh35/4vGMmhDWRK9A0TWFv3qYQEhhJMr2XR3x48szU7VAIjsWae7YjZ1NUFjvQN+/c/6Xm6UGDvb8QeZ+mQsWI6PRcKwNCbSrq5ASJSj11tBv0GfLZJ7b/tYRWWjiYC0ct37+LsDM/mQdJRxlaEphiSkjabxSVjHD6zztHhjcz5Bpe50KO+YKjhqHCmEDfsF1OIUkBMrm1tZ+/zH9rJ8u7ui+dqlN7cRw9QSOMAgsr22Dbw/qpe7NVNXJIt/+vsA3Wxlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TwmEhNvhZ5nfjZ9TDnuNpwve/rkUQvHksOlRErwSPKQ=; b=VTHPmjdDMbaCthJv8s0AsQSzIzl8oSKMu0cv23el/e3yhS1rEMMMF6AAkPE9lb8F4tZBlX2VGQD4uO2N3lBuk2+/DOb6W58eBDEmsnVbcgiVe1/sF/vurxGWtzNbUDXOwGsanDN1ky6WtTJcar8t3Os0EQnO0iKPK3fuWvkMdkXQt3X6HCOh4Qq1c1VIZc/OYoEmtuw5QYddEH2hr2f52TnjgPw0XcGBa4YeN1flBAm+Jef0cuIN3RMNxmk9n1/NydbRTjo5LwpdrMIh7Z3WVlWLbciRYJUuPzstmOvh8LWUmjSFToroYmgbtSnre5pe0MLgBr9MirMVU/wrlR/xSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TwmEhNvhZ5nfjZ9TDnuNpwve/rkUQvHksOlRErwSPKQ=; b=D0nhn5VcGEAM04tDn4SAlZCHjAezu9j/nG8Pug+w+LhFd5ZUgcixDu7QI/UeWycMVEF1OTKROfggmtYB5k/Wux5DTb2avxHH135dXZ2Ku11XAJOzHtlAvPBhXFIjwRfpx/xzHcsR38fnv7v7uc9zDT3woUuJziBDc1Di/rn8RaQ= Received: from AS8PR08MB7080.eurprd08.prod.outlook.com (2603:10a6:20b:401::19) by DB9PR08MB6651.eurprd08.prod.outlook.com (2603:10a6:10:26e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.26; Wed, 15 Mar 2023 10:02:13 +0000 Received: from AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::3e2c:a99c:db5b:601f]) by AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::3e2c:a99c:db5b:601f%6]) with mapi id 15.20.6178.029; Wed, 15 Mar 2023 10:02:13 +0000 From: Ruifeng Wang To: Srikanth Yalavarthi CC: "dev@dpdk.org" , "sshankarnara@marvell.com" , "david.marchand@redhat.com" , nd Subject: RE: [PATCH v2 1/1] mldev: split bfloat16 routines to separate files Thread-Topic: [PATCH v2 1/1] mldev: split bfloat16 routines to separate files Thread-Index: AQHZVaPWSa+eiM2DCES5dVmL4b0Uda77nkEA Date: Wed, 15 Mar 2023 10:02:13 +0000 Message-ID: References: <20230313114342.10812-1-syalavarthi@marvell.com> <20230313120306.28911-1-syalavarthi@marvell.com> In-Reply-To: <20230313120306.28911-1-syalavarthi@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: A93942113B3AA44CBA82175C5F950F93.0 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AS8PR08MB7080:EE_|DB9PR08MB6651:EE_|AM7EUR03FT037:EE_|DB8PR08MB5449:EE_ X-MS-Office365-Filtering-Correlation-Id: 0503d7ac-d268-4720-1858-08db253c5f30 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: JjuLI2pCHuv7iagzo/mtENtCBAckRRuHQyKXJTlue34NfZ5gNSZ5I/VrRPEn/hW1CO/jKbDMbfb5EO4jLo0w9meHBfKxi1y5+sFYg5DnHzDxHfGy4GX8UjRjfEBalraBFIdyqMyH42daOgcdnUiayh4+/+ejzfgDDCOEA2CVwuFgvGUL7WMviUidnduIub1U/vu5+0v85uxU/MwAxosVOmJAI1vKCPpWhQ6SwZqcB6vbTRa6syO58FSfBbJOdIxzErP9uubhP6cjWdqUEruAs1/Cf//muqymOUEoU8ZYa6ydc1/TL8Bu27ERXlZnZHsS7AZoMUHiIl4Oq2fBZpGChPXfzwrECkAGGOvzYrIb+4wPM9ERDg6KSBW6k71ZzKRfbpdQDbTqP24889vWuiDhzL7n5NseSrIR5jURQ7QIntFBQfLuhINA0HEOP7KBnbsT5W8eZy8Uti6QrmZ28xMl0UZ+SmW6iPQbx8H5sP+Gm+C1Y6K/hRep2o6307ug6yT8e3+773C6juV6VGUqxImDqMZZnVC3u8zllL1VkF5tkbJUxRDF3mI5s99o5ZKEedX7UZyC9tBXFPwA8f4Z3K2FH5Gp7rYiSTmIC0aU4E4VuVSE+lUcAdUR/VmMSt9TjR5EyAnLD7Oc2qfAaa85g2b3coxVdTMb8NYoOJG8Z9H7JxvfhU7ovBk5muEj74RKNk3+7HaK/FzMHIAKwKL3VoD0xg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB7080.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(136003)(39860400002)(366004)(396003)(376002)(346002)(451199018)(66476007)(4326008)(41300700001)(66556008)(66446008)(6916009)(64756008)(26005)(8676002)(76116006)(66946007)(5660300002)(83380400001)(8936002)(52536014)(186003)(53546011)(9686003)(54906003)(6506007)(7696005)(71200400001)(316002)(55016003)(33656002)(38070700005)(86362001)(2906002)(38100700002)(122000001)(478600001); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6651 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 99c56414-ddb9-410f-6f7c-08db253c597d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b8wBB0geTGMkJJJn9UWAYw+rWBcDGnko12Q4d/ADIHcilrWVnsVVFzy4mzMO86JGo8jKGjoTIcbamMuVX6UGML77zmQcnul03rLYEsY2X2HqubSYoY3Bgjn+bq5ev2d32MDZ1K9IwtWb59wAWHDB9RcGxgOrAjnWx/HYvZLcWTuDZb1AX5zebT69K+QCQUuVzXjiWJgPns93/xCU1r0n/jToOMiiaOmmrjTAuSpEPoGJ3+yZkvFAMWk6j8kBpz/a2MqsSRMx/0wfNZrVikysASSV4BmS1imkr/5+a4O01FVIqbo+9pY26LC+GT+E4sIXGRz/oTyxuwwFeMeBZg9wrmcsKp/makGWlVyOF4xAIP6dngqrN3tBgQ5s4sw+5RhMgKd9hfJbn3SZYnuHRoo0mzfQaxWZ2e6+MUrEYVLuYM5Nvxrspe0yIEJS5mkDQfe6VChwdsLR8XcPEKCUQtRlQyT2D0YGpjafwg8zcRnAafzQUPe51MyVzSPJPNRpL4nlY7Mbd3QmRxVVobCR4b3J/hKP/fHofQMbUHGUJVAfFm2hWG2a+Cq0FuCq0ASH0O1xw9o5xW/LJ6CLF58/lAGxfW0BXdlTLXCOUZkSVhyutmtstaX7asC//UzHHV+lKp9Xaa9iCdUyVhEl0LFBgRWqd98wiRLumU5bUHDUTS4iG6/krPogxmP/3QYaqmQyErnj39xs2T57mD4ZnY9Y/Sxk1Q== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(346002)(376002)(136003)(396003)(451199018)(36840700001)(46966006)(40470700004)(33656002)(86362001)(356005)(82740400003)(36860700001)(8936002)(2906002)(81166007)(41300700001)(5660300002)(6862004)(52536014)(4326008)(40480700001)(82310400005)(55016003)(40460700003)(47076005)(6506007)(9686003)(186003)(26005)(54906003)(316002)(336012)(53546011)(83380400001)(478600001)(70586007)(70206006)(8676002)(7696005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2023 10:02:22.7685 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0503d7ac-d268-4720-1858-08db253c5f30 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5449 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 > -----Original Message----- > From: Srikanth Yalavarthi > Sent: Monday, March 13, 2023 8:03 PM > To: Srikanth Yalavarthi ; Ruifeng Wang > Cc: dev@dpdk.org; sshankarnara@marvell.com; david.marchand@redhat.com > Subject: [PATCH v2 1/1] mldev: split bfloat16 routines to separate files >=20 > Since bfloat16 intrinsics are not supported on all ARM platforms that sup= port NEON, > bfloat16 routines are moved to separate files. > This would enable using scalar implementation for bfloat16 on unsupported= ARM platforms. >=20 > Bugzilla ID: 1179 > Fixes: fc54766b1612 ("mldev: add Arm NEON type conversion") >=20 > Signed-off-by: Srikanth Yalavarthi > --- > Depends-on: patch-120653 ("mldev: remove weak symbols use in type convers= ions") > Depends-on: patch-125035 ("mldev: fix identical code in conditional branc= hes") >=20 > lib/mldev/meson.build | 11 +- > lib/mldev/mldev_utils_neon.c | 142 +------------ > lib/mldev/mldev_utils_neon_bfloat16.c | 154 ++++++++++++++ > lib/mldev/mldev_utils_scalar.c | 262 +----------------------- > lib/mldev/mldev_utils_scalar.h | 80 ++++++++ > lib/mldev/mldev_utils_scalar_bfloat16.c | 197 ++++++++++++++++++ > 6 files changed, 445 insertions(+), 401 deletions(-) create mode 100644 > lib/mldev/mldev_utils_neon_bfloat16.c > create mode 100644 lib/mldev/mldev_utils_scalar.h create mode 100644 > lib/mldev/mldev_utils_scalar_bfloat16.c >=20 > diff --git a/lib/mldev/meson.build b/lib/mldev/meson.build index c9db4225= 7b..5769b0640a > 100644 > --- a/lib/mldev/meson.build > +++ b/lib/mldev/meson.build > @@ -7,12 +7,21 @@ sources =3D files( > 'mldev_utils.c', > ) >=20 > -if dpdk_conf.has('RTE_ARCH_ARM64') > +if (dpdk_conf.has('RTE_ARCH_ARM64') and > + cc.get_define('__ARM_NEON', args: machine_args) !=3D '') I found in ACLE document that "__ARM_NEON" is always set to 1 for AArch64". So this line of check is redundant? > sources +=3D files('mldev_utils_neon.c') else > sources +=3D files('mldev_utils_scalar.c') endif >=20 > +if (dpdk_conf.has('RTE_ARCH_ARM64') and > + cc.get_define('__ARM_NEON', args: machine_args) !=3D '' and Same here. > + cc.get_define('__ARM_FEATURE_BF16', args: machine_args) !=3D '') > + sources +=3D files('mldev_utils_neon_bfloat16.c') > +else > + sources +=3D files('mldev_utils_scalar_bfloat16.c') > +endif > + > headers =3D files( > 'rte_mldev.h', > )