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 06EC34249E; Fri, 27 Jan 2023 10:02:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9432940150; Fri, 27 Jan 2023 10:02:42 +0100 (CET) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) by mails.dpdk.org (Postfix) with ESMTP id 7F31C40146 for ; Fri, 27 Jan 2023 10:02:41 +0100 (CET) Received: by mail-vs1-f52.google.com with SMTP id t10so4651685vsr.3 for ; Fri, 27 Jan 2023 01:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dXVMSHPLiTa4x1DBvvHguvGQ0SrpYVKwLzv7TZPd+Qk=; b=NM/E8GDbgI992fTOMfOwa4zx7kzbeU30Z3iyj7ojF036temN5gOnSNER+a+GrjJuII LF4ust34sLJsvWrtTiY6+zufVaevN2t6omfuAOUd1XOFZHCXtFzj+qgHUuHUO6xqMMT1 HPT4AV+6HWs5YbO4Ool+kvrQ3qSzgNJo50l3pw3qABzXW3U2Vr/Fl7IABMWOC5N40EmK GlxL6Fmx4kAxFqURndms1ovW315Sl8IqjQVYcWmmbgCdhir511VGlDk0rp8PBmocm/dz EujmnX3Y0AecgwUFi7/6V+jNNaqdFsCrABYn3gT0vTRI/mSS+gX0H7015Z/9bTdwvCQM E78Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dXVMSHPLiTa4x1DBvvHguvGQ0SrpYVKwLzv7TZPd+Qk=; b=O3JmrFUyXWN9NtfUP//VrA9s1sEqrE5TCmSI3lwPwNk0dr9B2rLzXmSHR1svpMr1Dd 5xfltA5/kmsxaeA8wtTwXKeXjPIXcomkWopTH/ZeTlbf1XTDrVDuVdcodnr4/sxbQONe umNDu+bIOoGf+pUi98aUhzq+5qUWAtvAERa5zb1StHLLoWzdANU0fVAF6V4JcZnaMFf3 q02hj7DvyAAGWQz8xhlLnofQPFVKCLFIrI2sN7QM6SDDQuxBBzr45IKW72aZq7G2L3ai Yt5HCItuy3EnklmrulCvJPy8rO5Qu2N8Wxh9wFCPVwaxNUti+HIehxxvmWzbySXISaEL o+KQ== X-Gm-Message-State: AFqh2koyt+iGhAVmjWMV6qhKxxFMmurubDznU9aOfqPUWCkPanKLeGjH jiQoOCMxGjU92kG/o0XK+cAVJSjf3YeKJc9rNYY= X-Google-Smtp-Source: AMrXdXsEVrATBkj2ZnIkuZSA5A0bByw/Ghtymk/D2HvicWaCp5fdLI9kITe62F6UHVCLqhsAxNv7nocE85AeUPyejOI= X-Received: by 2002:a05:6102:1173:b0:3d0:bfd2:3a12 with SMTP id k19-20020a056102117300b003d0bfd23a12mr5345794vsg.52.1674810160692; Fri, 27 Jan 2023 01:02:40 -0800 (PST) MIME-Version: 1.0 References: <20221212172108.17993-1-syalavarthi@marvell.com> <2095842.dTVjPilprF@thomas> <2166662.Bm8zEkEi59@thomas> In-Reply-To: <2166662.Bm8zEkEi59@thomas> From: Jerin Jacob Date: Fri, 27 Jan 2023 14:32:14 +0530 Message-ID: Subject: Re: [EXT] Re: [PATCH v3 0/4] implementation of ML common code To: Thomas Monjalon Cc: Shivah Shankar Shankar Narayan Rao , Srikanth Yalavarthi , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , Anup Prabhu , "ferruh.yigit@amd.com" , "bruce.richardson@intel.com" , "david.marchand@redhat.com" Content-Type: text/plain; charset="UTF-8" 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 On Fri, Jan 27, 2023 at 2:20 PM Thomas Monjalon wrote: > > 27/01/2023 07:40, Jerin Jacob: > > On Thu, Jan 26, 2023 at 4:27 PM Thomas Monjalon wrote: > > > 25/01/2023 15:59, Srikanth Yalavarthi: > > > > From: Thomas Monjalon > > > > > 25/01/2023 14:25, Srikanth Yalavarthi: > > > > > > From: Thomas Monjalon > > > > > > > 20/12/2022 18:52, Srikanth Yalavarthi: > > > > > > > > This patch series implements the common ML code that can be used > > > > > > > > by ML drivers. Common code include functions to convert ML IO type > > > > > > > > to string, IO format type to string, function get size of ML IO > > > > > > > > type, and functions for converting data types from higher > > > > > > > > precision to lower precision and vice-versa. > > > > > > > > > > > > > > I'm not sure about the path of this code. > > > > > > > In general we implement drivers helper in the same directory as the > > > > > > > driver and mark it as internal. > > > > > > > Would it work here? > > > > > > > > > > > > We are planning to implement two different ML drivers, ml/cnxk driver > > > > > (submitted for review) and a software only driver (part of ML roadmap and > > > > > currently WIP). Both the drivers would be using these common functions for > > > > > quantization and dequantization. Hence, placed the files in common/ml > > > > > directory. > > > > > > > > > > > > Moreover, these functions are used to convert data from higher to lower > > > > > precision or vice-versa and can also be used by future ML drivers for other > > > > > platforms. > > > > > > > > > > I understand, and what you say does not contradict with having this code in > > > > > lib/mldev/. > > > > > So would you agree to move? > > > > > > > > These common functions do not have an rte_ml_dev_ prefix. > > > > > > As it is exported, it should have rte_ prefix. > > > > The exposed functions are similar to lib/ethdev/sff_* where multiple > > driver can "use" it > > but not by application directly. > > If so, What is the recommendation > > a) Keeping driver/common/ml without rte_prefix > > b) Keeping in lib/mldev/ with rte_mldev_pmd_ prefix? > > > > I prefer (a) as it will not pollute lib/mldev. No strong opinion, > > either. Let me know your view or any other suggestion? > > I don't see it as pollution, it comes with the library, > so I prefer lib/mldev/ with rte_mldev_pmd_ prefix. > > > > > Is it ok to have non-RTE code in lib/mldev. If yes, we can move to lib/mldev. > > > > > > Look at lib/ethdev/ethdev_driver.h, it should be similar. > > > > Here scope is different. See above. > > No the scope is not different. > They are functions used by drivers not by application. When you say lib/ethdev/ethdev_driver.h. You mean "struct eth_dev_ops" scheme. That is already there for public ml dev APIs. See http://patches.dpdk.org/project/dpdk/patch/20221114120238.2143832-4-jerinj@marvell.com/ Here it meant to be functions which is not backed any function pointers as those are "generic" Utils for drivers(not driver specific). If so, did you prefer rte_mldev_pmd_ in lib/mldev/ ? > > >