Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kunalspathak
Copy link
Contributor

In .NET 9, we will only support SVE if the system vector length of 128-bits. For supporting higher vector length, needs more work that will be done in future release.

References:

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jun 28, 2024
@kunalspathak kunalspathak added the arm-sve Work related to arm64 SVE/SVE2 support label Jun 28, 2024
Copy link
Contributor

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

@kunalspathak
Copy link
Contributor Author

@dotnet/arm64-contrib

@jkotas jkotas requested a review from tannergooding June 28, 2024 19:41
if (((cpuFeatures & ARM64IntrinsicConstants_Sve) != 0) && CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableArm64Sve))
{
uint32_t maxVectorTLength = (maxVectorTBitWidth / 8);
uint64_t sveLengthFromOS = GetSveLengthFromOS();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method to be adjusted to return 0 on Windows with this change as otherwise we could be in an unsupported state since it's currently hardcoded as:

;; uint64_t GetSveLengthFromOS(void);
    LEAF_ENTRY GetSveLengthFromOS
        ;; TODO-SVE: Remove the hardcoded value 128 and uncomment once CI machines are updated to use MASM 14.4 or later
        ;; rdvl    x0, 1
        mov     x0, #128
        ret     lr
    LEAF_END

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hhm, so this is the case where if windows is running on 256-bit machine, we shouldn't be returning 128-bits because that will falsely turn on SVE. Let me uncomment the right way to do it to see if helix machines got the assembler upgraded to understand rdvl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright, so that seemed to be working now.

@jkotas jkotas self-requested a review June 28, 2024 19:57
@kunalspathak kunalspathak merged commit 7f7bb7b into dotnet:main Jun 28, 2024
@kunalspathak kunalspathak deleted the sve-128 branch June 28, 2024 23:10
@github-actions github-actions bot locked and limited conversation to collaborators Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI arm-sve Work related to arm64 SVE/SVE2 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants