Skip to content

allow AVX512 instructions to be used with MSVC

Andre Muezerie dpdk-dev 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 0 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Added subdir('msvc') to config/x86/meson.build (now that other required patches are merged).

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2config: allow AVX512 instructions to be used with MSVCconfig/x86/meson.build config/x86/msvc/meson.build+288 -00 replies
2/2devtools/dump-cpu-flags: add tool to update CPU flags tabledevtools/dump-cpu-flags/README.md devtools/dump-cpu-flags/cpu-names.txt devtools/dump-cpu-flags/dump-cpu-flags.cpp +1 more+305 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] allow AVX512 instructions to be used with MSVC

Up to now MSVC has being used with the default mode, which uses SSE2 instructions for scalar floating-point and vector calculations.
https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170

This patchset allows users to specify the CPU for which the generated code should be optimized for in the same way it's done for GCC: by passing the CPU name. When no name is provided 'native' is assumed meaning that the code should be optimized for the machine compiling the code.

MSVC does not provide this functionality natively, so logic was added. This additional logic relies on a table which stores instruction set availability (like AXV512F) for different CPUs.

To make it easier to update this table a new devtool was also added.

v3:
- Added subdir('msvc') to config/x86/meson.build (now that other required patches are merged).

Andre Muezerie (2):
config: allow AVX512 instructions to be used with MSVC devtools/dump-cpu-flags: add tool to update CPU flags table

 config/x86/meson.build                     |   1 +
 config/x86/msvc/meson.build                | 287 +++++++++++++++++++++
 devtools/dump-cpu-flags/README.md          |  25 ++
 devtools/dump-cpu-flags/cpu-names.txt      | 120 +++++++++
 devtools/dump-cpu-flags/dump-cpu-flags.cpp | 119 +++++++++
 devtools/dump-cpu-flags/dump-cpu-flags.py  |  41 +++
 6 files changed, 593 insertions(+)
 create mode 100644 config/x86/msvc/meson.build
 create mode 100644 devtools/dump-cpu-flags/README.md
 create mode 100644 devtools/dump-cpu-flags/cpu-names.txt
 create mode 100644 devtools/dump-cpu-flags/dump-cpu-flags.cpp
 create mode 100644 devtools/dump-cpu-flags/dump-cpu-flags.py

--
2.48.1.vfs.0.0