Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion BUILD_TOPOLOGY.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ artifact_groups = [
"hip-runtime",
"opencl-runtime",
"profiler-core",
"rocrtst"
"rocrtst",
"rocjitsu"
]

[build_stages.math-libs]
Expand Down Expand Up @@ -327,6 +328,13 @@ type = "generic"
artifact_group_deps = ["third-party-sysdeps", "base", "core-runtime", "hip-runtime"]
source_sets = ["amd-mesa", "rocm-systems"]

[artifact_groups.rocjitsu]
description = "ROCm emulation, virtualization, and instrumentation tools"
type = "generic"
artifact_group_deps = []
source_sets = ["rocm-systems"]
disable_platforms = ["windows"]

# ==============================================================================
# ARTIFACTS - The actual build outputs that can be transmitted between stages
# ==============================================================================
Expand Down Expand Up @@ -777,3 +785,12 @@ type = "target-neutral"
artifact_deps = ["amd-llvm", "amd-dbgapi", "sysdeps-gmp", "sysdeps-mpfr", "sysdeps-expat", "sysdeps-ncurses"]
feature_group = "DEBUG_TOOLS" # Part of DEBUG_TOOLS, enabled by default via THEROCK_ENABLE_ALL
disable_platforms = ["windows"]

# --- ROCm Emulation Tools ---

[artifacts.rocjitsu]
artifact_group = "rocjitsu"
type = "target-neutral"
artifact_deps = []
feature_group = "EMULATION"
disable_platforms = ["windows"]
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ add_subdirectory(debug-tools)
# Note that rocprofiler-register is in base and is what higher level clients
# depend on. The profiler itself is independent.
add_subdirectory(profiler)
# Emulation and instrumentation tools.
add_subdirectory(emulation)
# Data center tools (RDC, etc.)
add_subdirectory(dctools)
add_subdirectory(comm-libs)
Expand Down
12 changes: 12 additions & 0 deletions build_tools/install_rocm_from_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
[--rccl | --no-rccl]
[--rocdecode | --no-rocdecode]
[--rocjpeg | --no-rocjpeg]
[--rocjitsu | --no-rocjitsu]
[--rocprofiler-compute | --no-rocprofiler-compute]
[--rocprofiler-sdk | --no-rocprofiler-sdk ]
[--rocprofiler-systems | --no-rocprofiler-systems]
Expand Down Expand Up @@ -360,6 +361,7 @@ def retrieve_artifacts_by_run_id(args):
args.rccl,
args.rocdecode,
args.rocjpeg,
args.rocjitsu,
args.rocprofiler_compute,
args.rocprofiler_sdk,
args.rocprofiler_systems,
Expand Down Expand Up @@ -425,6 +427,9 @@ def retrieve_artifacts_by_run_id(args):
argv.append("rocjpeg_test")
argv.append("base_dev")
argv.append("amd-llvm_dev")
if args.rocjitsu:
extra_artifacts.append("rocjitsu")
argv.append("rocjitsu_run")
if args.hipblasltprovider:
extra_artifacts.append("hipblasltprovider")
if args.prim:
Expand Down Expand Up @@ -747,6 +752,13 @@ def main(argv):
action=argparse.BooleanOptionalAction,
)

artifacts_group.add_argument(
"--rocjitsu",
default=False,
help="Include 'rocjitsu' artifacts",
action=argparse.BooleanOptionalAction,
)

artifacts_group.add_argument(
"--hipblasltprovider",
default=False,
Expand Down
1 change: 1 addition & 0 deletions docs/development/installing_artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Choose one of these options to specify where to install from:
| `--rccl` | Flag | Include RCCL artifacts |
| `--rocdecode` | Flag | Include rocDecode artifacts (Linux only) |
| `--rocjpeg` | Flag | Include rocJPEG artifacts (Linux only) |
| `--rocjitsu` | Flag | Include rocjitsu artifacts (Linux only) |
| `--rocwmma` | Flag | Include rocWMMA artifacts |
| `--tests` | Flag | Include test artifacts for enabled components |

Expand Down
63 changes: 63 additions & 0 deletions emulation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright Advanced Micro Devices, Inc.
Comment thread
amd-arosa marked this conversation as resolved.
Resolved
# 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.
##############################################################################

if(EXISTS "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/emulation/rocjitsu/CMakeLists.txt")
set(_rocjitsu_source_dir "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/emulation/rocjitsu")
elseif(EXISTS "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/experimental/rocjitsu/CMakeLists.txt")
set(_rocjitsu_source_dir "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/experimental/rocjitsu")
else()
message(FATAL_ERROR "rocjitsu source directory not found under rocm-systems/emulation or rocm-systems/experimental")
endif()

therock_cmake_subproject_declare(rocjitsu
USE_DIST_AMDGPU_TARGETS
EXTERNAL_SOURCE_DIR "${_rocjitsu_source_dir}"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocjitsu"
BACKGROUND_BUILD
CMAKE_ARGS
-DRJ_BUILD_GUI=OFF
-DBUILD_TESTING=${THEROCK_BUILD_TESTING}
)

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_provide_artifact(rocjitsu
TARGET_NEUTRAL
DESCRIPTOR artifact-rocjitsu.toml
COMPONENTS
dbg
dev
lib
run
SUBPROJECT_DEPS
rocjitsu
)
endif()
8 changes: 8 additions & 0 deletions emulation/artifact-rocjitsu.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# rocjitsu
[components.lib."emulation/rocjitsu/stage"]
[components.dbg."emulation/rocjitsu/stage"]
[components.dev."emulation/rocjitsu/stage"]
[components.run."emulation/rocjitsu/stage"]
include = [
"share/rocjitsu/**",
]
Loading