Skip to main content

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hrx_demos-0.2.0-py3-none-manylinux_2_28_x86_64.whl (8.1 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

File details

Details for the file hrx_demos-0.2.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hrx_demos-0.2.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7b3c593b524d1eb38d338e5a9013ad9d8f58528f9b854f14be75cc4a5905db48
MD5 fb1cbeab7eb0b2678ff57c62ae8ee321
BLAKE2b-256 9dfa8daca57e857868b88e7bcec7a86f7b9b7480f239126d2bc7a312f9c7c127

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page