Repository navigation
Conversation
With CUDA 12.8 and MSVC 19.44 the test failed to compile at the GNU atomic load. Read its mapped 32-bit test words with the MSVC interlocked intrinsic. On an RTX 3080 Ti the ordering checks, including the negative control and two graph replays, then passed in 1.77 seconds.
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.
Problem and result
A plain Windows MSVC + CUDA build fails in
flag_order_test, even with-DSTRATA_BUILD_TESTS=OFF. The test reads a flag with GCC atomics that MSVC does not provide. With the MSVC read in this patch, I built and linked the test target on Windows.Related discussion
The test covers the copy-order bug reported in #5093 and fixed in #5096.
Approach
On MSVC, the test includes
<intrin.h>andrd()reads the writable 32-bit flag with_InterlockedCompareExchange(p, 0, 0), an atomic read with a full barrier. GCC and Clang, including clang-cl, keep the existing helper.CMake registers the target under
if(STRATA_ENABLE_CUDA AND NOT STRATA_HIP_GFX906), outsideSTRATA_BUILD_TESTSand withoutEXCLUDE_FROM_ALL(engine/cmake/strata_gpu_engine.cmake:867-879). Setup and packaging skip it because they build named engine targets. Gating the test onSTRATA_BUILD_TESTSwould also avoid the failure in tests-off builds.Validation
Passed:
3142b66b9,cmake --build <build> --target flag_order_testcompiled and linked the patched test in Release on Windows with MSVC 19.44, CUDA 12.8.61 and-DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=ON -DCMAKE_CUDA_ARCHITECTURES=86-real.<intrin.h>include,ctest -R flag_orderpassed in 1.77 s on an RTX 3080 Ti under Windows.4560d0379). The patched test is byte-identical to the one I built, and its CMake condition is the same.Failed: Stock MSVC + CUDA 12.8 reported
__atomic_load_nand__ATOMIC_SEQ_CSTundefined atengine/tests/core/flag_order_test.cu:31.Not run: Compilation or GPU execution after the rebase, GPU execution with the explicit include, an all-target MSVC build, or a HIP build. HIP compiles this file with Clang.
Limits
Only the test source changes. Engine and release binaries are unaffected.