1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright(c) 2020 Intel Corporation. 3 4 5Using AVX-512 with DPDK 6======================= 7 8AVX-512 is not used by default in DPDK, but it can be selected at runtime by apps through the use of EAL API, 9and by the user with a commandline argument. DPDK has a setting for max SIMD bitwidth, 10which can be modified and will then limit the vector path taken by the code. 11 12 13Using the API in apps 14--------------------- 15 16Apps can request DPDK uses AVX-512 at runtime, if it provides improved application performance. 17This can be done by modifying the EAL setting for max SIMD bitwidth to 512, as by default it is 256, 18which does not allow for AVX-512. 19 20.. code-block:: c 21 22 rte_vect_set_max_simd_bitwidth(RTE_VECT_SIMD_512); 23 24This API should only be called once at initialization, before EAL init. 25For more information on the possible enum values to use as a parameter, go to :ref:`max_simd_bitwidth`: 26 27 28Using the command-line argument 29--------------------------------------------- 30 31The user can select to use AVX-512 at runtime, using the following argument to set the max bitwidth:: 32 33 ./app/dpdk-testpmd --force-max-simd-bitwidth=512 34 35This will override any further changes to the max SIMD bitwidth in DPDK, 36which is useful for testing purposes. 37