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 9944141DCC; Mon, 13 Mar 2023 12:37:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36B53406BC; Mon, 13 Mar 2023 12:37:06 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id DC22040151 for ; Mon, 13 Mar 2023 12:37:04 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32D6TJjh027598; Mon, 13 Mar 2023 04:37:03 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=EzDfG9MhksjTEw2uNP3vVRkm/osfg1J7tIPS3g8VB04=; b=fsZDSO0TT8QZrPkNR5g0DvuY8/HuuiogvkaOAHq7v/Rmw81toyyhcf//35MxpfILNfZ3 ej0qvdXe4BleE7eVEw0HcTNjpLTiXtmfbcfwjlxyr/OvQuKdGeLMUkgtK7K6g1DXXdJ6 eWoTvnUUl8hDES8qSFxsFwelnFTaK/cdTInC+UtwDa5NsSXGoQT0TqsITLikQPQhQn/y xyni9ddJrRtb8UUF3btxYvjix4YzuQ3EubjmSHoFc08rORP64oHdBouRL7NsM1YffNEE PlGeORH/OCyqX8VRShWSubL7K3yClo6ytgo9tSF9gfDf5STyShkyWAmMzfUbUb/BOF5H 7A== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3p8t1t59kn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 04:37:02 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 13 Mar 2023 04:37:00 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Mon, 13 Mar 2023 04:37:00 -0700 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 5EB6B3F704A; Mon, 13 Mar 2023 04:36:59 -0700 (PDT) From: Srikanth Yalavarthi To: Srikanth Yalavarthi CC: , , , , , Subject: [PATCH v2 1/1] mldev: remove weak symbols use in type conversions Date: Mon, 13 Mar 2023 04:36:58 -0700 Message-ID: <20230313113658.11170-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230311145056.16386-1-syalavarthi@marvell.com> References: <20230311145056.16386-1-syalavarthi@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: hjiJ-kAeAVjMtfjq3iPqVvckaN8NsABU X-Proofpoint-ORIG-GUID: hjiJ-kAeAVjMtfjq3iPqVvckaN8NsABU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_05,2023-03-13_01,2023-02-09_01 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 Drop use of weak symbols to select the type conversion functions. Select NEON implementation only on Aarch64 builds. Enable windows build. Fixes: 9637de38a2e3 ("mldev: add scalar type conversion") Signed-off-by: Srikanth Yalavarthi Reviewed-by: David Marchand --- v2: * Updated Fixes reference lib/mldev/meson.build | 9 ++------- lib/mldev/mldev_utils_scalar.c | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/lib/mldev/meson.build b/lib/mldev/meson.build index 51ba809465..c9db42257b 100644 --- a/lib/mldev/meson.build +++ b/lib/mldev/meson.build @@ -1,21 +1,16 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Marvell. -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files( 'rte_mldev_pmd.c', 'rte_mldev.c', 'mldev_utils.c', - 'mldev_utils_scalar.c', ) if dpdk_conf.has('RTE_ARCH_ARM64') sources += files('mldev_utils_neon.c') +else + sources += files('mldev_utils_scalar.c') endif headers = files( diff --git a/lib/mldev/mldev_utils_scalar.c b/lib/mldev/mldev_utils_scalar.c index 40320ed3ef..322b009f5d 100644 --- a/lib/mldev/mldev_utils_scalar.c +++ b/lib/mldev/mldev_utils_scalar.c @@ -84,7 +84,7 @@ union float32 { uint32_t u; }; -__rte_weak int +int rte_ml_io_float32_to_int8(float scale, uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -116,7 +116,7 @@ rte_ml_io_float32_to_int8(float scale, uint64_t nb_elements, void *input, void * return 0; } -__rte_weak int +int rte_ml_io_int8_to_float32(float scale, uint64_t nb_elements, void *input, void *output) { int8_t *input_buffer; @@ -139,7 +139,7 @@ rte_ml_io_int8_to_float32(float scale, uint64_t nb_elements, void *input, void * return 0; } -__rte_weak int +int rte_ml_io_float32_to_uint8(float scale, uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -171,7 +171,7 @@ rte_ml_io_float32_to_uint8(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_uint8_to_float32(float scale, uint64_t nb_elements, void *input, void *output) { uint8_t *input_buffer; @@ -194,7 +194,7 @@ rte_ml_io_uint8_to_float32(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_float32_to_int16(float scale, uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -226,7 +226,7 @@ rte_ml_io_float32_to_int16(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_int16_to_float32(float scale, uint64_t nb_elements, void *input, void *output) { int16_t *input_buffer; @@ -249,7 +249,7 @@ rte_ml_io_int16_to_float32(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_float32_to_uint16(float scale, uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -281,7 +281,7 @@ rte_ml_io_float32_to_uint16(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_uint16_to_float32(float scale, uint64_t nb_elements, void *input, void *output) { uint16_t *input_buffer; @@ -429,7 +429,7 @@ __float32_to_float16_scalar_rtn(float x) return u16; } -__rte_weak int +int rte_ml_io_float32_to_float16(uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -513,7 +513,7 @@ __float16_to_float32_scalar_rtx(uint16_t f16) return f32.f; } -__rte_weak int +int rte_ml_io_float16_to_float32(uint64_t nb_elements, void *input, void *output) { uint16_t *input_buffer; @@ -614,7 +614,7 @@ __float32_to_bfloat16_scalar_rtn(float x) return u16; } -__rte_weak int +int rte_ml_io_float32_to_bfloat16(uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -696,7 +696,7 @@ __bfloat16_to_float32_scalar_rtx(uint16_t f16) return f32.f; } -__rte_weak int +int rte_ml_io_bfloat16_to_float32(uint64_t nb_elements, void *input, void *output) { uint16_t *input_buffer; -- 2.17.1