# rocm/rocm-tests architecture

> Architecture diagram of the GitHub repository rocm/rocm-tests, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rocm/rocm-tests
- Repository: https://github.com/rocm/rocm-tests

## Overview

This is a pytest-based ROCm system test automation framework. The main flow is a contributor’s test run: session configuration and marker governance prepare the run, GPU discovery and scheduling allocate resources, an executor runs commands on the selected target, and plugins collect outcomes for reporting. The architecture also includes build support, health and recovery, remote-node management, and platform adapters. Some plugin internals and pytest wiring were not sampled; those capabilities and links are shown only where the README or source index supports them.

Main entry points: [`framework/executors`](https://github.com/rocm/rocm-tests/tree/main/framework/executors) (Executor Backends), [`framework/plugins/reports_plugin.py`](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/reports_plugin.py) (Allure Reporting), [`framework/nodes/node_pool.py`](https://github.com/rocm/rocm-tests/blob/main/framework/nodes/node_pool.py) (Node Pool), [`framework/plugins/remote_node_plugin.py`](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/remote_node_plugin.py) (Remote Node Plugin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_governance["Run Governance"]
  node_session["Session Fixtures<br/>[session_plugin.py]"]
  node_config["Framework Config<br/>[loader.py]"]
  node_taxonomy["Marker Taxonomy<br/>[taxonomy.py]"]
  node_markers_plugin["Marker Plugin<br/>[markers_plugin.py]"]
end

subgraph group_resources["GPU Resources"]
  node_scheduler["Dynamic Scheduler"]
  node_remote_nodes["Remote Node Plugin"]
  node_node_pool["Node Pool<br/>[node_pool.py]"]
  node_gpu_detector["GPU Detector<br/>[detector.py]"]
  node_gpu_allocator["GPU Allocator<br/>[allocator.py]"]
end

subgraph group_execution["Execution"]
  node_executor_interface["Executor Interface"]
  node_executor_backends["Executor Backends"]
  node_background_process["Background Processes"]
  node_builder["Binary Builder<br/>[binary_builder.py]"]
  node_os_adapters["OS Adapters"]
end

subgraph group_assurance["Quality and Results"]
  node_health["Health and Recovery<br/>[health_plugin.py]"]
  node_artifacts["Artifact Collection"]
  node_retry["Retry Harness<br/>[retry_plugin.py]"]
  node_reporting["Allure Reporting<br/>[reports_plugin.py]"]
  node_allure_reporter["Allure Reporter<br/>[allure_reporter.py]"]
  node_clickhouse[("ClickHouse Results<br/>[clickhouse.py]")]
end

subgraph group_integrations["ROCm Integration"]
  node_rocm_libs["ROCm Libraries"]
  node_amd_smi["AMD SMI Metrics<br/>[amd_smi.py]"]
  node_ci_api["GitHub Actions API"]
end

node_contributor(("Test Contributor"))
node_pytest_run(("Pytest Run"))

node_contributor -->|"starts tests"| node_pytest_run
node_pytest_run -.->|"initializes fixtures"| node_session
node_session -->|"loads config"| node_config
node_pytest_run -.->|"collects markers"| node_markers_plugin
node_markers_plugin -->|"reads profiles"| node_taxonomy
node_pytest_run -.->|"schedules tests"| node_scheduler
node_remote_nodes -->|"manages nodes"| node_node_pool
node_node_pool -->|"discovers GPUs"| node_gpu_detector
node_node_pool -->|"allocates slots"| node_gpu_allocator
node_remote_nodes -->|"configures targets"| node_executor_backends
node_executor_interface -->|"supports background runs"| node_background_process
node_executor_backends -->|"implements interface"| node_executor_interface
node_pytest_run -.->|"runs commands"| node_executor_backends
node_builder -->|"runs compiler"| node_executor_backends
node_executor_backends -->|"uses platform adapter"| node_os_adapters
node_health -.->|"checks target health"| node_executor_backends
node_retry -.->|"captures failures"| node_artifacts
node_reporting -->|"maps marker labels"| node_taxonomy
node_reporting -.->|"produces reports"| node_allure_reporter
node_pytest_run -.->|"reports outcomes"| node_reporting
node_executor_backends -.->|"executes ROCm commands"| node_rocm_libs
node_gpu_detector -->|"enriches GPU data"| node_amd_smi
node_pytest_run -.->|"integrates CI triggers"| node_ci_api
node_reporting -.-> node_clickhouse

click node_session "https://github.com/rocm/rocm-tests/blob/main/framework/plugins/session_plugin.py"
click node_config "https://github.com/rocm/rocm-tests/blob/main/framework/config/loader.py"
click node_taxonomy "https://github.com/rocm/rocm-tests/blob/main/framework/markers/taxonomy.py"
click node_markers_plugin "https://github.com/rocm/rocm-tests/blob/main/framework/plugins/markers_plugin.py"
click node_scheduler "https://github.com/rocm/rocm-tests/blob/main/framework/scheduling/dynamic_scheduler.py"
click node_remote_nodes "https://github.com/rocm/rocm-tests/blob/main/framework/plugins/remote_node_plugin.py"
click node_node_pool "https://github.com/rocm/rocm-tests/blob/main/framework/nodes/node_pool.py"
click node_gpu_detector "https://github.com/rocm/rocm-tests/blob/main/framework/gpu/detector.py"
click node_gpu_allocator "https://github.com/rocm/rocm-tests/blob/main/framework/gpu/allocator.py"
click node_executor_interface "https://github.com/rocm/rocm-tests/blob/main/framework/executors/abstract_executor.py"
click node_executor_backends "https://github.com/rocm/rocm-tests/tree/main/framework/executors"
click node_background_process "https://github.com/rocm/rocm-tests/blob/main/framework/executors/background_process.py"
click node_builder "https://github.com/rocm/rocm-tests/blob/main/framework/builder/binary_builder.py"
click node_os_adapters "https://github.com/rocm/rocm-tests/tree/main/framework/os_adapter"
click node_health "https://github.com/rocm/rocm-tests/blob/main/framework/plugins/health_plugin.py"
click node_artifacts "https://github.com/rocm/rocm-tests/blob/main/framework/plugins/artifacts_plugin.py"
click node_retry "https://github.com/rocm/rocm-tests/blob/main/framework/plugins/retry_plugin.py"
click node_reporting "https://github.com/rocm/rocm-tests/blob/main/framework/plugins/reports_plugin.py"
click node_allure_reporter "https://github.com/rocm/rocm-tests/blob/main/framework/reporting/allure_reporter.py"
click node_clickhouse "https://github.com/rocm/rocm-tests/blob/main/framework/results/backends/clickhouse.py"
click node_rocm_libs "https://github.com/rocm/rocm-tests/tree/main/framework/rocm/libs"
click node_amd_smi "https://github.com/rocm/rocm-tests/blob/main/framework/rocm/libs/amd_smi.py"
click node_ci_api "https://github.com/rocm/rocm-tests/blob/main/build_tools/github_actions/github_actions_api.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_session,node_config,node_taxonomy,node_markers_plugin toneBlue
class node_scheduler,node_remote_nodes,node_node_pool,node_gpu_detector,node_gpu_allocator toneAmber
class node_executor_interface,node_executor_backends,node_background_process,node_builder,node_os_adapters toneMint
class node_health,node_artifacts,node_retry,node_reporting,node_allure_reporter,node_clickhouse toneRose
class node_rocm_libs,node_amd_smi,node_ci_api,node_contributor,node_pytest_run toneIndigo
```

## Components

### Run Governance

- [Session Fixtures](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/session_plugin.py): `framework/plugins/session_plugin.py`
- [Framework Config](https://github.com/rocm/rocm-tests/blob/main/framework/config/loader.py): `framework/config/loader.py`
- [Marker Taxonomy](https://github.com/rocm/rocm-tests/blob/main/framework/markers/taxonomy.py): `framework/markers/taxonomy.py`
- [Marker Plugin](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/markers_plugin.py): `framework/plugins/markers_plugin.py`

### GPU Resources

- [Dynamic Scheduler](https://github.com/rocm/rocm-tests/blob/main/framework/scheduling/dynamic_scheduler.py): `framework/scheduling/dynamic_scheduler.py`
- [Remote Node Plugin](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/remote_node_plugin.py): `framework/plugins/remote_node_plugin.py`
- [Node Pool](https://github.com/rocm/rocm-tests/blob/main/framework/nodes/node_pool.py): `framework/nodes/node_pool.py`
- [GPU Detector](https://github.com/rocm/rocm-tests/blob/main/framework/gpu/detector.py): `framework/gpu/detector.py`
- [GPU Allocator](https://github.com/rocm/rocm-tests/blob/main/framework/gpu/allocator.py): `framework/gpu/allocator.py`

### Execution

- [Executor Interface](https://github.com/rocm/rocm-tests/blob/main/framework/executors/abstract_executor.py): `framework/executors/abstract_executor.py`
- [Executor Backends](https://github.com/rocm/rocm-tests/tree/main/framework/executors): `framework/executors`
- [Background Processes](https://github.com/rocm/rocm-tests/blob/main/framework/executors/background_process.py): `framework/executors/background_process.py`
- [Binary Builder](https://github.com/rocm/rocm-tests/blob/main/framework/builder/binary_builder.py): `framework/builder/binary_builder.py`
- [OS Adapters](https://github.com/rocm/rocm-tests/tree/main/framework/os_adapter): `framework/os_adapter`

### Quality and Results

- [Health and Recovery](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/health_plugin.py): `framework/plugins/health_plugin.py`
- [Artifact Collection](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/artifacts_plugin.py): `framework/plugins/artifacts_plugin.py`
- [Retry Harness](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/retry_plugin.py): `framework/plugins/retry_plugin.py`
- [Allure Reporting](https://github.com/rocm/rocm-tests/blob/main/framework/plugins/reports_plugin.py): `framework/plugins/reports_plugin.py`
- [Allure Reporter](https://github.com/rocm/rocm-tests/blob/main/framework/reporting/allure_reporter.py): `framework/reporting/allure_reporter.py`
- [ClickHouse Results](https://github.com/rocm/rocm-tests/blob/main/framework/results/backends/clickhouse.py): `framework/results/backends/clickhouse.py`

### ROCm Integration

- [ROCm Libraries](https://github.com/rocm/rocm-tests/tree/main/framework/rocm/libs): `framework/rocm/libs`
- [AMD SMI Metrics](https://github.com/rocm/rocm-tests/blob/main/framework/rocm/libs/amd_smi.py): `framework/rocm/libs/amd_smi.py`
- [GitHub Actions API](https://github.com/rocm/rocm-tests/blob/main/build_tools/github_actions/github_actions_api.py): `build_tools/github_actions/github_actions_api.py`

### Other components

- **Test Contributor**
- **Pytest Run**

## Connections

- Test Contributor → Pytest Run: starts tests
- Pytest Run → Session Fixtures: initializes fixtures
- Session Fixtures → Framework Config: loads config (evidence: `framework/plugins/session_plugin.py`)
- Pytest Run → Marker Plugin: collects markers
- Marker Plugin → Marker Taxonomy: reads profiles (evidence: `framework/markers/taxonomy.py`)
- Pytest Run → Dynamic Scheduler: schedules tests
- Remote Node Plugin → Node Pool: manages nodes (evidence: `framework/plugins/remote_node_plugin.py`)
- Node Pool → GPU Detector: discovers GPUs (evidence: `framework/nodes/node_pool.py`)
- Node Pool → GPU Allocator: allocates slots (evidence: `framework/nodes/node_pool.py`)
- Remote Node Plugin → Executor Backends: configures targets (evidence: `framework/plugins/remote_node_plugin.py`)
- Executor Interface → Background Processes: supports background runs (evidence: `framework/executors/abstract_executor.py`)
- Executor Backends → Executor Interface: implements interface (evidence: `framework/executors/abstract_executor.py`)
- Pytest Run → Executor Backends: runs commands
- Binary Builder → Executor Backends: runs compiler (evidence: `framework/builder/binary_builder.py`)
- Executor Backends → OS Adapters: uses platform adapter (evidence: `framework/executors/container_executor.py`)
- Health and Recovery → Executor Backends: checks target health
- Retry Harness → Artifact Collection: captures failures
- Allure Reporting → Marker Taxonomy: maps marker labels (evidence: `framework/markers/taxonomy.py`)
- Allure Reporting → Allure Reporter: produces reports
- Pytest Run → Allure Reporting: reports outcomes
- Executor Backends → ROCm Libraries: executes ROCm commands (evidence: `framework/rocm/libs/amd_smi.py`)
- GPU Detector → AMD SMI Metrics: enriches GPU data (evidence: `framework/gpu/detector.py`)
- Pytest Run → GitHub Actions API: integrates CI triggers
- Allure Reporting → ClickHouse Results
