CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
103 lines
3.6 KiB
Markdown
103 lines
3.6 KiB
Markdown
# WSL ROCDXG CI Stage
|
|
|
|
This document describes the multi-arch CI stage that builds the WSL-only
|
|
`rocdxg` bridge library from `rocm-systems`.
|
|
|
|
> [!NOTE]
|
|
> This page is about the WSL ROCDXG CI stage. For native Windows source builds,
|
|
> see [Windows Support](windows_support.md).
|
|
|
|
## Execution Model
|
|
|
|
The WSL ROCDXG job starts on a Windows runner but runs TheRock's Linux-side
|
|
build steps inside a WSL Ubuntu shell:
|
|
|
|
```mermaid
|
|
flowchart TD
|
|
runner["Windows runner<br/>checkout + MSVC/SDK discovery"]
|
|
wsl["Enter WSL Ubuntu shell"]
|
|
deps["Linux base + compiler-runtime artifacts"]
|
|
cfg["Inside WSL Ubuntu<br/>configure wsl-rocdxg<br/>amd-hip toolchain"]
|
|
build["Inside WSL Ubuntu<br/>build stage-wsl-rocdxg<br/>publish ROCDXG artifact"]
|
|
|
|
runner --> wsl
|
|
deps --> cfg
|
|
wsl --> cfg --> build
|
|
```
|
|
|
|
The Windows host is used for checkout, MSVC setup, and Windows SDK discovery.
|
|
The WSL shell handles artifact fetch, CMake configure, build, and artifact
|
|
upload. The workflow bridges the Windows SDK shared include path into WSL with
|
|
`WSLENV`.
|
|
|
|
## Build Topology
|
|
|
|
`wsl-rocdxg` is modeled as its own multi-arch stage and artifact group in
|
|
[`BUILD_TOPOLOGY.toml`](../../BUILD_TOPOLOGY.toml). The stage produces a
|
|
target-neutral artifact from the `rocm-systems` source set.
|
|
|
|
The relevant feature controls are:
|
|
|
|
- `THEROCK_ENABLE_WSL`: enables the WSL feature group.
|
|
- `THEROCK_ENABLE_WSL_ROCDXG`: enables the ROCDXG component.
|
|
|
|
The `wsl-rocdxg` artifact group depends on `base`, and the artifact depends on
|
|
`core-hip`. This lets the WSL stage bootstrap from the same inbound Linux
|
|
artifact pattern used by other downstream multi-arch stages and use TheRock's
|
|
`amd-hip` compiler toolchain for the nested ROCDXG build.
|
|
|
|
## Linux Inbound Artifacts
|
|
|
|
Although the job starts on a Windows runner, CMake runs inside WSL Ubuntu. That
|
|
means the configure and build environment is Linux userspace, so the stage
|
|
consumes Linux prebuilt artifacts, including the `base` artifact and compiler
|
|
runtime artifacts used by the `amd-hip` toolchain.
|
|
|
|
The portable Linux multi-arch workflow gives the WSL job a dependency on
|
|
`compiler-runtime` so those inbound artifacts exist before the WSL stage fetches
|
|
them.
|
|
|
|
## Configure Behavior
|
|
|
|
For the WSL stage, [`configure_stage.py`](../../build_tools/configure_stage.py)
|
|
is invoked with `--stage=wsl-rocdxg` and `--platform=linux`. The generated
|
|
CMake arguments include:
|
|
|
|
```text
|
|
-DTHEROCK_ENABLE_ALL=OFF
|
|
-DTHEROCK_ENABLE_WSL_ROCDXG=ON
|
|
```
|
|
|
|
Topology-derived inbound dependency features are also enabled for the stage,
|
|
including the `core-hip` dependency used for the `amd-hip` compiler toolchain.
|
|
|
|
## Workflow Differences
|
|
|
|
Compared with the portable Linux artifact workflow, the WSL workflow:
|
|
|
|
- Runs on the WSL-capable Windows runner.
|
|
- Sets up Ubuntu under WSL.
|
|
- Configures with `--platform=linux`.
|
|
- Builds `stage-${stage_name}` for the WSL stage.
|
|
|
|
Compared with the native Windows artifact workflow, the WSL workflow:
|
|
|
|
- Uses host Windows for checkout, MSVC setup, and Windows SDK discovery.
|
|
- Uses WSL-local Python and CMake tooling for artifact fetch, configure, build,
|
|
and upload.
|
|
- Bridges the Windows SDK shared include path into the WSL shell with `WSLENV`.
|
|
|
|
## ROCDXG Build
|
|
|
|
TheRock does not build `rocdxg` directly. The wrapper project invokes the
|
|
`libhsakmt` CMake path in `rocm-systems` that produces the WSL `rocdxg`
|
|
library, then installs the WSL-built outputs back into the normal TheRock
|
|
artifact flow.
|
|
|
|
## Troubleshooting
|
|
|
|
- If the WSL build cannot find Windows SDK shared headers, check the Windows SDK
|
|
discovery step and the `WSLENV` bridge into WSL.
|
|
- If `rocdxg` outputs are missing, check the `libhsakmt` WSL CMake path in
|
|
`rocm-systems` and the wrapper install step.
|