Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#5365 AArch64: Fix tests on non 256-bit VL hardware #6652

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

jackgallagher-arm
Copy link
Collaborator

Some of the SVE tests are written assuming a 256-bit vector length so that we get consistent output from the codec regardless of the hardware vector length that the test is run on. This was previously acheived by hard coding DynamoRIO's vector length to 256-bits when built with BUILD_TESTS=1.
This worked fine for the codec tests (api.ir_sve, api.dis-a64-sve) but this breaks tests such as client.drx-scattergather which need the vector length to match the hardware.

This patch tweaks two things so that all tests should now work on all vector lengths:

  1. get_processor_specific_info() now initializes the vector length to the correct hardware value whether or not BUILD_TESTS=1. This enables the client tests to work on all vector lengths.
  2. The AArch64 codec now uses dr_get_sve_vector_length() to get the vector length when built with BUILT_TESTS=1. This allows the api tests to override the vector length used by the codec by calling dr_set_sve_vector_length().

The api tests already call enable_all_test_cpu_features() which itself calls dr_set_sve_vector_length(256) so no changes to the tests themselves were needed.

Issue: #5365

Some of the SVE tests are written assuming a 256-bit vector length so
that we get consistent output from the codec regardless of the hardware
vector length that the test is run on. This was previously acheived by
hard coding DynamoRIO's vector length to 256-bits when built with
BUILD_TESTS=1.
This worked fine for the codec tests (api.ir_sve, api.dis-a64-sve) but
this breaks tests such as client.drx-scattergather which need the
vector length to match the hardware.

This patch tweaks two things so that all tests should now work on all
vector lengths:
 1. get_processor_specific_info() now initializes the vector length
    to the correct hardware value whether or not BUILD_TESTS=1.
    This enables the client tests to work on all vector lengths.
 2. The AArch64 codec now uses dr_get_sve_vector_length() to get the
    vector length when built with BUILT_TESTS=1. This allows the api
    tests to override the vector length used by the codec by calling
    dr_set_sve_vector_length().

The api tests already call enable_all_test_cpu_features() which itself
calls dr_set_sve_vector_length(256) so no changes to the tests
themselves were needed.

Issue: #5365
@jackgallagher-arm jackgallagher-arm merged commit 865797e into master Feb 14, 2024
16 checks passed
@jackgallagher-arm jackgallagher-arm deleted the i5365-fix-tests-on-non-256-bit-hardware branch February 14, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants