Fix unsubstituted version/revision placeholders in version.h - #3474
Open
adityaanikam wants to merge 1 commit into
Open
Fix unsubstituted version/revision placeholders in version.h#3474adityaanikam wants to merge 1 commit into
adityaanikam wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3472.
getVersionString()andgetGitRevision()ininclude/cutlass/version.hreturn the literal, unsubstituted CMake placeholder strings"@CUTLASS_VERSION@"/"@CUTLASS_REVISION@"for every consumer, since nothing in the current build ever processesversion.hitself as a template.The actual CMake-substituted revision is already available a few lines above: when built via CMake,
CUTLASS_VERSIONS_GENERATEDis defined andversion_extended.h(generated fromcmake/version_extended.h.in) redefinesCUTLASS_REVISIONwith the real git hash; otherwise it falls back to"".getVersionBuild()already correctly readsCUTLASS_BUILDfrom that same mechanism —getGitRevision()just needs to do the same forCUTLASS_REVISIONinstead of hardcoding the placeholder.There's no equivalent generated macro for the version string (the
.intemplate only substitutesCUTLASS_VERSION_BUILDandCUTLASS_REVISION), sogetVersionString()now builds aMAJOR.MINOR.PATCH[.BUILD]string from the existinggetVersionMajor()/getVersionMinor()/getVersionPatch()/getVersionBuild()accessors instead.Header-only change, no build system changes.