xref: /dpdk/doc/guides/tools/testmldev.rst (revision bb38d854fa70f6edab2adfdfd8cbb02f96099135)
1..  SPDX-License-Identifier: BSD-3-Clause
2    Copyright (c) 2022 Marvell.
3
4dpdk-test-mldev Application
5===========================
6
7The ``dpdk-test-mldev`` tool is a Data Plane Development Kit (DPDK) application
8that allows testing various mldev use cases.
9This application has a generic framework to add new mldev based test cases
10to verify functionality
11and measure the performance of inference execution on DPDK ML devices.
12
13
14Application and Options
15-----------------------
16
17The application has a number of command line options:
18
19.. code-block:: console
20
21   dpdk-test-mldev [EAL Options] -- [application options]
22
23
24EAL Options
25~~~~~~~~~~~
26
27The following are the EAL command-line options that can be used
28with the ``dpdk-test-mldev`` application.
29See the DPDK Getting Started Guides for more information on these options.
30
31``-c <COREMASK>`` or ``-l <CORELIST>``
32  Set the hexadecimal bitmask of the cores to run on.
33  The corelist is a list of cores to use.
34
35``-a <PCI_ID>``
36  Attach a PCI based ML device.
37  Specific to drivers using a PCI based ML device.
38
39``--vdev <driver>``
40  Add a virtual mldev device.
41  Specific to drivers using a ML virtual device.
42
43
44Application Options
45~~~~~~~~~~~~~~~~~~~
46
47The following are the command-line options supported by the test application.
48
49``--test <name>``
50  Name of the test to execute.
51  Supported ML tests include device tests.
52  Test name should be one of the following supported tests.
53
54  **ML Device Tests** ::
55
56    device_ops
57
58``--dev_id <n>``
59  Set the device ID of the ML device to be used for the test.
60  Default value is ``0``.
61
62``--socket_id <n>``
63  Set the socket ID of the application resources.
64  Default value is ``SOCKET_ID_ANY``.
65
66``--debug``
67  Enable the tests to run in debug mode.
68
69``--help``
70  Print help message.
71
72
73ML Device Tests
74---------------
75
76ML device tests are functional tests to validate ML device API.
77Device tests validate the ML device handling configure, close, start and stop APIs.
78
79
80Application Options
81~~~~~~~~~~~~~~~~~~~
82
83Supported command line options for the ``device_ops`` test are following::
84
85   --debug
86   --test
87   --dev_id
88   --socket_id
89
90
91DEVICE_OPS Test
92~~~~~~~~~~~~~~~
93
94Device ops test validates the device configuration and reconfiguration.
95
96
97Example
98^^^^^^^
99
100Command to run ``device_ops`` test:
101
102.. code-block:: console
103
104   sudo <build_dir>/app/dpdk-test-mldev -c 0xf -a <PCI_ID> -- \
105        --test=device_ops
106
107
108Debug mode
109----------
110
111ML tests can be executed in debug mode by enabling the option ``--debug``.
112Execution of tests in debug mode would enable additional prints.
113