Skip to content

Latest commit

 

History

History
208 lines (164 loc) · 11.4 KB

windows_support.md

File metadata and controls

208 lines (164 loc) · 11.4 KB

Windows Support

TheRock aims to support as many subprojects as possible on "native" Windows (as opposed to WSL 1 or WSL 2) using standard build tools like MSVC.

Warning

This is still under development. Not all subprojects build for Windows yet.

Supported subprojects

ROCm is composed of many subprojects, some of which are supported on Windows:

This table tracks current support status for each subproject in TheRock on Windows. Some subprojects may need extra patches to build within TheRock (on mainline, in open source, using MSVC, etc.).

Component subset Subproject Supported Notes
base aux-overlay
base rocm-cmake
base rocm-core No shared libraries
base rocm_smi_lib Unsupported
base rocprofiler-register Patched to no-op
base rocm-half
compiler amd-llvm No shared libraries, limited runtimes
compiler amd-comgr No shared libraries
compiler hipcc
compiler hipify Patched for Ninja
core ROCR-Runtime Unsupported
core rocminfo Unsupported
core clr Under review (partly closed source)
profiler rocprofiler-sdk
comm-libs rccl
math-libs rocRAND Almost ready. Needs workaround for hip-clr dep
math-libs hipRAND Almost ready. Needs workaround for hip-clr dep
math-libs rocPRIM
math-libs hipCUB
math-libs rocThrust
math-libs rocFFT
math-libs hipFFT
math-libs (blas) hipBLAS-common
math-libs (blas) hipBLASlt
math-libs (blas) rocBLAS
math-libs (blas) rocSPARSE
math-libs (blas) hipSPARSE
math-libs (blas) rocSOLVER
math-libs (blas) hipSOLVER
math-libs (blas) hipBLAS
ml-libs MIOpen

Building from source

These instructions mostly mirror the instructions in the root README.md, with some extra Windows-specific callouts.

Prerequisites

Set up your system

Install tools

You will need:

Tip

Some of these tools are available via package managers like https://github.com/chocolatey/choco

choco install git
choco install cmake
choco install ninja
choco install ccache
choco install sccache
choco install python

Clone and fetch sources

git clone https://github.com/ROCm/TheRock.git
python ./build_tools/fetch_sources.py

Configure

Some components do not build for Windows yet, so disable them:

cmake -B build -GNinja . \
  -DTHEROCK_AMDGPU_FAMILIES=gfx110X-dgpu \
  -DTHEROCK_ENABLE_COMPILER=ON \
  -DTHEROCK_ENABLE_HIPIFY=ON \
  -DTHEROCK_ENABLE_CORE=OFF \
  -DTHEROCK_ENABLE_CORE_RUNTIME=OFF \
  -DTHEROCK_ENABLE_HIP_RUNTIME=OFF \
  -DTHEROCK_ENABLE_PROFILER_SDK=OFF \
  -DTHEROCK_ENABLE_COMM_LIBS=OFF \
  -DTHEROCK_ENABLE_MATH_LIBS=OFF \
  -DTHEROCK_ENABLE_RAND=OFF \
  -DTHEROCK_ENABLE_PRIM=OFF \
  -DTHEROCK_ENABLE_FFT=OFF \
  -DTHEROCK_ENABLE_BLAS=OFF \
  -DTHEROCK_ENABLE_SPARSE=OFF \
  -DTHEROCK_ENABLE_SOLVER=OFF \
  -DTHEROCK_ENABLE_ML_LIBS=OFF

# If iterating and wishing to cache, add these:
#  -DCMAKE_C_COMPILER_LAUNCHER=ccache \
#  -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
#  -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded \

Tip

ccache does not support MSVC's /Zi flag which may be set by default when a project (e.g. LLVM) opts in to policy CMP0141. Setting -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded instructs CMake to compile with /Z7 or equivalent, which is supported by ccache.

Ensure that MSVC is used by looking for lines like these in the logs:

-- The C compiler identification is MSVC 19.42.34436.0
-- The CXX compiler identification is MSVC 19.42.34436.0

Build

cmake --build build

At the moment this should build some projects in base/ as well as compiler/.