Skip to content

Make rmm build and link on Windows - #10

Open
jeffdaily wants to merge 1 commit into
AMD-Ecosystem:release/rocmds-26.03from
jeffdaily:fix-windows-build
Open

Make rmm build and link on Windows#10
jeffdaily wants to merge 1 commit into
AMD-Ecosystem:release/rocmds-26.03from
jeffdaily:fix-windows-build

Conversation

@jeffdaily

Copy link
Copy Markdown

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_EXPORT is an ELF visibility attribute under __GNUC__ and empty otherwise, as detail/export.hpp states outright ("only GLIBC is supported"). Built with clang-cl or MSVC, rmm.dll therefore exports nothing, and every consumer fails at link time:

lld-link: error: undefined symbol: rmm::cuda_stream_view::cuda_stream_view(...)

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, so nothing changes for Linux builds.

A dead POSIX include breaks Windows consumers

detail/runtime_capabilities.hpp includes <dlfcn.h> unconditionally and never uses anything from it.

That header is not reachable from the six sources that make up the rmm library, so it does not affect that build. It does break any Windows consumer that includes mr/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.dll and rapids_logger.dll build and every dependent executable links on Windows.

This covers what a consumer of the rmm library needs. I have not built hipMM's own tests or benchmarks on Windows, so I am not claiming full Windows support for the project.

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.
@jeffdaily
jeffdaily requested a review from a team August 18, 2026 20:06
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.

1 participant