get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/132031/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 132031,
    "url": "http://patchwork.dpdk.org/api/patches/132031/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230927181159.9794-4-syalavarthi@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230927181159.9794-4-syalavarthi@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230927181159.9794-4-syalavarthi@marvell.com",
    "date": "2023-09-27T18:11:57",
    "name": "[v3,3/4] mldev: drop input and output size get APIs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3e3449aa77209a0c018b42d5cd59b1a9ac75030f",
    "submitter": {
        "id": 2480,
        "url": "http://patchwork.dpdk.org/api/people/2480/?format=api",
        "name": "Srikanth Yalavarthi",
        "email": "syalavarthi@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230927181159.9794-4-syalavarthi@marvell.com/mbox/",
    "series": [
        {
            "id": 29660,
            "url": "http://patchwork.dpdk.org/api/series/29660/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29660",
            "date": "2023-09-27T18:11:54",
            "name": "Spec changes to support multi I/O models",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/29660/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/132031/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/132031/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6F844425B7;\n\tWed, 27 Sep 2023 20:12:28 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8B309406FF;\n\tWed, 27 Sep 2023 20:12:15 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 5A38340685\n for <dev@dpdk.org>; Wed, 27 Sep 2023 20:12:12 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 38RHOgoO012233 for <dev@dpdk.org>; Wed, 27 Sep 2023 11:12:11 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3tcrrs05sk-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 27 Sep 2023 11:12:11 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Wed, 27 Sep 2023 11:12:09 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Wed, 27 Sep 2023 11:12:09 -0700",
            "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 6710F3F709D;\n Wed, 27 Sep 2023 11:12:09 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=UmUXmrZCLS+yjqC7DCyBlW/03eTSqisXW8c34/kxvSU=;\n b=SUVPhk0wPdnTN7IbBfjsytXHfAez0SuCqnv2/a0xY58law5w+StPW8M4eR2OoWu1Fqba\n 6FdjqqTpn8g4AeN13Mk0HHAJ7IV2mPNDf0Vx2f15uCx+h5QMcEsrsTdzIM5ze1zJJilT\n ENCW7HF7o1JoPgmD6H4bWWACAWc88xxFFqLhZHNBCtvcPlKkeFm2IEMRoEX3Z6NBPFCm\n vML+FL8gQJxQHy6itZJdTe+q2QS4cgdcD5JPtTE06GOaxe7nID60oJ9MjAfggxUkeWUx\n kO52h2TRlVQGyyy58XNM4zhK/oCOORg3KOX5g+LXkVumSU/s3j2dNBBgsy1wiMHIxoiT 1w==",
        "From": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "To": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "CC": "<dev@dpdk.org>, <sshankarnara@marvell.com>, <aprabhu@marvell.com>,\n <ptakkar@marvell.com>",
        "Subject": "[PATCH v3 3/4] mldev: drop input and output size get APIs",
        "Date": "Wed, 27 Sep 2023 11:11:57 -0700",
        "Message-ID": "<20230927181159.9794-4-syalavarthi@marvell.com>",
        "X-Mailer": "git-send-email 2.41.0",
        "In-Reply-To": "<20230927181159.9794-1-syalavarthi@marvell.com>",
        "References": "<20230830155303.30380-1-syalavarthi@marvell.com>\n <20230927181159.9794-1-syalavarthi@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "bGRkBB7FMaFc5ziD1gZQiqD9JeKs0MOS",
        "X-Proofpoint-GUID": "bGRkBB7FMaFc5ziD1gZQiqD9JeKs0MOS",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-09-27_12,2023-09-27_01,2023-05-22_02",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Drop support and use of ML input and output size get functions,\nrte_ml_io_input_size_get and rte_ml_io_output_size_get.\n\nThese functions are not required, as the model buffer size can\nbe computed from the fields of updated rte_ml_io_info structure.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n drivers/ml/cnxk/cn10k_ml_ops.c | 50 ----------------------------\n lib/mldev/rte_mldev.c          | 38 ---------------------\n lib/mldev/rte_mldev.h          | 60 ----------------------------------\n lib/mldev/rte_mldev_core.h     | 54 ------------------------------\n lib/mldev/version.map          |  2 --\n 5 files changed, 204 deletions(-)",
    "diff": "diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c\nindex 1d72fb52a6..4abf4ae0d3 100644\n--- a/drivers/ml/cnxk/cn10k_ml_ops.c\n+++ b/drivers/ml/cnxk/cn10k_ml_ops.c\n@@ -2110,54 +2110,6 @@ cn10k_ml_model_params_update(struct rte_ml_dev *dev, uint16_t model_id, void *bu\n \treturn 0;\n }\n \n-static int\n-cn10k_ml_io_input_size_get(struct rte_ml_dev *dev, uint16_t model_id, uint32_t nb_batches,\n-\t\t\t   uint64_t *input_qsize, uint64_t *input_dsize)\n-{\n-\tstruct cn10k_ml_model *model;\n-\n-\tmodel = dev->data->models[model_id];\n-\n-\tif (model == NULL) {\n-\t\tplt_err(\"Invalid model_id = %u\", model_id);\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tif (input_qsize != NULL)\n-\t\t*input_qsize = PLT_U64_CAST(model->addr.total_input_sz_q *\n-\t\t\t\t\t    PLT_DIV_CEIL(nb_batches, model->batch_size));\n-\n-\tif (input_dsize != NULL)\n-\t\t*input_dsize = PLT_U64_CAST(model->addr.total_input_sz_d *\n-\t\t\t\t\t    PLT_DIV_CEIL(nb_batches, model->batch_size));\n-\n-\treturn 0;\n-}\n-\n-static int\n-cn10k_ml_io_output_size_get(struct rte_ml_dev *dev, uint16_t model_id, uint32_t nb_batches,\n-\t\t\t    uint64_t *output_qsize, uint64_t *output_dsize)\n-{\n-\tstruct cn10k_ml_model *model;\n-\n-\tmodel = dev->data->models[model_id];\n-\n-\tif (model == NULL) {\n-\t\tplt_err(\"Invalid model_id = %u\", model_id);\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tif (output_qsize != NULL)\n-\t\t*output_qsize = PLT_U64_CAST(model->addr.total_output_sz_q *\n-\t\t\t\t\t     PLT_DIV_CEIL(nb_batches, model->batch_size));\n-\n-\tif (output_dsize != NULL)\n-\t\t*output_dsize = PLT_U64_CAST(model->addr.total_output_sz_d *\n-\t\t\t\t\t     PLT_DIV_CEIL(nb_batches, model->batch_size));\n-\n-\treturn 0;\n-}\n-\n static int\n cn10k_ml_io_quantize(struct rte_ml_dev *dev, uint16_t model_id, struct rte_ml_buff_seg **dbuffer,\n \t\t     struct rte_ml_buff_seg **qbuffer)\n@@ -2636,8 +2588,6 @@ struct rte_ml_dev_ops cn10k_ml_ops = {\n \t.model_params_update = cn10k_ml_model_params_update,\n \n \t/* I/O ops */\n-\t.io_input_size_get = cn10k_ml_io_input_size_get,\n-\t.io_output_size_get = cn10k_ml_io_output_size_get,\n \t.io_quantize = cn10k_ml_io_quantize,\n \t.io_dequantize = cn10k_ml_io_dequantize,\n };\ndiff --git a/lib/mldev/rte_mldev.c b/lib/mldev/rte_mldev.c\nindex 9a48ed3e94..cc5f2e0cc6 100644\n--- a/lib/mldev/rte_mldev.c\n+++ b/lib/mldev/rte_mldev.c\n@@ -691,44 +691,6 @@ rte_ml_model_params_update(int16_t dev_id, uint16_t model_id, void *buffer)\n \treturn (*dev->dev_ops->model_params_update)(dev, model_id, buffer);\n }\n \n-int\n-rte_ml_io_input_size_get(int16_t dev_id, uint16_t model_id, uint32_t nb_batches,\n-\t\t\t uint64_t *input_qsize, uint64_t *input_dsize)\n-{\n-\tstruct rte_ml_dev *dev;\n-\n-\tif (!rte_ml_dev_is_valid_dev(dev_id)) {\n-\t\tRTE_MLDEV_LOG(ERR, \"Invalid dev_id = %d\\n\", dev_id);\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tdev = rte_ml_dev_pmd_get_dev(dev_id);\n-\tif (*dev->dev_ops->io_input_size_get == NULL)\n-\t\treturn -ENOTSUP;\n-\n-\treturn (*dev->dev_ops->io_input_size_get)(dev, model_id, nb_batches, input_qsize,\n-\t\t\t\t\t\t  input_dsize);\n-}\n-\n-int\n-rte_ml_io_output_size_get(int16_t dev_id, uint16_t model_id, uint32_t nb_batches,\n-\t\t\t  uint64_t *output_qsize, uint64_t *output_dsize)\n-{\n-\tstruct rte_ml_dev *dev;\n-\n-\tif (!rte_ml_dev_is_valid_dev(dev_id)) {\n-\t\tRTE_MLDEV_LOG(ERR, \"Invalid dev_id = %d\\n\", dev_id);\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tdev = rte_ml_dev_pmd_get_dev(dev_id);\n-\tif (*dev->dev_ops->io_output_size_get == NULL)\n-\t\treturn -ENOTSUP;\n-\n-\treturn (*dev->dev_ops->io_output_size_get)(dev, model_id, nb_batches, output_qsize,\n-\t\t\t\t\t\t   output_dsize);\n-}\n-\n int\n rte_ml_io_quantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg **dbuffer,\n \t\t   struct rte_ml_buff_seg **qbuffer)\ndiff --git a/lib/mldev/rte_mldev.h b/lib/mldev/rte_mldev.h\nindex 316c6fd018..63b2670bb0 100644\n--- a/lib/mldev/rte_mldev.h\n+++ b/lib/mldev/rte_mldev.h\n@@ -1008,66 +1008,6 @@ rte_ml_model_params_update(int16_t dev_id, uint16_t model_id, void *buffer);\n \n /* IO operations */\n \n-/**\n- * Get size of quantized and dequantized input buffers.\n- *\n- * Calculate the size of buffers required for quantized and dequantized input data.\n- * This API would return the buffer sizes for the number of batches provided and would\n- * consider the alignment requirements as per the PMD. Input sizes computed by this API can\n- * be used by the application to allocate buffers.\n- *\n- * @param[in] dev_id\n- *   The identifier of the device.\n- * @param[in] model_id\n- *   Identifier for the model created\n- * @param[in] nb_batches\n- *   Number of batches of input to be processed in a single inference job\n- * @param[out] input_qsize\n- *   Quantized input size pointer.\n- * NULL value is allowed, in which case input_qsize is not calculated by the driver.\n- * @param[out] input_dsize\n- *   Dequantized input size pointer.\n- * NULL value is allowed, in which case input_dsize is not calculated by the driver.\n- *\n- * @return\n- *   - Returns 0 on success\n- *   - Returns negative value on failure\n- */\n-__rte_experimental\n-int\n-rte_ml_io_input_size_get(int16_t dev_id, uint16_t model_id, uint32_t nb_batches,\n-\t\t\t uint64_t *input_qsize, uint64_t *input_dsize);\n-\n-/**\n- * Get size of quantized and dequantized output buffers.\n- *\n- * Calculate the size of buffers required for quantized and dequantized output data.\n- * This API would return the buffer sizes for the number of batches provided and would consider\n- * the alignment requirements as per the PMD. Output sizes computed by this API can be used by the\n- * application to allocate buffers.\n- *\n- * @param[in] dev_id\n- *   The identifier of the device.\n- * @param[in] model_id\n- *   Identifier for the model created\n- * @param[in] nb_batches\n- *   Number of batches of input to be processed in a single inference job\n- * @param[out] output_qsize\n- *   Quantized output size pointer.\n- * NULL value is allowed, in which case output_qsize is not calculated by the driver.\n- * @param[out] output_dsize\n- *   Dequantized output size pointer.\n- * NULL value is allowed, in which case output_dsize is not calculated by the driver.\n- *\n- * @return\n- *   - Returns 0 on success\n- *   - Returns negative value on failure\n- */\n-__rte_experimental\n-int\n-rte_ml_io_output_size_get(int16_t dev_id, uint16_t model_id, uint32_t nb_batches,\n-\t\t\t  uint64_t *output_qsize, uint64_t *output_dsize);\n-\n /**\n  * Quantize input data.\n  *\ndiff --git a/lib/mldev/rte_mldev_core.h b/lib/mldev/rte_mldev_core.h\nindex 8530b07316..2279b1dcec 100644\n--- a/lib/mldev/rte_mldev_core.h\n+++ b/lib/mldev/rte_mldev_core.h\n@@ -466,54 +466,6 @@ typedef int (*mldev_model_info_get_t)(struct rte_ml_dev *dev, uint16_t model_id,\n  */\n typedef int (*mldev_model_params_update_t)(struct rte_ml_dev *dev, uint16_t model_id, void *buffer);\n \n-/**\n- * @internal\n- *\n- * Get size of input buffers.\n- *\n- * @param dev\n- *\tML device pointer.\n- * @param model_id\n- *\tModel ID to use.\n- * @param nb_batches\n- *\tNumber of batches.\n- * @param input_qsize\n- *\tSize of quantized input.\n- * @param input_dsize\n- *\tSize of dequantized input.\n- *\n- * @return\n- *\t- 0 on success.\n- *\t- <0, error on failure.\n- */\n-typedef int (*mldev_io_input_size_get_t)(struct rte_ml_dev *dev, uint16_t model_id,\n-\t\t\t\t\t uint32_t nb_batches, uint64_t *input_qsize,\n-\t\t\t\t\t uint64_t *input_dsize);\n-\n-/**\n- * @internal\n- *\n- * Get size of output buffers.\n- *\n- * @param dev\n- *\tML device pointer.\n- * @param model_id\n- *\tModel ID to use.\n- * @param nb_batches\n- *\tNumber of batches.\n- * @param output_qsize\n- *\tSize of quantized output.\n- * @param output_dsize\n- *\tSize of dequantized output.\n- *\n- * @return\n- *\t- 0 on success.\n- *\t- <0, error on failure.\n- */\n-typedef int (*mldev_io_output_size_get_t)(struct rte_ml_dev *dev, uint16_t model_id,\n-\t\t\t\t\t  uint32_t nb_batches, uint64_t *output_qsize,\n-\t\t\t\t\t  uint64_t *output_dsize);\n-\n /**\n  * @internal\n  *\n@@ -627,12 +579,6 @@ struct rte_ml_dev_ops {\n \t/** Update model params. */\n \tmldev_model_params_update_t model_params_update;\n \n-\t/** Get input buffer size. */\n-\tmldev_io_input_size_get_t io_input_size_get;\n-\n-\t/** Get output buffer size. */\n-\tmldev_io_output_size_get_t io_output_size_get;\n-\n \t/** Quantize data */\n \tmldev_io_quantize_t io_quantize;\n \ndiff --git a/lib/mldev/version.map b/lib/mldev/version.map\nindex 40ff27f4b9..99841db6aa 100644\n--- a/lib/mldev/version.map\n+++ b/lib/mldev/version.map\n@@ -23,8 +23,6 @@ EXPERIMENTAL {\n \trte_ml_dev_xstats_reset;\n \trte_ml_enqueue_burst;\n \trte_ml_io_dequantize;\n-\trte_ml_io_input_size_get;\n-\trte_ml_io_output_size_get;\n \trte_ml_io_quantize;\n \trte_ml_model_info_get;\n \trte_ml_model_load;\n",
    "prefixes": [
        "v3",
        "3/4"
    ]
}