Skip to content

kernel-builder: quote the stable ABI version in the preamble - #869

Merged
danieldk merged 1 commit into
mainfrom
stable-abi-preamble-fix
Oct 2, 2026
Merged

danieldk merged 1 commit into
mainfrom
stable-abi-preamble-fix

Conversation

@danieldk

@danieldk danieldk commented Oct 2, 2026

Copy link
Copy Markdown
Member

If one backend does not support the stable ABI, _STABLE_ABI_VERSION does not have a value. This resulted in a condition not parsing, due to direct variable use. Instead, quote the variable, so that the version evals to an empty string in that case (which won't need evaluation, since the first condition already shortcuts).

If one backend does not support the stable ABI, `_STABLE_ABI_VERSION`
does not have a value. This resulted in a condition not parsing, due
to direct variable use. Instead, quote the variable, so that the version
evals to an empty string in that case (which won't need evaluation,
since the first condition already shortcuts).
set(_STABLE_ABI_VERSION "${_STABLE_ABI_VERSION_${BACKEND}}")

if(_STABLE_ABI_VERSION AND TORCH_VERSION VERSION_GREATER_EQUAL ${_STABLE_ABI_VERSION})
if(_STABLE_ABI_VERSION AND TORCH_VERSION VERSION_GREATER_EQUAL "${_STABLE_ABI_VERSION}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When did it show up?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Converting some kernels.

@danieldk
danieldk merged commit fa6795c into main Oct 2, 2026
49 checks passed
@danieldk
danieldk deleted the stable-abi-preamble-fix branch October 2, 2026 12:54
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.

2 participants