Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/120593/?format=api
http://patches.dpdk.org/api/patches/120593/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221208192918.25022-9-syalavarthi@marvell.com/", "project": { "id": 1, "url": "http://patches.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": "<20221208192918.25022-9-syalavarthi@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20221208192918.25022-9-syalavarthi@marvell.com", "date": "2022-12-08T19:29:15", "name": "[v3,09/12] app/mldev: enable support for inference batches", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "66b0d2506fc3697f9a1b6973b034e6931f0e73a6", "submitter": { "id": 2480, "url": "http://patches.dpdk.org/api/people/2480/?format=api", "name": "Srikanth Yalavarthi", "email": "syalavarthi@marvell.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20221208192918.25022-9-syalavarthi@marvell.com/mbox/", "series": [ { "id": 26046, "url": "http://patches.dpdk.org/api/series/26046/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26046", "date": "2022-12-08T19:29:07", "name": "[v3,01/12] app/mldev: implement test framework for mldev", "version": 3, "mbox": "http://patches.dpdk.org/series/26046/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/120593/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/120593/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 94106A0032;\n\tThu, 8 Dec 2022 20:30:54 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C338142D56;\n\tThu, 8 Dec 2022 20:29:58 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 31B6342D2F\n for <dev@dpdk.org>; Thu, 8 Dec 2022 20:29:50 +0100 (CET)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 2B8J8Kj5001346 for <dev@dpdk.org>; Thu, 8 Dec 2022 11:29:49 -0800", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3mb22svjux-7\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 08 Dec 2022 11:29:49 -0800", "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Thu, 8 Dec 2022 11:29:46 -0800", "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Thu, 8 Dec 2022 11:29:46 -0800", "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 441483F7057;\n Thu, 8 Dec 2022 11:29:46 -0800 (PST)" ], "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-type; s=pfpt0220; bh=Xi7pl1cHzE0Utv0E3WfPGCb+I0qTnvjBaMMOww/JGCE=;\n b=aXc7QDDzlc2A72+yI8pK1DyvP70cACh3ru5CeXd/bMgtBkGg6on6cDslaRvFtp19QF0d\n 2aA3u2WyeDVz11PaSJVX+30ixiGuuwhpJfLaBSRPQY9QfuVydfYxBGpFPWGS9Ujx67MG\n miHB/BF5/CmakPYNX3+qvBrN+OOiXzu28g/50so27ov2ERzrJp6tM4+mmbttIC8BTLa2\n hCAc3WDQMv2e/HCZcPQNnuwxVn9Rexqze79wtB/uUSmzUEshCxeCGP1HtPHlYr+rILLe\n 7iwLFHEtgjpWYV1c4WdTa9t6Ub9jFXjV4LMN6dx/rjkRCOAzlUieDRiczOXNFYV5oM2l 8A==", "From": "Srikanth Yalavarthi <syalavarthi@marvell.com>", "To": "Srikanth Yalavarthi <syalavarthi@marvell.com>", "CC": "<dev@dpdk.org>, <sshankarnara@marvell.com>, <jerinj@marvell.com>,\n <aprabhu@marvell.com>", "Subject": "[PATCH v3 09/12] app/mldev: enable support for inference batches", "Date": "Thu, 8 Dec 2022 11:29:15 -0800", "Message-ID": "<20221208192918.25022-9-syalavarthi@marvell.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20221208192918.25022-1-syalavarthi@marvell.com>", "References": "<20221129082109.6809-1-syalavarthi@marvell.com>\n <20221208192918.25022-1-syalavarthi@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "vn9ruXZys1NAwRlMy17dy681-HQWW8Ds", "X-Proofpoint-GUID": "vn9ruXZys1NAwRlMy17dy681-HQWW8Ds", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1\n definitions=2022-12-08_11,2022-12-08_01,2022-06-22_01", "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": "Enabled support to execute multiple batches of inferences\nper each enqueue request. Input and reference for the test\nshould be appropriately provided for multi-batch run. Number\nof batches can be specified through \"--batches\" option.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n app/test-mldev/ml_options.c | 15 ++++++++++++---\n app/test-mldev/ml_options.h | 2 ++\n app/test-mldev/test_inference_common.c | 22 +++++++++++++---------\n app/test-mldev/test_model_common.c | 6 ++++++\n app/test-mldev/test_model_common.h | 1 +\n 5 files changed, 34 insertions(+), 12 deletions(-)", "diff": "diff --git a/app/test-mldev/ml_options.c b/app/test-mldev/ml_options.c\nindex d5182a1701..331ec1704c 100644\n--- a/app/test-mldev/ml_options.c\n+++ b/app/test-mldev/ml_options.c\n@@ -33,6 +33,7 @@ ml_options_default(struct ml_options *opt)\n \topt->burst_size = 1;\n \topt->queue_pairs = 1;\n \topt->queue_size = 1;\n+\topt->batches = 0;\n \topt->debug = false;\n }\n \n@@ -176,6 +177,12 @@ ml_parse_queue_size(struct ml_options *opt, const char *arg)\n \treturn parser_read_uint16(&opt->queue_size, arg);\n }\n \n+static int\n+ml_parse_batches(struct ml_options *opt, const char *arg)\n+{\n+\treturn parser_read_uint16(&opt->batches, arg);\n+}\n+\n static void\n ml_dump_test_options(const char *testname)\n {\n@@ -196,7 +203,8 @@ ml_dump_test_options(const char *testname)\n \t\t \"\\t\\t--repetitions : number of inference repetitions\\n\"\n \t\t \"\\t\\t--burst_size : inference burst size\\n\"\n \t\t \"\\t\\t--queue_pairs : number of queue pairs to create\\n\"\n-\t\t \"\\t\\t--queue_size : size fo queue-pair\\n\");\n+\t\t \"\\t\\t--queue_size : size fo queue-pair\\n\"\n+\t\t \"\\t\\t--batches : number of batches of input\\n\");\n \t\tprintf(\"\\n\");\n \t}\n }\n@@ -220,7 +228,8 @@ static struct option lgopts[] = {\n \t{ML_TEST, 1, 0, 0},\t {ML_DEVICE_ID, 1, 0, 0}, {ML_SOCKET_ID, 1, 0, 0},\n \t{ML_MODELS, 1, 0, 0},\t {ML_FILELIST, 1, 0, 0}, {ML_REPETITIONS, 1, 0, 0},\n \t{ML_BURST_SIZE, 1, 0, 0}, {ML_QUEUE_PAIRS, 1, 0, 0}, {ML_QUEUE_SIZE, 1, 0, 0},\n-\t{ML_DEBUG, 0, 0, 0},\t {ML_HELP, 0, 0, 0},\t {NULL, 0, 0, 0}};\n+\t{ML_BATCHES, 1, 0, 0},\t {ML_DEBUG, 0, 0, 0},\t {ML_HELP, 0, 0, 0},\n+\t{NULL, 0, 0, 0}};\n \n static int\n ml_opts_parse_long(int opt_idx, struct ml_options *opt)\n@@ -232,7 +241,7 @@ ml_opts_parse_long(int opt_idx, struct ml_options *opt)\n \t\t{ML_SOCKET_ID, ml_parse_socket_id}, {ML_MODELS, ml_parse_models},\n \t\t{ML_FILELIST, ml_parse_filelist}, {ML_REPETITIONS, ml_parse_repetitions},\n \t\t{ML_BURST_SIZE, ml_parse_burst_size}, {ML_QUEUE_PAIRS, ml_parse_queue_pairs},\n-\t\t{ML_QUEUE_SIZE, ml_parse_queue_size},\n+\t\t{ML_QUEUE_SIZE, ml_parse_queue_size}, {ML_BATCHES, ml_parse_batches},\n \t};\n \n \tfor (i = 0; i < RTE_DIM(parsermap); i++) {\ndiff --git a/app/test-mldev/ml_options.h b/app/test-mldev/ml_options.h\nindex 6bfef1b979..d23e842895 100644\n--- a/app/test-mldev/ml_options.h\n+++ b/app/test-mldev/ml_options.h\n@@ -22,6 +22,7 @@\n #define ML_BURST_SIZE (\"burst_size\")\n #define ML_QUEUE_PAIRS (\"queue_pairs\")\n #define ML_QUEUE_SIZE (\"queue_size\")\n+#define ML_BATCHES (\"batches\")\n #define ML_DEBUG (\"debug\")\n #define ML_HELP\t (\"help\")\n \n@@ -41,6 +42,7 @@ struct ml_options {\n \tuint16_t burst_size;\n \tuint16_t queue_pairs;\n \tuint16_t queue_size;\n+\tuint16_t batches;\n \tbool debug;\n };\n \ndiff --git a/app/test-mldev/test_inference_common.c b/app/test-mldev/test_inference_common.c\nindex d680d68f3d..4e29f6c7eb 100644\n--- a/app/test-mldev/test_inference_common.c\n+++ b/app/test-mldev/test_inference_common.c\n@@ -56,7 +56,7 @@ ml_enqueue_single(void *arg)\n \t\tgoto retry;\n \n \top->model_id = t->model[fid].id;\n-\top->nb_batches = t->model[fid].info.batch_size;\n+\top->nb_batches = t->model[fid].nb_batches;\n \top->mempool = t->op_pool;\n \n \top->input.addr = req->input;\n@@ -168,7 +168,7 @@ ml_enqueue_burst(void *arg)\n \n \tfor (i = 0; i < ops_count; i++) {\n \t\targs->enq_ops[i]->model_id = t->model[fid].id;\n-\t\targs->enq_ops[i]->nb_batches = t->model[fid].info.batch_size;\n+\t\targs->enq_ops[i]->nb_batches = t->model[fid].nb_batches;\n \t\targs->enq_ops[i]->mempool = t->op_pool;\n \n \t\targs->enq_ops[i]->input.addr = args->reqs[i]->input;\n@@ -363,6 +363,11 @@ test_inference_opt_dump(struct ml_options *opt)\n \tml_dump(\"queue_pairs\", \"%u\", opt->queue_pairs);\n \tml_dump(\"queue_size\", \"%u\", opt->queue_size);\n \n+\tif (opt->batches == 0)\n+\t\tml_dump(\"batches\", \"%u (default)\", opt->batches);\n+\telse\n+\t\tml_dump(\"batches\", \"%u\", opt->batches);\n+\n \tml_dump_begin(\"filelist\");\n \tfor (i = 0; i < opt->nb_filelist; i++) {\n \t\tml_dump_list(\"model\", i, opt->filelist[i].model);\n@@ -531,8 +536,8 @@ ml_request_initialize(struct rte_mempool *mp, void *opaque, void *obj, unsigned\n \treq->niters = 0;\n \n \t/* quantize data */\n-\trte_ml_io_quantize(t->cmn.opt->dev_id, t->model[t->fid].id,\n-\t\t\t t->model[t->fid].info.batch_size, t->model[t->fid].input, req->input);\n+\trte_ml_io_quantize(t->cmn.opt->dev_id, t->model[t->fid].id, t->model[t->fid].nb_batches,\n+\t\t\t t->model[t->fid].input, req->input);\n }\n \n int\n@@ -550,7 +555,7 @@ ml_inference_iomem_setup(struct ml_test *test, struct ml_options *opt, int16_t f\n \tint ret;\n \n \t/* get input buffer size */\n-\tret = rte_ml_io_input_size_get(opt->dev_id, t->model[fid].id, t->model[fid].info.batch_size,\n+\tret = rte_ml_io_input_size_get(opt->dev_id, t->model[fid].id, t->model[fid].nb_batches,\n \t\t\t\t &t->model[fid].inp_qsize, &t->model[fid].inp_dsize);\n \tif (ret != 0) {\n \t\tml_err(\"Failed to get input size, model : %s\\n\", opt->filelist[fid].model);\n@@ -558,9 +563,8 @@ ml_inference_iomem_setup(struct ml_test *test, struct ml_options *opt, int16_t f\n \t}\n \n \t/* get output buffer size */\n-\tret = rte_ml_io_output_size_get(opt->dev_id, t->model[fid].id,\n-\t\t\t\t\tt->model[fid].info.batch_size, &t->model[fid].out_qsize,\n-\t\t\t\t\t&t->model[fid].out_dsize);\n+\tret = rte_ml_io_output_size_get(opt->dev_id, t->model[fid].id, t->model[fid].nb_batches,\n+\t\t\t\t\t&t->model[fid].out_qsize, &t->model[fid].out_dsize);\n \tif (ret != 0) {\n \t\tml_err(\"Failed to get input size, model : %s\\n\", opt->filelist[fid].model);\n \t\treturn ret;\n@@ -705,7 +709,7 @@ ml_request_finish(struct rte_mempool *mp, void *opaque, void *obj, unsigned int\n \t\treturn;\n \n \tt->nb_used++;\n-\trte_ml_io_dequantize(t->cmn.opt->dev_id, model->id, t->model[req->fid].info.batch_size,\n+\trte_ml_io_dequantize(t->cmn.opt->dev_id, model->id, t->model[req->fid].nb_batches,\n \t\t\t req->output, model->output);\n }\n \ndiff --git a/app/test-mldev/test_model_common.c b/app/test-mldev/test_model_common.c\nindex 5368be17fe..51260c0789 100644\n--- a/app/test-mldev/test_model_common.c\n+++ b/app/test-mldev/test_model_common.c\n@@ -75,6 +75,12 @@ ml_model_load(struct ml_test *test, struct ml_options *opt, struct ml_model *mod\n \t\treturn ret;\n \t}\n \n+\t/* Update number of batches */\n+\tif (opt->batches == 0)\n+\t\tmodel->nb_batches = model->info.batch_size;\n+\telse\n+\t\tmodel->nb_batches = opt->batches;\n+\n \tmodel->state = MODEL_LOADED;\n \n \treturn 0;\ndiff --git a/app/test-mldev/test_model_common.h b/app/test-mldev/test_model_common.h\nindex c45ae80853..dfbf568f0b 100644\n--- a/app/test-mldev/test_model_common.h\n+++ b/app/test-mldev/test_model_common.h\n@@ -33,6 +33,7 @@ struct ml_model {\n \tuint8_t *output;\n \n \tstruct rte_mempool *io_pool;\n+\tuint32_t nb_batches;\n };\n \n int ml_model_load(struct ml_test *test, struct ml_options *opt, struct ml_model *model,\n", "prefixes": [ "v3", "09/12" ] }{ "id": 120593, "url": "