Make rmm build and link on Windows - #10
Open
jeffdaily wants to merge 1 commit into
Open
Conversation
Two changes, both Windows-only in effect.
RMM_EXPORT is an ELF visibility attribute under __GNUC__ and empty otherwise,
as detail/export.hpp says ("only GLIBC is supported"). The shared library
therefore exports nothing when built with clang-cl or MSVC, and consumers fail
at link time with undefined references to rmm::cuda_stream_view and friends.
WINDOWS_EXPORT_ALL_SYMBOLS makes CMake generate the export table, which is the
same set of symbols the visibility attribute yields elsewhere. The property is
ignored on other platforms.
detail/runtime_capabilities.hpp includes <dlfcn.h> unconditionally and never
uses anything from it. The header is not reachable from the six sources that
make up the rmm library, so this does not affect that build, but it does break
any Windows consumer that includes mr/device/cuda_async_memory_resource.hpp,
along with the test suite.
Found while building HEonGPU against hipMM on Windows with clang-cl and ROCm
7.14. With the export change and the two matching fixes in rapids-logger, rmm
and rapids_logger build and every dependent executable links.
Written with assistance from an AI coding agent.
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.
Two changes, both Windows-only in effect, found while building HEonGPU against hipMM on Windows with clang-cl and ROCm 7.14.
The shared library exports no symbols on Windows
RMM_EXPORTis an ELF visibility attribute under__GNUC__and empty otherwise, asdetail/export.hppstates outright ("only GLIBC is supported"). Built with clang-cl or MSVC,rmm.dlltherefore exports nothing, and every consumer fails at link time:WINDOWS_EXPORT_ALL_SYMBOLSmakes CMake generate the export table, which is the same set of symbols the visibility attribute yields elsewhere. The property is ignored on other platforms, so nothing changes for Linux builds.A dead POSIX include breaks Windows consumers
detail/runtime_capabilities.hppincludes<dlfcn.h>unconditionally and never uses anything from it.That header is not reachable from the six sources that make up the
rmmlibrary, so it does not affect that build. It does break any Windows consumer that includesmr/device/cuda_async_memory_resource.hpp, along with the test suite.Status
With the export change here, plus the two matching fixes in rapids-logger (AMD-Ecosystem/rocmds-logger#2),
rmm.dllandrapids_logger.dllbuild and every dependent executable links on Windows.This covers what a consumer of the
rmmlibrary needs. I have not built hipMM's own tests or benchmarks on Windows, so I am not claiming full Windows support for the project.