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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
49 changes: 33 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- name: Cache cargo registry and build
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Build
shell: pwsh
run: cargo build --workspace --all-targets
Expand Down Expand Up @@ -144,11 +155,17 @@ jobs:
run: cargo clippy --workspace --all-targets -- -D warnings

gpu-smoke:
name: GPU Smoke (MI300X)
runs-on: [self-hosted, mi300x]
needs: [build-and-test, fmt, clippy]
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
name: GPU Smoke (gfx1151)
runs-on: [self-hosted, windows-gfx1151-gpu-rocm]
needs: [windows-build-and-test, fmt, clippy]
# Temporarily disabled: the gfx1151 self-hosted runner isn't picking up the job / GPU smoke isn't working yet.
# To re-enable, restore:
# if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
if: false
timeout-minutes: 30
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v6

Expand All @@ -158,37 +175,37 @@ jobs:
run: cargo build --workspace --all-targets

- name: Host detection
run: ./target/debug/rocm doctor
run: .\target\debug\rocm.exe doctor

- name: Engine detection
run: ./target/debug/rocm-engine-pytorch detect
run: .\target\debug\rocm-engine-pytorch.exe detect

- name: Engine capabilities
run: ./target/debug/rocm-engine-pytorch capabilities
run: .\target\debug\rocm-engine-pytorch.exe capabilities

- name: llama.cpp adapter detection
run: ./target/debug/rocm-engine-llama-cpp detect
run: .\target\debug\rocm-engine-llama-cpp.exe detect

- name: llama.cpp adapter capabilities
run: ./target/debug/rocm-engine-llama-cpp capabilities
run: .\target\debug\rocm-engine-llama-cpp.exe capabilities

- name: ATOM adapter detection
run: ./target/debug/rocm-engine-atom detect
run: .\target\debug\rocm-engine-atom.exe detect

- name: ATOM adapter capabilities
run: ./target/debug/rocm-engine-atom capabilities
run: .\target\debug\rocm-engine-atom.exe capabilities

- name: vLLM adapter detection
run: ./target/debug/rocm-engine-vllm detect
run: .\target\debug\rocm-engine-vllm.exe detect

- name: vLLM adapter capabilities
run: ./target/debug/rocm-engine-vllm capabilities
run: .\target\debug\rocm-engine-vllm.exe capabilities

- name: SGLang adapter detection
run: ./target/debug/rocm-engine-sglang detect
run: .\target\debug\rocm-engine-sglang.exe detect

- name: SGLang adapter capabilities
run: ./target/debug/rocm-engine-sglang capabilities
run: .\target\debug\rocm-engine-sglang.exe capabilities

- name: Resolve large-model recipe
run: ./target/debug/rocm-engine-pytorch resolve-model qwen32b
run: .\target\debug\rocm-engine-pytorch.exe resolve-model qwen32b
2 changes: 0 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ jobs:
curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
export PATH="$HOME/.cargo/bin:$PATH"
cargo build --release --workspace
chmod +x scripts/build-vendored-codex.sh
./scripts/build-vendored-codex.sh release
'

- name: Set nightly metadata
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ jobs:
curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
export PATH="$HOME/.cargo/bin:$PATH"
cargo build --release --workspace
chmod +x scripts/build-vendored-codex.sh
./scripts/build-vendored-codex.sh release
'

- name: Package release bundle
Expand Down
73 changes: 73 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Git hooks for rocm-cli, managed with prek (https://github.com/j178/prek),
# a fast, drop-in replacement for pre-commit.
#
# Setup:
# uv tool install prek # or: cargo install --locked prek
# prek install # install the pre-commit hook
# prek install -t pre-push # install the pre-push hook (clippy + tests)
#
# Run against everything on demand:
# prek run --all-files
#
# NOTE: the `repo: builtin` block uses prek's native Rust hooks and is therefore
# NOT compatible with the classic `pre-commit` tool. Everything else is standard.

default_install_hook_types: [pre-commit, pre-push]

# Vendored sources are checked into third_party/ and must not be reformatted or
# linted by our hooks.
exclude: '^third_party/'

repos:
# Fast, zero-setup hygiene hooks implemented natively by prek (no clone, no venv).
- repo: builtin
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf] # repo standardises on LF endings (see .gitattributes)

# Python: lint + format the helper scripts and engine workers.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.16
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format

# Shell scripts (install.sh, scripts/*.sh).
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck

# Rust + PowerShell: mirror the CI checks using the local toolchain.
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --all --check
language: system
types: [rust]
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --workspace --all-targets -- -D warnings
language: system
types: [rust]
pass_filenames: false
stages: [pre-push] # compiles the workspace; too slow for every commit
- id: cargo-test
name: cargo test
entry: cargo test --workspace --all-targets
language: system
types: [rust]
pass_filenames: false
stages: [pre-push]
- id: powershell-syntax
name: powershell syntax check
entry: python scripts/check_powershell_syntax.py
language: system
files: \.ps1$
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,30 @@ Install a serving engine:
rocm engines install pytorch
```

## Contributing

This repo uses [prek](https://github.com/j178/prek) (a fast, drop-in
replacement for `pre-commit`) to run the same checks locally that CI enforces:
`cargo fmt`/`clippy`/`test`, `ruff` (Python), `shellcheck` (shell),
PowerShell syntax, and assorted file hygiene.

Install prek and enable the hooks once after cloning:

```bash
uv tool install prek # or: cargo install --locked prek
prek install # fast checks on commit (fmt, ruff, shellcheck, ...)
prek install -t pre-push # heavier checks on push (clippy, cargo test)
```

Run every hook against the whole tree on demand:

```bash
prek run --all-files
```

The hook configuration lives in `.pre-commit-config.yaml`; `clippy` and the test
suite run on `pre-push` to keep commits fast.

## More Docs

- Testing and verification: `docs/testing.md`
Expand Down
3 changes: 1 addition & 2 deletions apps/rocm/src/comfyui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use rocm_core::{
AppPaths, RocmCliConfig, download_file_to_path, ensure_uv_binary, format_http_base_url,
runtime_is_cosmopolitan_windows, runtime_is_linux, runtime_is_windows,
runtime_path_for_windows_child, runtime_path_list_join, runtime_path_list_split,
runtime_paths_equivalent, uv_command_env, uv_pip_install_base, unix_time_millis,
runtime_paths_equivalent, unix_time_millis, uv_command_env, uv_pip_install_base,
};
use serde::{Deserialize, Serialize};
use std::ffi::OsString;
Expand Down Expand Up @@ -1592,7 +1592,6 @@ fn run_uv_logged_command(
bail!("{context_text}: uv exited with {status}");
}


enum OutputTarget {
Stdout,
Stderr,
Expand Down
Loading