TheRock (The HIP Environment and ROCm Kit)

repository·main·Indexed 22 days ago

https://github.com/rocm/therock

A lightweight build platform providing developers and researchers access to the latest ROCm and HIP capabilities, including nightly releases of ROCm, PyTorch, and JAX. It includes a generic test runner for component testing via CTest, the ROCm SDK package for runtime library access and development integration, and the implib tool for delaying the loading of shared libraries.

Tokens
129.3K
Snippets
247
Records
457
Agent score
78%

What's inside TheRock

  1. Overview of s3_management scripts

    main

    The s3_management toolset consists of two primary scripts used to maintain Python package indices on S3:

    1. update_dependencies.py: Mirrors dependency packages from PyPI to the project's S3 buckets.
    2. manage.py: Generates PEP 503-compliant index.html files for each subdirectory in the S3 buckets, including built packages (like rocm or torch) and dependencies.

    Managed S3 Buckets:

    • therock-dev-python: Used for development releases.
    • therock-nightly-python: Used for nightly/production-like releases.
  2. Overview of TheRock (The HIP Environment and ROCm Kit)

    main

    TheRock is a lightweight, open-source build platform for HIP and ROCm. It is designed for ROCm contributors, developers, researchers, and advanced users who need access to the latest ROCm capabilities without the complexity of traditional package-based installations.

    Key features include:

    • Nightly releases of ROCm and PyTorch.
    • A CMake super-project for building HIP and ROCm from source.
    • Support for building PyTorch and JAX with ROCm from source.
    • Operating system support for multiple Linux distributions and native Windows.
    • Tools for developing individual ROCm components.
    • Comprehensive CI/CD pipelines for building, testing, and releasing supported components.

    Note: The project is currently in an early preview state.

  3. Overview of ROCm Debug Tools in TheRock

    main

    TheRock provides the build configuration for several ROCm debug tools. Note that TheRock does not host the source code for these tools directly; instead, it manages them via git submodule pointers to external repositories.

    Supported debug tools include:

    • ROCgdb: A debugger for ROCm.
    • ROCdbgapi: An API for debugging.
    • ROCr debug agent: A debug agent for ROCr.

    To access the actual source code, you must ensure the submodules are initialized according to the project structure.

  4. Overview of ROCm Media Libraries

    main

    The ROCm Media Libraries provide high-performance video and image decoding for AMD GPUs on Linux. They leverage VA-API for hardware acceleration.

    Supported libraries:

    • rocDecode: High-performance video decoding.
    • rocJPEG: High-performance JPEG decoding.
  5. Overview of ROCM BLAS Libraries

    main

    The ROCM BLAS suite implements BLAS (Basic Linear Algebra Subprograms) APIs specifically optimized for AMD GPUs. The suite consists of both low-level implementation libraries and high-level user-facing API libraries.

    If you are developing applications that require linear algebra operations on AMD hardware, you should target the following user-level API libraries:

    • hipBLASLt: A lightweight, high-performance version of hipBLAS.
    • hipBLAS: The standard hipBLAS API.
    • hipSOLVER: For solving linear systems and eigenvalue problems.
    • hipSPARSE: For sparse matrix operations.
    • hipSPARSELt: A lightweight, high-performance version of hipSPARSE.
  6. Overview of the ROCm SDK package

    main

    The ROCm SDK package is designed to provide developers with the necessary components for working with ROCm. It enables three primary capabilities:

    1. Runtime Library Access: Provides the packages required to use ROCm libraries during application execution.
    2. GPU-Specific Library Selection: Allows users to choose specific subsets of libraries tailored to particular GPU architectures.
    3. Development Integration: Facilitates development with ROCm and HIP using the CMake build system.
  7. Navigate the TheRock Directory Layout

    main

    The repository is organized into a hierarchy where sub-projects reside at the leaves. Common sub-project categories include:

    • base/: Core, minimally co-dependent utility sub-projects.
    • compiler/: Compilers like AMD-LLVM and hipcc.
    • core/: Low-level runtimes like ROCR-Runtime and HIP runtimes.
    • comm-libs/: Communication libraries (e.g., rccl).
    • storage-libs/: Storage libraries (e.g., hipFile).
    • math-libs/: Math libraries (e.g., BLAS, hipBLASLt).
    • ml-libs/: Machine learning libraries (e.g., MIOpen).
    • media-libs/: Media decoding (e.g., rocDecode, rocJPEG).
    • profiler/: Profiler sub-projects.
  8. Use ROCm profiler console entry points

    main

    The rocm-profiler Python package provides console script wrappers for various ROCm profiling tools. These scripts act as dispatchers that resolve the packaged ROCm installation root and execute the corresponding platform-specific binaries located in the bin/ directory of the wheel.

    Available console entry points include:

    • rocprof-compute
    • rocprof-sys-avail
    • rocprof-sys-causal
    • rocprof-sys-instrument
    • rocprof-sys-python
    • rocprof-sys-run
    • rocprof-sys-sample
  9. Understand TheRock package versioning and distribution channels

    main

    TheRock uses Semantic Versioning (SemVer) in the format X.Y.Z (Major.Minor.Patch) for most projects. The base version for packages is defined in the version.json file at the repository root, though individual subprojects may maintain their own independent library versions.

    Packages are distributed through several channels depending on the stability requirements:

    • stable releases: Manually promoted prereleases. Use this for production environments.
    • prereleases: Manually triggered workflows in rockrel. For early previews.
    • nightly releases: Scheduled workflows in rockrel. For testing upcoming features.
    • dev releases: Manually triggered test workflows in TheRock and rockrel. Note that this channel can contain any type of release artifact.
    • dev builds: Local builds or per-commit workflows in repositories like TheRock, rocm-libraries, or rocm-systems. These do not have a central index.
  10. Explore the Quartz repository structure

    main

    The ROCm/quartz repository is organized into functional areas:

    • .github/workflows/: Contains the three main entry points: receive-therock-data.yml (ingestion), notify-downstream.yml (pushing status), and receive-downstream-data.yml (ingesting downstream results).
    • config/: Contains subscriber.yml (notification targets) and allow-list/ (mapping repositories to GitHub App IDs for reporting back).
    • scripts/: Python-based business logic for validation, schema checking, and database insertion.
    • release-nightly/ & prerelease/: Directories containing static status.json artifacts for polling.
    • templates/: Example workflow files for downstream projects (pull, push, and reporting models).
    • docs/: Implementation guides for different subscription and reporting models.