Skip to content

Conversation

@snickolls-arm
Copy link
Contributor

  • Replace DataTable with PinnedVector class
  • Add functions for generating random Vectors
  • Add functions for converting between Vector and Array types
  • Generate an expected Vector for comparison and log to terminal
  • Simplify validation functions
  • Remove RetVectorType and Op1VectorType template variables

This patch is aiming to extract out some of the common code written in each of the templates to make them easier to debug and change in future, starting with the simpler Unary SVE template.

* Replace DataTable with PinnedVector class
* Add functions for generating random Vectors
* Add functions for converting between Vector and Array types
* Generate an expected Vector for comparison and log to terminal
* Simplify validation functions
* Remove RetVectorType and Op1VectorType template variables
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 28, 2025
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 28, 2025
@snickolls-arm
Copy link
Contributor Author

@dotnet/arm64-contrib

Copy link
Contributor

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

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

Thanks for taking on this cleanup! I have a few notes on reducing Unsafe.* usage.

Copy link
Contributor

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

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

Thanks for taking on this cleanup! I have a few notes on reducing Unsafe.* usage.

* Remove unnecessary initializations
* Remove unused ArrayToVector function
* Fix exception thrown in SignExtend helper
Copy link
Contributor

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

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

LGTM. I assume you're planning on removing all the now-unused templates -- Op1VectorType and TemplateValidationLogicForCndSel -- in a subsequent PR, right? never mind that, I see they're still used by all the other templates

@snickolls-arm
Copy link
Contributor Author

LGTM. I assume you're planning on removing all the now-unused templates -- Op1VectorType and TemplateValidationLogicForCndSel -- in a subsequent PR, right? never mind that, I see they're still used by all the other templates

I'm primarily intending to deprecate these variables so the rest of the SVE2 tests we're going to add can be simpler. But if I have time to clean up the existing data after editing the templates then I would like to do so as well.

@snickolls-arm
Copy link
Contributor Author

I also noticed a failure in the first build related to Sve.ReciprocalExponent. I've pushed what I think will fix this to this branch but it may not show again since the test data is random. It didn't seem to show the problem in this second build.

@amanasifkhalid amanasifkhalid enabled auto-merge (squash) July 29, 2025 18:36
@amanasifkhalid amanasifkhalid merged commit 97d9422 into dotnet:main Jul 29, 2025
73 of 75 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm64 community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants