dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.93k stars 4.64k forks source link

Implement AVX-512 support #77034

Closed BruceForstall closed 1 year ago

BruceForstall commented 1 year ago

This issue will track work being done to support the AVX-512 ISA extensions in .NET.

A GitHub project also exists to do this tracking: https://github.com/orgs/dotnet/projects/157

GitHub query for all issues and pull requests tagged arch-avx512: https://github.com/dotnet/runtime/labels/arch-avx512

We will alter how we track this work based on experience with both mechanisms.

The following work is all planned for .NET 8. If we determine work will not make .NET 8, it will be noted.

RyuJIT feature work

RyuJIT optimization work

CI/testing work

VM work

Debugging / diagnostics work

Libraries work

API design work

Note: all API implementation work that has been planned for .NET 8 has been completed. There are a few remaining "esoteric" APIs that still need to be completed, and that work has been moved to .NET 9. The linked issues will not be closed until the entire API surface area is complete, due to API design issue tracking rules.

Related work

Future work

The following work items for work that did not get implemented for .NET 8 will be considered for .NET 9.

RyuJIT feature work

RyuJIT optimization work

CI/testing work

VM work

Debugging / diagnostics work

Libraries work

API design work

ghost commented 1 year ago

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.

Issue Details
This issue will track work being done to support the AVX-512 ISA extensions in RyuJIT. A GitHub project also exists to do this tracking: https://github.com/orgs/dotnet/projects/157 We will alter how we track this work based on experience with both mechanisms. ## Planned for .NET 8 - [ ] Implement EVEX encoding. https://github.com/dotnet/runtime/pull/75934 - [ ] Add support for new AVX-512 vector registers - [ ] Add support for new AVX-512 mask register concept - [ ] Implement AVX512VL instructions - [ ] Implement new AVX-512 instructions
Author: BruceForstall
Assignees: -
Labels: `area-CodeGen-coreclr`, `User Story`
Milestone: 8.0.0
hopperpl commented 1 year ago

I'm rather interested to know what the conceptual idea will be to use the mask registers.

Will it be just an intrinsic-approach? Or will there also be some logic built around?

I'm asking this as the mask registers k0-k7 are directly set into EVEX and there is no way to provide a constant. This would either mean we specifically use a register, like k3, and apply this to AVX512 instructions. Or, we request a k-register which is encapsulated in a helper-class which we then provide to AVX512 instructions. How will JIT ensure integrity thru sub-function calls?

jakobbotsch commented 1 year ago

@hopperpl You may be interested in reading https://github.com/dotnet/designs/pull/268.

DeepakRajendrakumaran commented 1 year ago

FYI - https://github.com/dotnet/runtime/issues/80811 is also covered under https://github.com/dotnet/runtime/pull/80960