Fix leftover configure placeholders in cutlass/version.h - #3483
Open
VaggelisGian wants to merge 1 commit into
Open
Fix leftover configure placeholders in cutlass/version.h#3483VaggelisGian wants to merge 1 commit into
VaggelisGian wants to merge 1 commit into
Conversation
getVersionString() and getGitRevision() returned the literal strings
"@CUTLASS_VERSION@" and "@CUTLASS_REVISION@". Those were left behind
when the configure_file step for version.h was dropped in 3.4.1; only
cmake/version_extended.h.in is generated, so nothing ever substituted
them and even a full CMake build printed "CUTLASS @CUTLASS_VERSION@"
in the profiler banner.
Build getVersionString() from the CUTLASS_MAJOR/MINOR/PATCH macros and
let getGitRevision() return CUTLASS_REVISION, which is empty by default
and supplied by version_extended.h under CUTLASS_VERSIONS_GENERATED.
The build-number suffix behavior is unchanged.
Add test/unit/core/version.cu asserting both accessors agree with the
numeric accessors and never contain placeholder markers.
Test Plan:
docker g++ -std=c++17 host program including cutlass/version.h:
unfixed header: getVersionString=@CUTLASS_VERSION@
getGitRevision=@CUTLASS_REVISION@, 4 assertion failures
fixed header: getVersionString=4.7.0, getGitRevision="", 0 failures
docker nvcc 12.8.1 + googletest on test/unit/core/version.cu:
[ PASSED ] 3 tests.
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.hreturned the literal strings@CUTLASS_VERSION@and@CUTLASS_REVISION@. Those were left behind when theconfigure_filestep forversion.hwas dropped in 3.4.1 (bbe579a); onlycmake/version_extended.h.inis generated, so nothing ever substituted them, and even a full CMake build printsCUTLASS @CUTLASS_VERSION@in the profiler banner (tools/profiler/src/options.cu).This builds
getVersionString()from the CUTLASS_MAJOR/MINOR/PATCH macros and letsgetGitRevision()return CUTLASS_REVISION, which is empty by default and supplied byversion_extended.hunderCUTLASS_VERSIONS_GENERATED. The build-number suffix behavior is unchanged.Behavior note: the profiler banner changes from
CUTLASS @CUTLASS_VERSION@ ... commit @CUTLASS_REVISION@toCUTLASS 4.7.0, with the commit clause printed only when a real revision exists. Nothing in-tree parses the old string.Adds
test/unit/core/version.cu(3 tests) registered intest/unit/core/CMakeLists.txt.Test Plan:
Both configurations were also compiled with MSVC against a simulated generated
version_extended.h: defaults give"4.7.0"/"", generated gives"4.7.0.5"/"abc123".