Inference applications built on the HRX runtime
Project description
HRX Demos
Standalone, demo applications built on HRX. The first application is an Ideogram 4 text-to-image implementation with direct AMDGPU execution, Loom kernels, dynamic structured prompts, compact FP8 checkpoints, and LoRA support.
HRX Demos keeps model scheduling, parameter residency, kernel selection, and
diagnostics explicit in a small C runtime. Ideogram 4 accepts a prompt or a
structured request and emits an image through the hrx-id4 command-line tool.
Performance
Performance data coming soon.
Installation
hrx-demos is available on PyPI. Install it with using your favorite python
package manager:
pip install hrx-demos
Available Demos
Ideogram-4 FP8
Download models (see docs/quickstart.md for full details):
# ideogram-4 must have its license accepted:
# https://huggingface.co/ideogram-ai/ideogram-4-fp8
hf download ideogram-ai/ideogram-4-fp8 \
transformer/diffusion_pytorch_model.safetensors \
unconditional_transformer/diffusion_pytorch_model.safetensors \
--revision ee79a7237b519f1402ceacf952f30c8a31ec5073 \
--local-dir models/ideogram-4-fp8
# Qwen with stock, block-scaled FP8 checkpoints
hf download Qwen/Qwen3-VL-8B-Instruct-FP8 \
tokenizer.json \
model.safetensors.index.json \
model-00001-of-00002.safetensors \
model-00002-of-00002.safetensors \
--revision 9cdc6310a8cb770ce18efaf4e9935334512aee45 \
--local-dir models/qwen3-vl-8b-instruct-fp8
# Accept the FLUX.2 non-commercial license and download its
# single-file autoencoder:
# https://huggingface.co/black-forest-labs/FLUX.2-dev
hf download black-forest-labs/FLUX.2-dev \
ae.safetensors \
--revision 26afe3a78bb242c0a8bb181dcc8937bb16e5c66c \
--local-dir models/flux2-dev
Generate an Image from Sample Flags
You may copy the flag and prompt files and customize as desired. The defaults assume you are in a PWD with a models/ sub-directory as downloaded above.
hrx-id4 \
--flagfile=docs/ideogram4-fp8.flags \
--device=amdgpu:// \
--prompt_json_file=docs/requests/long_1024.json \
--output=ideogram4.ppm
Building From Source
Python Wheels
Python wheels are typically built in a manylinux container but can be built for your machine:
python build_tools/setup_python.py --rocm=/path/to/rocm
python -m pip install build
python -m build --wheel
python -m pip install dist/hrx_demos-0.1.0-py3-none-linux_x86_64.whl
This development wheel bundles the HSA runtime and its required ROCm support library closure.
Building for Development
Clone with submodules, select a ROCm installation, and build with Bazel 9.1:
git clone --recurse-submodules https://github.com/ROCm/hrx-demos.git
cd hrx-demos
export IREE_ROCM_PATH=/path/to/rocm
export CC="$IREE_ROCM_PATH/lib/llvm/bin/clang"
export CXX="$IREE_ROCM_PATH/lib/llvm/bin/clang++"
bazel run -c opt //binding/cli:id4
To develop against a local HRX checkout instead of the pinned submodule:
bazel build --override_module=iree=/path/to/hrx-system -c opt //binding/cli:id4
The setup command uses Bazel from BAZEL, PATH. It validates Bazel 9.1 and
writes the ignored .bazelrc.local with the selected ROCm root and compilers. See
DEVELOPMENT.md for the pinned Bazelisk installation command.
Documentation
- Build, model download, and generation quickstart
- Ideogram 4 FP8 performance case study
- Production-shaped model porting guide
- Target and scheduling generalization roadmap
- Architecture and contributor guide
License
Apache 2.0 with LLVM Exceptions. Model weights are external and retain their respective licenses; Ideogram 4 weights are licensed for non-commercial use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hrx_demos-0.2.0-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: hrx_demos-0.2.0-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 8.1 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b3c593b524d1eb38d338e5a9013ad9d8f58528f9b854f14be75cc4a5905db48
|
|
| MD5 |
fb1cbeab7eb0b2678ff57c62ae8ee321
|
|
| BLAKE2b-256 |
9dfa8daca57e857868b88e7bcec7a86f7b9b7480f239126d2bc7a312f9c7c127
|