Skip to content

[Tests] Make TargetCreation.DeduplicateKeys host-agnostic on AArch64#19786

Merged
tqchen merged 1 commit into
apache:mainfrom
tlopex:fix-target-deduplicate-keys-aarch64-attrs
Jun 16, 2026
Merged

[Tests] Make TargetCreation.DeduplicateKeys host-agnostic on AArch64#19786
tqchen merged 1 commit into
apache:mainfrom
tlopex:fix-target-deduplicate-keys-aarch64-attrs

Conversation

@tlopex

@tlopex tlopex commented Jun 16, 2026

Copy link
Copy Markdown
Member

This pr fixes #19718. The test asserted target->attrs.size()==2, which is host-specific: LLVM target canonicalization legitimately adds host attrs (feature.has_sve / has_asimd / is_aarch64 / mtriple on AArch64), so the target ends up with 9 attrs there and the assertion fails, while it happens to be 2 on x86. The test only means to verify that duplicate keys are deduplicated, so assert that the "keys" entry did not leak into the generic attrs map instead of pinning the host-specific attr count.

The test asserted target->attrs.size()==2, which is host-specific: LLVM
target canonicalization legitimately adds host attrs (feature.has_sve /
has_asimd / is_aarch64 / mtriple on AArch64), so the target ends up with 9
attrs there and the assertion fails, while it happens to be 2 on x86. The
test only means to verify that duplicate keys are deduplicated, so assert
that the "keys" entry did not leak into the generic attrs map instead of
pinning the host-specific attr count.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates a unit test in tests/cpp/target_test.cc by replacing an assertion on the total size of target attributes with a specific check ensuring that the 'keys' attribute is not present. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@tqchen tqchen merged commit 49bc080 into apache:main Jun 16, 2026
9 checks passed
MasterJH5574 pushed a commit that referenced this pull request Jun 16, 2026
…19786)

This pr fixes #19718. The test asserted target->attrs.size()==2, which
is host-specific: LLVM target canonicalization legitimately adds host
attrs (feature.has_sve / has_asimd / is_aarch64 / mtriple on AArch64),
so the target ends up with 9 attrs there and the assertion fails, while
it happens to be 2 on x86. The test only means to verify that duplicate
keys are deduplicated, so assert that the "keys" entry did not leak into
the generic attrs map instead of pinning the host-specific attr count.
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.

[Bug] TargetCreation.DeduplicateKeys test fails on aarch64

2 participants