Skip to content

Arm64 SVE: Rename Prefetch APIs names to use Bit #114909

@a74nh

Description

@a74nh
Contributor

The following Prefetch APIs were implemented:

public static unsafe void GatherPrefetch8Bit(Vector<T> mask, Vector<T2> addresses, [ConstantExpected] SvePrefetchType prefetchType);
public static unsafe void GatherPrefetch8Bit(Vector<T> mask, void* address, Vector<T2> offsets, [ConstantExpected] SvePrefetchType prefetchType);
public static unsafe void GatherPrefetch16Bit(Vector<T> mask, Vector<T2> addresses, [ConstantExpected] SvePrefetchType prefetchType);
public static unsafe void GatherPrefetch16Bit(Vector<T> mask, void* address, Vector<T2> indices, [ConstantExpected] SvePrefetchType prefetchType);
public static unsafe void GatherPrefetch32Bit(Vector<T> mask, Vector<T2> addresses, [ConstantExpected] SvePrefetchType prefetchType);
public static unsafe void GatherPrefetch32Bit(Vector<T> mask, void* address, Vector<T2> indices, [ConstantExpected] SvePrefetchType prefetchType);
public static unsafe void GatherPrefetch64Bit(Vector<T> mask, Vector<T2> addresses, [ConstantExpected] SvePrefetchType prefetchType);
public static unsafe void GatherPrefetch64Bit(Vector<T> mask, void* address, Vector<T2> indices, [ConstantExpected] SvePrefetchType prefetchType);

public static unsafe void Prefetch8Bit(Vector<T> mask, void* address, SvePrefetchType op); // PRFB
public static unsafe void Prefetch16Bit(Vector<T> mask, void* address, SvePrefetchType op); // PRFH
public static unsafe void Prefetch32Bit(Vector<T> mask, void* address, SvePrefetchType op); // PRFW
public static unsafe void Prefetch64Bit(Vector<T> mask, void* address, SvePrefetchType op); // PRFD

However, the last four were implemented as:

public static unsafe void PrefetchBytes(Vector<T> mask, void* address, SvePrefetchType op); // PRFB
public static unsafe void PrefetchInt16(Vector<T> mask, void* address, SvePrefetchType op); // PRFH
public static unsafe void PrefetchInt32(Vector<T> mask, void* address, SvePrefetchType op); // PRFW
public static unsafe void PrefetchInt64(Vector<T> mask, void* address, SvePrefetchType op); // PRFD

Original API reviews: #97831 and #94007

Either the Prefetch*() APIs or the GatherPrefetch*() APIs need renaming.

Activity

ghost added
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
on Apr 22, 2025
added
arm-sveWork related to arm64 SVE/SVE2 support
and removed
untriagedNew issue has not been triaged by the area owner
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
on Apr 22, 2025
dotnet-policy-service

dotnet-policy-service commented on Apr 22, 2025

@dotnet-policy-service
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
See info in area-owners.md if you want to be subscribed.

changed the title [-]Arm64 SVE: FEAT_SVE: Prefetch APIs are inconsistent[/-] [+][API Proposal]: Arm64 SVE: FEAT_SVE: Prefetch APIs are inconsistent[/+] on May 6, 2025
tannergooding

tannergooding commented on May 8, 2025

@tannergooding
Member

From what I recall from API review, the #bit names were intentional so we didn't need byte* and sbyte* variants.

The new names aren't really consistent either, as you have Bytes vs Int16 rather than Int16s (which doesn't flow well).

I'd say we should fix this back to match the originally approved APIs, unless someone has a better suggestion for the names to use.

changed the title [-][API Proposal]: Arm64 SVE: FEAT_SVE: Prefetch APIs are inconsistent[/-] [+]Arm64 SVE: Fix Prefetch APIs names[/+] on May 9, 2025
changed the title [-]Arm64 SVE: Fix Prefetch APIs names[/-] [+]Arm64 SVE: Fix Prefetch APIs names to use Bit[/+] on May 9, 2025
a74nh

a74nh commented on May 9, 2025

@a74nh
ContributorAuthor

Switched the title and description so that it's no longer an API suggestion change

changed the title [-]Arm64 SVE: Fix Prefetch APIs names to use Bit[/-] [+]Arm64 SVE: Rename Prefetch APIs names to use Bit[/+] on May 9, 2025
added a commit that references this issue on May 15, 2025
68e4272
added a commit that references this issue on May 29, 2025
40063f8
kunalspathak

kunalspathak commented on May 29, 2025

@kunalspathak
Contributor

We still need to fix other APIs.

kunalspathak

kunalspathak commented on May 29, 2025

@kunalspathak
Contributor

Never mind, I got confused with GatherPrefetch* APIs as well.

locked and limited conversation to collaborators on Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @a74nh@tannergooding@kunalspathak

      Issue actions

        Arm64 SVE: Rename Prefetch APIs names to use Bit · Issue #114909 · dotnet/runtime