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
124 lines
3.5 KiB
CMake
124 lines
3.5 KiB
CMake
# Copyright Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# ROCm Emulation Tools
|
|
|
|
if(THEROCK_ENABLE_ROCJITSU)
|
|
##############################################################################
|
|
# rocjitsu
|
|
#
|
|
# ROCm Just-in-Time Suite: simulation, virtualization, and instrumentation
|
|
# tools for AMD GPU applications. Provides ISA-level execution of AMD GPU
|
|
# and RISC-V machine code from HIP fat binaries without requiring GPU
|
|
# hardware.
|
|
##############################################################################
|
|
|
|
therock_cmake_subproject_declare(rocjitsu
|
|
USE_DIST_AMDGPU_TARGETS
|
|
EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/emulation/rocjitsu"
|
|
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocjitsu"
|
|
CMAKE_ARGS
|
|
-DBUILD_TESTING=${THEROCK_BUILD_TESTING}
|
|
RUNTIME_DEPS
|
|
${THEROCK_BUNDLED_LIBDRM}
|
|
)
|
|
|
|
therock_cmake_subproject_glob_c_sources(rocjitsu
|
|
SUBDIRS
|
|
lib
|
|
tools
|
|
tests
|
|
)
|
|
|
|
therock_cmake_subproject_activate(rocjitsu)
|
|
|
|
therock_cmake_subproject_build_test(rocjitsu
|
|
COMMAND "${CMAKE_CTEST_COMMAND}" --output-on-failure --no-tests=error
|
|
)
|
|
|
|
therock_test_validate_shared_lib(PATH rocjitsu/dist/lib
|
|
LIB_NAMES
|
|
librocjitsu.so
|
|
)
|
|
therock_test_validate_shared_lib(PATH rocjitsu/dist/lib
|
|
LIB_NAMES
|
|
libhsa_hotswap_rocjitsu.so
|
|
)
|
|
|
|
therock_provide_artifact(rocjitsu
|
|
TARGET_NEUTRAL
|
|
DESCRIPTOR artifact-rocjitsu.toml
|
|
COMPONENTS
|
|
dbg
|
|
dev
|
|
lib
|
|
run
|
|
SUBPROJECT_DEPS
|
|
rocjitsu
|
|
)
|
|
endif()
|
|
|
|
if(THEROCK_ENABLE_ROCJITSU_HOTSWAP)
|
|
# Artifact descriptors must own distinct stage directories. Re-stage the
|
|
# already-built hook without rebuilding rocjitsu so it can remain a
|
|
# separately selectable artifact.
|
|
therock_cmake_subproject_declare(rocjitsu-hotswap
|
|
DISABLE_AMDGPU_TARGETS
|
|
NO_MERGE_COMPILE_COMMANDS
|
|
EXTERNAL_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/rocjitsu-hotswap"
|
|
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocjitsu-hotswap"
|
|
CMAKE_ARGS
|
|
-DROCJITSU_HOTSWAP_LIBRARY=${CMAKE_CURRENT_BINARY_DIR}/rocjitsu/dist/lib/libhsa_hotswap_rocjitsu.so
|
|
BUILD_DEPS
|
|
rocjitsu
|
|
)
|
|
|
|
therock_cmake_subproject_activate(rocjitsu-hotswap)
|
|
|
|
therock_provide_artifact(rocjitsu-hotswap
|
|
TARGET_NEUTRAL
|
|
DESCRIPTOR artifact-rocjitsu-hotswap.toml
|
|
COMPONENTS
|
|
lib
|
|
SUBPROJECT_DEPS
|
|
rocjitsu-hotswap
|
|
)
|
|
endif()
|
|
|
|
if(THEROCK_ENABLE_MIRAGE)
|
|
##############################################################################
|
|
# mirage
|
|
#
|
|
# User-facing UX (CLI + embedded web dashboard) for the rocjitsu GPU emulator
|
|
# and other emulator backends. The project is a Rust workspace wrapped by a
|
|
# thin CMake layer that drives cargo; the build produces the unified `mirage`
|
|
# binary. Building the dashboard SPA requires Node.js 20.19+ and npm on PATH.
|
|
##############################################################################
|
|
|
|
therock_cmake_subproject_declare(mirage
|
|
DISABLE_AMDGPU_TARGETS
|
|
NO_MERGE_COMPILE_COMMANDS
|
|
EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/emulation/mirage"
|
|
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/mirage"
|
|
CMAKE_ARGS
|
|
-DMIRAGE_CARGO_PROFILE=release
|
|
)
|
|
|
|
therock_cmake_subproject_activate(mirage)
|
|
|
|
therock_cmake_subproject_build_test(mirage
|
|
COMMAND "${CMAKE_CTEST_COMMAND}" --output-on-failure --no-tests=error
|
|
)
|
|
|
|
therock_provide_artifact(mirage
|
|
TARGET_NEUTRAL
|
|
DESCRIPTOR artifact-mirage.toml
|
|
COMPONENTS
|
|
dbg
|
|
dev
|
|
run
|
|
SUBPROJECT_DEPS
|
|
mirage
|
|
)
|
|
endif()
|