Skip to content

GH-48960: [Python] Adds DEFAULT option in simd_level of cli.py#48274

Open
chiranmoyf wants to merge 1 commit intoapache:mainfrom
chiranmoyf:archery_fix_for_aarch64
Open

GH-48960: [Python] Adds DEFAULT option in simd_level of cli.py#48274
chiranmoyf wants to merge 1 commit intoapache:mainfrom
chiranmoyf:archery_fix_for_aarch64

Conversation

@chiranmoyf
Copy link

@chiranmoyf chiranmoyf commented Nov 27, 2025

Rationale for this change

For aarch64 machines, except NONE, none of the existing options in simd_level of /dev/archery/archery/cli.py are valid. The error also occurs on x86_64, unless one of SSE4_2, AVX2, or AVX512 is specified.

With the DEFAULT option in simd_level, Neon paths will be activated for aarch64 machines, and SSE4_2 will be activated for x86_64.

What changes are included in this PR?

Adding DEFAULT option in simd_level of /dev/archery/archery/cli.py.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

For aarch64 machines none of the existing options were valid except NONE. With the DEFAULT option in simd_level Neon paths will be activated for aarch64 machines.
@github-actions
Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@github-actions github-actions bot added the awaiting review Awaiting review label Nov 27, 2025
@chiranmoyf chiranmoyf changed the title Adding DEFAULT option in simd_level of cli.py MINOR: [Python] Adds DEFAULT option in simd_level of cli.py Nov 27, 2025
Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

Hi thanks for the PR.
This does not fit our definition of MINOR as we only allow minor PRs with small grammar or documentation changes. Could you open an issue?
Can you expand on how were you using, I am curious on the archery build usage.
DEFAULT is also the default value if you don't pass any simd_level.

@chiranmoyf
Copy link
Author

Hi thanks for the PR. This does not fit our definition of MINOR as we only allow minor PRs with small grammar or documentation changes. Could you open an issue? Can you expand on how were you using, I am curious on the archery build usage. DEFAULT is also the default value if you don't pass any simd_level.

Sure, @raulcd we'll raise an issue.
Yes, DEFAULT is the default value if nothing is passed, but since it is missing in the simd_level list, DEFAULT is treated as an invalid argument.

Here's the exact error message.
Error: Invalid value for '--simd-level': 'DEFAULT' is not one of 'NONE', 'SSE4_2', 'AVX2', 'AVX512'.

@raulcd
Copy link
Member

raulcd commented Nov 28, 2025

Thanks for the answer. My question about the usage is because we do not use the archery build command for Arrow's CI or on the codebase. It is not on documentation either. It seems the last reference to using it was around 6-7 years ago. I was curious on how are you using it as I don't think it's currently actively maintained.

@chiranmoyf
Copy link
Author

We followed this documentation to build and benchmark Arrow using Archery.

@chiranmoyf
Copy link
Author

Hi thanks for the PR. This does not fit our definition of MINOR as we only allow minor PRs with small grammar or documentation changes. Could you open an issue?
@raulcd We have raised a GitHub issue (#48960) for the build error.

@chiranmoyf
Copy link
Author

@raulcd @kou Please let us know if any changes are required.
As per the documentation, we used Archery to benchmark and compare Arrow's performance across different architecture-specific code paths. Our main goal is to add SVE kernels to maximize performance on aarch64 machines. If there is another actively maintained tool that can be used to microbenchmark Arrow, please let us know.

@kou kou changed the title MINOR: [Python] Adds DEFAULT option in simd_level of cli.py GH-48960: [Python] Adds DEFAULT option in simd_level of cli.py Feb 26, 2026
@github-actions
Copy link

⚠️ GitHub issue #48960 has been automatically assigned in GitHub to PR creator.

@kou
Copy link
Member

kou commented Feb 26, 2026

As per the documentation

It seems that the documentation uses archery benchmark run not archery build.

Does archery benchmark run (not archery build) accept the --simd-level option?

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

I think we should deprecate and remove archery build as it's not maintained and is not expected to be up to date. In all documentations on how to build Arrow/PyArrow we never cover doing it via archery build and this seem to be a remnant from ancient times.

I am happy to merge this if this unblocks your current workflow but I still think we should remove the archery build command and you should possibly update your workflow.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes Awaiting changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants