Skip to content

Fix unsubstituted version/revision placeholders in version.h - #3474

Open
adityaanikam wants to merge 1 commit into
NVIDIA:mainfrom
adityaanikam:fix-version-string-placeholders-3472
Open

Fix unsubstituted version/revision placeholders in version.h#3474
adityaanikam wants to merge 1 commit into
NVIDIA:mainfrom
adityaanikam:fix-version-string-placeholders-3472

Conversation

@adityaanikam

Copy link
Copy Markdown

Fixes #3472.

getVersionString() and getGitRevision() in include/cutlass/version.h return the literal, unsubstituted CMake placeholder strings "@CUTLASS_VERSION@" / "@CUTLASS_REVISION@" for every consumer, since nothing in the current build ever processes version.h itself as a template.

The actual CMake-substituted revision is already available a few lines above: when built via CMake, CUTLASS_VERSIONS_GENERATED is defined and version_extended.h (generated from cmake/version_extended.h.in) redefines CUTLASS_REVISION with the real git hash; otherwise it falls back to "". getVersionBuild() already correctly reads CUTLASS_BUILD from that same mechanism — getGitRevision() just needs to do the same for CUTLASS_REVISION instead of hardcoding the placeholder.

There's no equivalent generated macro for the version string (the .in template only substitutes CUTLASS_VERSION_BUILD and CUTLASS_REVISION), so getVersionString() now builds a MAJOR.MINOR.PATCH[.BUILD] string from the existing getVersionMajor()/getVersionMinor()/getVersionPatch()/getVersionBuild() accessors instead.

Header-only change, no build system changes.

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] Installed headers return CMake / configure_file placeholders for version numbers

1 participant