Skip to content

Official Inference Code of EAGLE-4

docs(pkg): qualify AMD MI355X installation

Seyfal Sultanovf00c3bd8407d
diff --git a/docker/rocm/constraints.txt b/docker/rocm/constraints.txt
new file mode 100644
index 0000000..6236153
--- /dev/null
+++ b/docker/rocm/constraints.txt
@@ -0,0 +1,139 @@
+aiohappyeyeballs==2.7.1
+aiohttp==3.14.3
+aiosignal==1.4.0
+airportsdata==20260315
+amd-aiter==0.1.21.dev48+g4ad998328.d20260918
+annotated-doc==0.0.5
+annotated-types==0.8.0
+anyio==4.15.1
+apache-tvm-ffi==0.1.9
+asttokens==3.0.2
+async-timeout==5.0.1
+attrs==26.1.0
+blobfile==3.0.0
+certifi==2026.7.22
+cffi==2.1.1
+charset-normalizer==3.5.1
+click==8.5.0
+cloudpickle==3.1.2
+compressed-tensors==0.15.0.1
+decorator==5.3.1
+dill==0.4.1
+diskcache==5.6.3
+distro==1.9.0
+eagle-harness==0.1.0
+easydict==1.13
+einops==0.8.2
+exceptiongroup==1.3.1
+executing==2.2.1
+fastapi==0.141.1
+filelock==3.32.7
+flydsl==0.3.2
+frozenlist==1.8.0
+fsspec==2026.1.0
+gguf==0.19.0
+grpcio==1.84.0
+grpcio-health-checking==1.84.0
+grpcio-reflection==1.84.0
+h11==0.16.0
+hf-xet==1.6.0
+httpcore==1.0.9
+httpx==0.28.1
+huggingface-hub==1.32.0
+idna==3.20
+interegular==0.3.3
+ipython==8.39.0
+jedi==0.20.0
+jinja2==3.1.6
+jiter==0.17.0
+jsonschema==4.26.0
+jsonschema-specifications==2025.9.1
+lark==1.3.1
+llguidance==1.8.0
+loguru==0.7.3
+lxml==6.1.3
+markdown-it-py==4.2.0
+markupsafe==3.0.3
+matplotlib-inline==0.2.2
+mdurl==0.1.2
+mistral-common==1.11.7
+mpmath==1.3.0
+msgpack==1.2.2
+msgspec==0.21.1
+multidict==6.8.0
+nest-asyncio==1.6.0
+networkx==3.4.2
+ninja==1.13.2
+numpy==2.2.6
+openai==2.6.1
+orjson==3.12.0
+outlines==0.1.11
+outlines-core==0.1.26
+packaging==26.3
+pandas==2.3.3
+parso==0.8.7
+partial-json-parser==0.2.1.1.post7
+pexpect==4.9.0
+pillow==11.3.0
+pip==25.3
+prometheus-client==0.26.0
+prompt-toolkit==3.0.53
+propcache==0.5.4
+protobuf==7.36.2
+psutil==7.2.2
+ptyprocess==0.7.0
+pure-eval==0.2.4
+pybase64==1.5.0
+pybind11==3.1.0
+pycountry==26.2.16
+pycparser==3.0
+pycryptodomex==3.23.0
+pydantic==2.13.5
+pydantic-core==2.46.5
+pydantic-extra-types==2.11.1
+pygments==2.19.2
+python-dateutil==2.9.0.post0
+python-multipart==0.0.32
+pytz==2026.5
+pyyaml==6.0.1
+pyzmq==27.2.0
+referencing==0.37.0
+regex==2026.9.10
+requests==2.34.2
+rich==15.0.0
+rpds-py==0.30.0
+safetensors==0.8.0
+scipy==1.15.3
+sentencepiece==0.2.2
+setproctitle==1.3.7
+setuptools==59.6.0
+sglang==0.5.23.dev252+eagle.4.rocm
+sglang-kernel==0.4.7
+shellingham==1.5.4
+six==1.17.0
+smg-grpc-proto==0.4.18
+smg-grpc-servicer==0.9.1
+sniffio==1.3.1
+soundfile==0.13.1
+stack-data==0.6.3
+starlette==1.6.0
+sympy==1.14.0
+tiktoken==0.14.0
+tokenizers==0.22.2
+tomli==2.4.0
+torch==2.9.1+rocm7.2.0.lw.git7e1940d4
+torchvision==0.24.0+rocm7.2.0.gitb919bd0c
+tqdm==4.67.1
+traitlets==5.16.1
+transformers==5.12.1
+triton==3.7.0+amd.rocm7.2.0.git89002410
+typer==0.27.2
+typing-extensions==4.16.0
+typing-inspection==0.4.4
+tzdata==2026.5
+urllib3==2.8.0
+uvicorn==0.53.0
+uvloop==0.22.1
+wcwidth==0.8.4
+xgrammar==0.2.1
+yarl==1.25.1
diff --git a/docker/rocm/requirements.lock b/docker/rocm/requirements.lock
new file mode 100644
index 0000000..2c5f6af
--- /dev/null
+++ b/docker/rocm/requirements.lock
@@ -0,0 +1,139 @@
+aiohappyeyeballs==2.7.1 --hash=sha256:9243213661e29250eb41368e5daa826fc017156c3b8a11440826b2e3ed376472
+aiohttp==3.14.3 --hash=sha256:48d67b87db6279c044760787eb01f6413032c2e6f3ba1cafaa492b1c8e578479
+aiosignal==1.4.0 --hash=sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e
+airportsdata==20260315 --hash=sha256:22e03801468663fbee9a73e8864f25e3707acc1e43d0fc47586cc8c66365700a
+amd-aiter==0.1.21.dev48+g4ad998328.d20260918 --hash=sha256:17b2d8035287b0fb3bdd5bea33ae4ab0f8347063765fe125684975ac099f95e8
+annotated-doc==0.0.5 --hash=sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101
+annotated-types==0.8.0 --hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0
+anyio==4.15.1 --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101
+apache-tvm-ffi==0.1.9 --hash=sha256:eefcd17f61bf503ff0f4ad429e03ef6c241c7d13682f58281d883218b854c9bd
+asttokens==3.0.2 --hash=sha256:9da13157f5b28becde0bd374fc677dcd3c290614264eff096f167c469cd9f933
+async-timeout==5.0.1 --hash=sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c
+attrs==26.1.0 --hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309
+blobfile==3.0.0 --hash=sha256:48ecc3307e622804bd8fe13bf6f40e6463c4439eba7a1f9ad49fd78aa63cc658
+certifi==2026.7.22 --hash=sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775
+cffi==2.1.1 --hash=sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6
+charset-normalizer==3.5.1 --hash=sha256:96eefc178f8636b9c760c5829345307fd81cfae9ab1e80997dbddeb0f54ee9a3
+click==8.5.0 --hash=sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360
+cloudpickle==3.1.2 --hash=sha256:9acb47f6afd73f60dc1df93bb801b472f05ff42fa6c84167d25cb206be1fbf4a
+compressed-tensors==0.15.0.1 --hash=sha256:e1b1f322e82e475715e242bad46925a304ea8e5c98b5055a15b8eb22fb6bfea9
+decorator==5.3.1 --hash=sha256:f47fe6fdbd2edd623ecfe36875d37aba411624e2670dd395dddae1358689bb3c
+dill==0.4.1 --hash=sha256:1e1ce33e978ae97fcfcff5638477032b801c46c7c65cf717f95fbc2248f79a9d
+diskcache==5.6.3 --hash=sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19
+distro==1.9.0 --hash=sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2
+eagle-harness==0.1.0 --hash=sha256:2b72452e17fecc87880524944150c5ad14244ceee2dbcd451e65fc96ddbd2a4b
+easydict==1.13 --hash=sha256:6b787daf4dcaf6377b4ad9403a5cee5a86adbc0ca9a5bcf5410e9902002aeac2
+einops==0.8.2 --hash=sha256:54058201ac7087911181bfec4af6091bb59380360f069276601256a76af08193
+exceptiongroup==1.3.1 --hash=sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598
+executing==2.2.1 --hash=sha256:760643d3452b4d777d295bb167ccc74c64a81df23fb5e08eff250c425a4b2017
+fastapi==0.141.1 --hash=sha256:bfb91aa2d334c61cb35ba9a116fc123b3d3df31640b801cf57a7a78ec3f603b3
+filelock==3.32.7 --hash=sha256:65ff0d0190ea42038b32bda4b77834fb05be2cad4c5b9b01aa4dfb3614536e52
+flydsl==0.3.2 --hash=sha256:e1ea923b79d58fc2c979f5f2faa94cd5cdd0d26203bc7385352acb19c2b6a5d5
+frozenlist==1.8.0 --hash=sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2
+fsspec==2026.1.0 --hash=sha256:cb76aa913c2285a3b49bdd5fc55b1d7c708d7208126b60f2eb8194fe1b4cbdcc
+gguf==0.19.0 --hash=sha256:70bcd10edfe697fb2dad6e40af2234b9d8ece9a41a99761405121ebda1c3c1cd
+grpcio==1.84.0 --hash=sha256:393d8a78bff6731ecc5ad2151a821f8fbc1709b137ebb9c25a4ef399fbdcc914
+grpcio-health-checking==1.84.0 --hash=sha256:3eab9b688e5e09bd1d584c296d3440358f11817388db87b807edd61f45b464d1
+grpcio-reflection==1.84.0 --hash=sha256:148b382a1a5621496ede90b12b97c868bb94f7bb8e23b18fc03ed32edd5447cb
+h11==0.16.0 --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86
+hf-xet==1.6.0 --hash=sha256:d62671bb130879cef0ee4c9ebe47a14af6c66ec53e6d84dc15936e5ffdfac82f
+httpcore==1.0.9 --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55
+httpx==0.28.1 --hash=sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad
+huggingface-hub==1.32.0 --hash=sha256:b0c7c80561969d9cdacdd55fce67ba9584cca0b9d4ea80957a3a5c1445fac5c8
+idna==3.20 --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c
+interegular==0.3.3 --hash=sha256:b0c07007d48c89d6d19f7204972d369b2a77222722e126b6aa63aa721dc3b19c
+ipython==8.39.0 --hash=sha256:bb3c51c4fa8148ab1dea07a79584d1c854e234ea44aa1283bcb37bc75054651f
+jedi==0.20.0 --hash=sha256:7bdd9c2634f56713299976f4cbd59cb3fa92165cc5e05ea811fb253480728b67
+jinja2==3.1.6 --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67
+jiter==0.17.0 --hash=sha256:826871c42cebaae22f0a2b5673a4a1a75c851bb2d13b3c17764a630a6b298984
+jsonschema==4.26.0 --hash=sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce
+jsonschema-specifications==2025.9.1 --hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe
+lark==1.3.1 --hash=sha256:c629b661023a014c37da873b4ff58a817398d12635d3bbb2c5a03be7fe5d1e12
+llguidance==1.8.0 --hash=sha256:39668c11396896e5f05f59b70c81e4afd060b3408f02c8518b7a6943bfbb8a5d
+loguru==0.7.3 --hash=sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c
+lxml==6.1.3 --hash=sha256:f6449672f9c93316deb5e2839e18931f468670e44d5bd9b1301a5a9655d45c07
+markdown-it-py==4.2.0 --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a
+markupsafe==3.0.3 --hash=sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591
+matplotlib-inline==0.2.2 --hash=sha256:3c821cf1c209f59fb2d2d64abbf5b23b67bcb2210d663f9918dd851c6da1fcf6
+mdurl==0.1.2 --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8
+mistral-common==1.11.7 --hash=sha256:a9511b88eacacbe7dacddd9d3498c1739f56847b7fdddbd5a22e7844fd9def95
+mpmath==1.3.0 --hash=sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c
+msgpack==1.2.2 --hash=sha256:58ce37a4a54577115922385d37201d9a44d66d0167dfbbf4770a2e9bf8ea7ba3
+msgspec==0.21.1 --hash=sha256:f667b90b37fad734a91671abd68e0d7f4d066862771b87e91c53996dcb7a9027
+multidict==6.8.0 --hash=sha256:e418ec99574ca24365ca96546af285c2b021a1a072478a79f0e3cc3b08837154
+nest-asyncio==1.6.0 --hash=sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c
+networkx==3.4.2 --hash=sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f
+ninja==1.13.2 --hash=sha256:65a24341b5ac09fcadcc37082660be40a94174e51a937fabf6e2cae26225fa2c
+numpy==2.2.6 --hash=sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915
+openai==2.6.1 --hash=sha256:904e4b5254a8416746a2f05649594fa41b19d799843cd134dac86167e094edef
+orjson==3.12.0 --hash=sha256:e9683ee9ea0659da64f36574ef675b8a86330c34c19ea75db1fb93c3ff99e0ef
+outlines==0.1.11 --hash=sha256:f5a5f2242ed9802d3aab7a92789bf4008d734c576be9258cc0a297f690124727
+outlines-core==0.1.26 --hash=sha256:a3c4196148e47f455f1ace78e329d5b97e531cbc406456d681592952adae7e17
+packaging==26.3 --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c
+pandas==2.3.3 --hash=sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838
+parso==0.8.7 --hash=sha256:a8926eb2a1b915486941fdbd31e86a4baf88fe8c210f25f2f35ecec5b574ca1c
+partial-json-parser==0.2.1.1.post7 --hash=sha256:145119e5eabcf80cbb13844a6b50a85c68bf99d376f8ed771e2a3c3b03e653ae
+pexpect==4.9.0 --hash=sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523
+pillow==11.3.0 --hash=sha256:4445fa62e15936a028672fd48c4c11a66d641d2c05726c7ec1f8ba6a572036ae
+pip==25.3 --hash=sha256:9655943313a94722b7774661c21049070f6bbb0a1516bf02f7c8d5d9201514cd
+prometheus-client==0.26.0 --hash=sha256:fa93d06737aa02bacd05794768508bb97d2fbee28cb3bca04eaae92f0ca953d6
+prompt-toolkit==3.0.53 --hash=sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2
+propcache==0.5.4 --hash=sha256:f574e460d1c8a08384a016fdb09ccf3543433263ed6b2f97104f979e64ea57c2
+protobuf==7.36.2 --hash=sha256:89f23aa53c24553a2416fd4fd1ec06f74fa42b14b546d8883128813f775bbfd2
+psutil==7.2.2 --hash=sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9
+ptyprocess==0.7.0 --hash=sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35
+pure-eval==0.2.4 --hash=sha256:96cae060a313cfaad51bb761278bfb0e62dc0248d9315a81173752dc546cd37a
+pybase64==1.5.0 --hash=sha256:dd4abc5f83ea43fe977caa7111af763e0f2ad5f4143a55abaef8bc4efe4fe30c
+pybind11==3.1.0 --hash=sha256:b8488090f8acffbcb6b5d6a85571a6827a0a2981ffb75e5a0b27b87c4a6b7dd0
+pycountry==26.2.16 --hash=sha256:115c4baf7cceaa30f59a4694d79483c9167dbce7a9de4d3d571c5f3ea77c305a
+pycparser==3.0 --hash=sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992
+pycryptodomex==3.23.0 --hash=sha256:f489c4765093fb60e2edafdf223397bc716491b2b69fe74367b70d6999257a5c
+pydantic==2.13.5 --hash=sha256:346a034f080da3755d8e9cb5e00e8b07de1d39e4f6e2c87d8ab7cafa0b269a73
+pydantic-core==2.46.5 --hash=sha256:850a08d167dde16db8702c274f320c7be9d7da6f6dff2b58b18f9e815bd94f5b
+pydantic-extra-types==2.11.1 --hash=sha256:1722ea2bddae5628ace25f2aa685b69978ef533123e5638cfbddb999e0100ec1
+pygments==2.19.2 --hash=sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b
+python-dateutil==2.9.0.post0 --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427
+python-multipart==0.0.32 --hash=sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23
+pytz==2026.5 --hash=sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03
+pyyaml==6.0.1 --hash=sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515
+pyzmq==27.2.0 --hash=sha256:d64da42cae09e6b0c61368b4cc8ca80f23ce3af17584d08053f3dc957433d5ed
+referencing==0.37.0 --hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231
+regex==2026.9.10 --hash=sha256:c3d95d7d9538b5b726dd6fcd7b6117a71e6565202f6d64f5845fb4d8f203f533
+requests==2.34.2 --hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0
+rich==15.0.0 --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb
+rpds-py==0.30.0 --hash=sha256:0c0e95f6819a19965ff420f65578bacb0b00f251fefe2c8b23347c37174271f3
+safetensors==0.8.0 --hash=sha256:fd6f3f93c9a0a7cc2788ee63fb763353d4bd2e89b0751bc78fcf7dda00bea774
+scipy==1.15.3 --hash=sha256:9e2abc762b0811e09a0d3258abee2d98e0c703eee49464ce0069590846f31d40
+sentencepiece==0.2.2 --hash=sha256:44284adc6fbe9d5bdd480541431a3d93f674fa44736714d3ad4bcee8283ace7d
+setproctitle==1.3.7 --hash=sha256:00afa6fc507967d8c9d592a887cdc6c1f5742ceac6a4354d111ca0214847732c
+setuptools==59.6.0 --hash=sha256:4ce92f1e1f8f01233ee9952c04f6b81d1e02939d6e1b488428154974a4d0783e
+sglang==0.5.23.dev252+eagle.4.rocm --hash=sha256:4e336633bd19e8b15b9da7d7048ff7535daa2a209d458110014bcfe899b04285
+sglang-kernel==0.4.7 --hash=sha256:62c41313a71a1701243c0143884a8e117f286de7a4fdec14fdc7dfbacec6589c
+shellingham==1.5.4 --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686
+six==1.17.0 --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274
+smg-grpc-proto==0.4.18 --hash=sha256:1ed71e659f92d95a5528058ef668018421be2580a89010a90e651cb1694dfe64
+smg-grpc-servicer==0.9.1 --hash=sha256:722be7fe2a13032477274237329d169f63373893c0c0925f6e9f0457bf1f3c99
+sniffio==1.3.1 --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2
+soundfile==0.13.1 --hash=sha256:03267c4e493315294834a0870f31dbb3b28a95561b80b134f0bd3cf2d5f0e618
+stack-data==0.6.3 --hash=sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695
+starlette==1.6.0 --hash=sha256:a86dd39d14bb45f85a3d18525215a9ef0cfd1f192ac793220e72598c90335f0c
+sympy==1.14.0 --hash=sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5
+tiktoken==0.14.0 --hash=sha256:18a1b651c4b032004bf7b4f1713391a54b2a341a52c6e8a2b59acae9d16e13c7
+tokenizers==0.22.2 --hash=sha256:369cc9fc8cc10cb24143873a0d95438bb8ee257bb80c71989e3ee290e8d72c67
+tomli==2.4.0 --hash=sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a
+torch==2.9.1+rocm7.2.0.lw.git7e1940d4 --hash=sha256:0c1bd06de7aa96cbead576d16bf44b0b18f775f74d0963b181a7e94e6bd3938a
+torchvision==0.24.0+rocm7.2.0.gitb919bd0c --hash=sha256:a479330dee15ec287ed868f00d11da41b45b0395ff19fd7ab2823103c759a63e
+tqdm==4.67.1 --hash=sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2
+traitlets==5.16.1 --hash=sha256:f775618166caa0396c8e337099240f2bd3e5e917d203b2e6fbe21a58d3cb1f6b
+transformers==5.12.1 --hash=sha256:2a5e109d2021265df7098ffbb738295acaf5ad256f12cbc586db2ea4dcbb1a8a
+triton==3.7.0+amd.rocm7.2.0.git89002410 --hash=sha256:c12d8c03e51997238c583915a609309ea374689d2a41e58fda6b53612296157f
+typer==0.27.2 --hash=sha256:b3a5fc4342d5fc8fda8fc3010b1cf117e9249aab7fae800c2eff62fd3842d97d
+typing-extensions==4.16.0 --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8
+typing-inspection==0.4.4 --hash=sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147
+tzdata==2026.5 --hash=sha256:b683bd1b6659ddcd810ff02ad09ba821d4bf1065072805063eb35c49617905ac
+urllib3==2.8.0 --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3
+uvicorn==0.53.0 --hash=sha256:e8dca71ec86dce5f04e333f0d56cdedf942446e6643b9cea1af0d6d3a02cb03e
+uvloop==0.22.1 --hash=sha256:481c990a7abe2c6f4fc3d98781cc9426ebd7f03a9aaa7eb03d3bfc68ac2a46bd
+wcwidth==0.8.4 --hash=sha256:2097bb1d28a0ba8fe177c2eb607317f9b1627b03f33ebebfd3da670b337a65ba
+xgrammar==0.2.1 --hash=sha256:5b80b8060fcf6c94324f563e1d4778029b21d35c556dca5bbf49428d307eca37
+yarl==1.25.1 --hash=sha256:e5637ca8d0bd7fb72648a6c7934af4baaccb697657f7438c9d264fc2abb8b0b1
diff --git a/docker/sglang-rocm.Dockerfile b/docker/sglang-rocm.Dockerfile
index c05a23c..1dfe2ff 100644
--- a/docker/sglang-rocm.Dockerfile
+++ b/docker/sglang-rocm.Dockerfile
@@ -2,20 +2,22 @@
# Copyright 2026 Eagle AI Corp.
# SPDX-License-Identifier: LicenseRef-Eagle-4-Source-Available
-# Sketch only. Supply an approved Python 3.10 / ROCm 7.2 MI355X base
-# with matching PyTorch, Triton, AITER and FlyDSL already installed.
-# No default tag is invented. This file has not been built or served.
-ARG BASE_IMAGE
-FROM ${BASE_IMAGE}
-COPY pyproject.toml README.md LICENSE NOTICE TRADEMARKS.md THIRD_PARTY_NOTICES.md /src/
-COPY LICENSES/ /src/LICENSES/
-COPY eagle_harness/ /src/eagle_harness/
-COPY docs/release.env /opt/eagle-release.env
-RUN . /opt/eagle-release.env \
- && python3 -c 'import sys, torch; assert sys.version_info[:2] == (3, 10); assert torch.version.hip' \
- && python3 -m pip install --no-cache-dir --no-deps --extra-index-url "$EAGLE_ROCM_INDEX" \
- "sglang==$EAGLE_ROCM_VERSION" \
- && python3 -m pip install --no-cache-dir --no-deps --force-reinstall /src \
- && eagle-harness calibrate --help
+# lmsysorg/sglang:v0.5.20-rocm720-mi35x, Ubuntu 22.04 / CPython 3.10.
+# Build with --build-context rocm-wheels=/path/to/rocm/wheels.
+# Image construction/runtime still require separate container qualification.
+FROM lmsysorg/sglang@sha256:ef84c44150da0f90495953458e7386350ffc50a37b2b9ac6802d9a94c454c6dd
+COPY docker/rocm/constraints.txt docker/rocm/requirements.lock /opt/eagle/rocm/
+# Isolate the locked closure from the base image's editable SGLang and packages.
+RUN --mount=type=bind,from=rocm-wheels,target=/wheels \
+ python3 -c 'import sys; assert sys.version_info[:2] == (3, 10)' \
+ && python3 -m venv /opt/eagle/venv \
+ && /opt/eagle/venv/bin/python -m pip install --no-cache-dir --no-index \
+ --find-links /wheels --require-hashes -r /opt/eagle/rocm/requirements.lock \
+ && /opt/eagle/venv/bin/python -m pip check
+ENV PATH="/opt/eagle/venv/bin:${PATH}" \
+ PYTHONPATH="" \
+ PYTHONNOUSERSITE=1
+WORKDIR /opt/eagle
+CMD ["bash"]
# Run eagle-harness-check with /dev/kfd and /dev/dri available, then follow
-# docs/quickstart-amd.md. A CPU build-time import is not GPU qualification.
+# docs/quickstart-amd.md. A CPU build-time install is not GPU qualification.
diff --git a/docs/install.md b/docs/install.md
index ca3fc10..31588e5 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -4,9 +4,10 @@ owner: eagle-harness
last_verified: 2026-10-20
---
-# Install eagle-harness 0.1.0
+# Install EAGLE-4 0.1.0
-At release, install one patched engine per environment, then install `eagle-harness==0.1.0` from PyPI.
+Use one patched engine per environment. CUDA paths install `eagle-harness==0.1.0` from PyPI.
+The ROCm path uses a complete wheel bundle.
Stock engine packages do not provide the required plugin hooks. Choose the pip or Docker path below,
then follow that engine's quickstart.
@@ -27,6 +28,8 @@ If PyPI is unavailable after publication, download the matching `eagle-harness`
named by `EAGLE_RELEASE_ASSETS`, verify its release checksum, and install it with
`python -m pip install /path/to/downloaded/eagle_harness-0.1.0-py3-none-any.whl` in the engine environment.
Before the release assets exist, neither path is available.
+The private ROCm pip closure below was clean-installed and inference-tested. Its Docker recipe
+has not been container-qualified. Publication remains a separate release step.
Do not replace an unavailable artifact with the stock engine or an unpinned package.
Use the release checkout containing these docs. Run commands from its root:
@@ -43,10 +46,10 @@ Use the release checkout containing these docs. Run commands from its root:
On the tested Ubuntu 26.04 / glibc 2.43 host, CUDA 13.0 `nvcc` fails with `rsqrt`/`rsqrtf`
exception-specification errors. Use `export CUDA_HOME=/usr/local/cuda-13.2` for that host's JIT
compilation, or use the release container's compatible toolchain. This does not change the wheel index.
-- SGLang ROCm requires the measured ROCm 7.2 runtime on MI355X, including compatible PyTorch, Triton,
- AITER and FlyDSL. The measured PyTorch build is `2.9.1+rocm7.2.0.lw.git7e1940d4`.
- A CUDA PyTorch wheel is not a replacement. Use the complete ROCm runtime image rather than mixing
- arbitrary PyPI dependencies into it.
+- SGLang ROCm requires Ubuntu 22.04, the ROCm 7.2 developer toolkit (`hipcc` and headers),
+ a C++ compiler, Git, and an MI355X with a compatible host driver.
+ Use the complete, hash-locked ROCm wheel bundle below. The upstream MI35x base and its
+ custom PyTorch wheel use the CPython 3.10 ABI. Python 3.12 is not a supported substitute.
- Docker needs NVIDIA GPU access for CUDA, or `/dev/kfd` and `/dev/dri` access for ROCm.
- Obtain readable target and compatible draft weights before serving. The quickstarts use
Qwen3.8-27B BF16 and its EAGLE-4 draft. Check the [support matrix](support-matrix.md) for other pairs.
@@ -83,14 +86,62 @@ Inside the container, use `/models` paths and `--host 0.0.0.0` in the
## SGLang ROCm on AMD
-The private offline pip closure is qualified, but its fresh-install commands are deferred to the AMD
-follow-up guide. No public pip or Docker installation command is qualified here. The ROCm wheel requires Python 3.10 (`cp310`), not Python 3.12,
-and a complete compatible ROCm 7.2 runtime. A successful import or `eagle-harness-check` alone does not
-qualify the dependency closure for serving.
+Use the complete ROCm bundle with Python 3.10, not an isolated engine wheel or the CUDA index.
+The bundle contains `wheels/`, `requirements.lock`, `constraints.txt` and `SHA256SUMS`.
+Until the complete bundle is published with the release assets, obtain it from the release owner.
+The individual SGLang wheel in the engine index is insufficient.
+[The lock](../docker/rocm/requirements.lock) pins every package and wheel hash. The
+[constraints](../docker/rocm/constraints.txt) provide the corresponding exact versions.
+Do not use `--no-deps`, a source-overlay `PYTHONPATH`, or `--system-site-packages`.
-The [AMD quickstart](quickstart-amd.md) records the measured serving recipe for an already-qualified
-MI355X environment. Do not use that recipe to assemble a fresh runtime or install CUDA FlashInfer
-packages into a ROCm environment.
+On the compatible ROCm host, set `EAGLE_ROCM_BUNDLE` to the absolute bundle directory:
+
+```bash
+: "${EAGLE_ROCM_BUNDLE:?set the absolute path to the complete ROCm wheel bundle}"
+(cd "$EAGLE_ROCM_BUNDLE" && sha256sum -c SHA256SUMS)
+unset PYTHONPATH
+export PATH="/opt/rocm/bin:$PATH"
+export LD_LIBRARY_PATH="/opt/rocm/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+python3.10 -m venv .venv-sglang-rocm
+source .venv-sglang-rocm/bin/activate
+python -m pip install --no-index --find-links "$EAGLE_ROCM_BUNDLE/wheels" \
+ --require-hashes -r "$EAGLE_ROCM_BUNDLE/requirements.lock"
+python -m pip check
+python -c 'import torch; assert torch.version.hip and torch.cuda.is_available(); print(torch.__version__, torch.version.hip)'
+eagle-harness-check
+```
+
+The bundle pairs `torch==2.9.1+rocm7.2.0.lw.git7e1940d4` with
+`triton==3.7.0+amd.rocm7.2.0.git89002410`, `apache-tvm-ffi==0.1.9`,
+`xgrammar==0.2.1` and the HIP `sglang-kernel==0.4.7` wheel for `gfx950`.
+The PyPI kernel wheel with the same version is a different, CUDA artifact.
+The Torch wheel has build tag `1eagle`: only dependency metadata and wheel records differ
+from the vendor wheel. Its runtime files are unchanged. The corrected metadata pins the Triton
+version used by the upstream MI35x image, rather than retaining the vendor wheel's incompatible
+Triton 3.5.1 pin. The lock's hash is required to select this build, not just its package version.
+
+### Build the ROCm image
+
+The Dockerfile uses the immutable `lmsysorg/sglang:v0.5.20-rocm720-mi35x` base and installs
+this same closure in an isolated Python 3.10 environment. It does not reuse the base image's
+editable SGLang installation. Container construction and serving must be qualified separately
+before a release image is advertised as tested.
+
+Build with Docker BuildKit and the complete local wheel bundle:
+
+```bash
+docker buildx build --platform linux/amd64 --load \
+ --build-context "rocm-wheels=$EAGLE_ROCM_BUNDLE/wheels" \
+ -f docker/sglang-rocm.Dockerfile -t eagle-4-sglang-rocm:0.1.0 .
+docker run --rm --device=/dev/kfd --device=/dev/dri --group-add video \
+ --ipc host -it -p 127.0.0.1:30000:30000 -v "$PWD/models:/models:ro" \
+ --entrypoint bash eagle-4-sglang-rocm:0.1.0
+python -m pip check
+eagle-harness-check
+```
+
+Follow the [AMD quickstart](quickstart-amd.md). Inside a container, use `/models` paths and
+`--host 0.0.0.0`. Do not install CUDA FlashInfer packages into this environment.
## vLLM CUDA
@@ -170,12 +221,14 @@ eagle-harness calibrate --help
Do not install multiple engines in one environment. Use only the trusted release indexes above.
The [troubleshooting guide](troubleshooting.md) covers hook failures and startup errors.
-## Dockerfile sketches
+## Dockerfile build status
-The files under `docker/` document how to layer release wheels and this source checkout onto engine
-runtimes. The private image checks used a prebuilt `eagle-harness` wheel instead of the sketches' source install,
-so they do not qualify the Dockerfiles verbatim. The corrected SGLang TP4 image passed hook, dependency,
-request and twenty-prompt correctness checks. vLLM image qualification is pending. TokenSpeed has no
-built image, and ROCm has no container qualification. The ROCm and TokenSpeed sketches require an
-explicit compatible `BASE_IMAGE`; do not infer a tested base from a successful syntax check.
+The files under `docker/` describe release image construction, not proof of tested image builds.
+The private CUDA image checks used a prebuilt `eagle-harness` wheel instead of the sketches' source install,
+so they do not qualify those Dockerfiles verbatim. The corrected SGLang TP4 image passed hook, dependency,
+request and twenty-prompt correctness checks. vLLM image qualification is pending, TokenSpeed has no
+built image, and ROCm has no container qualification.
+The ROCm recipe pins its upstream base by digest and requires the complete wheel bundle as a named
+build context. The TokenSpeed sketch requires an explicit compatible `BASE_IMAGE`.
+Do not infer container qualification from a successful pip installation or syntax check.
Final rebuilds and publication under the release tags are separate release steps.
diff --git a/docs/quickstart-amd.md b/docs/quickstart-amd.md
index ac84ad6..cd1f731 100644
--- a/docs/quickstart-amd.md
+++ b/docs/quickstart-amd.md
@@ -12,10 +12,9 @@ No `data_path` or profile environment variable is needed.
## Before starting
-The fresh-install path remains under qualification and is deferred to a follow-up guide.
-Use this measured serving recipe only in an already-qualified MI355X environment. It is not a
-fresh-install procedure. See the [ROCm installation status](install.md#sglang-rocm-on-amd).
-Run `eagle-harness-check`, but do not treat its import checks as runtime qualification.
+Complete the [ROCm installation](install.md#sglang-rocm-on-amd) in a fresh Python 3.10 environment,
+then run `python -m pip check` and `eagle-harness-check`. Use the entire locked wheel bundle, including
+its corrected Torch wheel. An individually installed SGLang wheel is not a complete ROCm runtime.
Use the ROCm 7.2 runtime and locally downloaded target and draft directories. Profile selection compares
both local `config.json` files with the measured pair, so an unresolved Hub identifier is not sufficient.
The profile applies to MI355X, including VF, BF16, TP1 and no quantization. It is not a generic AMD profile.
@@ -28,6 +27,9 @@ Use the environment from the packaged-profile serving recipe:
```bash
: "${MODEL:?set the local Qwen3.8-27B BF16 target directory}"
: "${DRAFT:?set the local compatible EAGLE-4 draft directory}"
+unset PYTHONPATH AMD_COST_PROFILE
+export OMP_NUM_THREADS=4 AITER_USE_SYSTEM_TRITON=1
+export HIP_FORCE_DEV_KERNARG=1 HSA_NO_SCRATCH_RECLAIM=1
export HF_HUB_OFFLINE=1 TOKENIZERS_PARALLELISM=false
export SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 SGLANG_DISABLE_CUDNN_CHECK=1
export SGLANG_SET_CPU_AFFINITY=1 SGLANG_INT4_WEIGHT=0 SGLANG_USE_ROCM700A=1
@@ -82,3 +84,27 @@ The response must contain generated text and token metadata. The first request i
the measured launch skips server warmup. Repeat it before timing. In Docker, bind the server to `0.0.0.0`
inside the container while publishing only the loopback host port.
Stop the server with Ctrl-C before changing its graph sizes or starting another GPU process.
+
+## Installed-wheel qualification
+
+The hash-locked Python 3.10 pip closure passed two fresh starts on one MI355X:
+
+| Concurrency | No-spec tok/s | EAGLE-4 start 1 / start 2 tok/s | Speedup over no-spec |
+| --- | ---: | ---: | ---: |
+| 1 | 82.93 | 290.67 / 291.22 | 3.51× / 3.51× |
+| 8 | 552.39 | 1151.43 / 1184.13 | 2.08× / 2.14× |
+
+The no-spec control is our own installed engine on the same MI355X, target weights and workload,
+with speculation disabled and the ordinary overlapping scheduler. It was measured once per
+concurrency with twice the Mamba cache cap. Measurements use 44 conversations / 60 turns,
+1,024 maximum new tokens, greedy decoding and a separate warmup pass. At concurrency 1,
+the running-request cap, decode graph batch sizes and Mamba cache cap are all reduced to 1.
+The packaged MI355X profile was selected without a source overlay or profile override.
+
+Each start also passed 20 greedy prompts against an installed no-spec control. Both C1 starts
+had 7 exact / 13 near-tie cases. C8 had 3 exact / 16 near-tie / 1 fp32-arbitrated case on start 1,
+and 6 exact / 13 near-tie / 1 fp32-arbitrated case on start 2; no cases failed.
+The gate checks the first divergence: native log-probability gap at most 0.13, otherwise an
+fp32 forward on the exact common prefix must differ by at most two BF16 ULPs or select our token
+as its argmax. This is tolerance-based parity, not identical output streams.
+Docker construction and GPU-container qualification remain separate, uncompleted gates.
diff --git a/tests/test_engine_release.py b/tests/test_engine_release.py
index 3633b18..4480c4e 100644
--- a/tests/test_engine_release.py
+++ b/tests/test_engine_release.py
@@ -8,6 +8,7 @@ import json
import os
from pathlib import Path
import re
+import shutil
import subprocess
import sys
from urllib.parse import unquote
@@ -134,12 +135,68 @@ def test_upload_verify_rerun_and_pages_without_wheel_payloads(tmp_path, release)
assert ("eagle.4.rocm" in page) == (channel == "rocm")
+def rocm_runtime(tmp_path, monkeypatch):
+ source = tmp_path / "audited-source"
+ (source / "tools").mkdir(parents=True)
+ (source / "docker/rocm").mkdir(parents=True)
+ for name in ("engine_release.py", "mk_index.py"):
+ shutil.copyfile(REPO / "tools" / name, source / "tools" / name)
+ monkeypatch.setattr(sys.modules[__name__], "TOOL", source / "tools/engine_release.py")
+ artifacts = wheels(tmp_path, "rocm")
+ torch = tmp_path / "torch-2.9.1-py3-none-any.whl"
+ with zipfile.ZipFile(torch, "w") as archive:
+ archive.writestr("torch.dist-info/METADATA", "Name: torch\nVersion: 2.9.1\n")
+ artifacts.append(torch)
+ lock = source / "docker/rocm/requirements.lock"
+ lock.write_text("".join(
+ f"{p.name.split('-')[0]}=={p.name.split('-')[1]} --hash=sha256:{hashlib.sha256(p.read_bytes()).hexdigest()}\n"
+ for p in artifacts
+ ))
+ return artifacts, lock
+
+
+def test_runtime_upload_verifies_complete_locked_bundle(tmp_path, release, rocm_runtime):
+ remote, log = release
+ artifacts, _ = rocm_runtime
+ result = command("upload", TAG, "rocm-runtime", *artifacts)
+ assert result.returncode == 0, result.stderr
+ assert {p.name for p in remote.iterdir()} == {p.name for p in artifacts} | {"runtime-rocm-SHA256SUMS"}
+ uploads = [args[3] for args in calls(log) if args[1] == "upload"]
+ assert Path(uploads[-1]).name == "runtime-rocm-SHA256SUMS"
+ assert command("upload", TAG, "rocm-runtime", *artifacts).returncode == 0
+ assert [args[3] for args in calls(log) if args[1] == "upload"] == uploads
+ for artifact in artifacts:
+ assert (remote / artifact.name).read_bytes() == artifact.read_bytes()
+
+
[email protected]("case", ["missing", "wrong-version", "empty-lock", "unhashed", "duplicate-lock"])
+def test_runtime_upload_rejects_bad_closure_before_github(release, rocm_runtime, case):
+ _, log = release
+ artifacts, lock = rocm_runtime
+ if case == "missing":
+ artifacts = artifacts[:1]
+ elif case == "wrong-version":
+ lock.write_text(lock.read_text().replace("torch==2.9.1", "torch==2.9.2"))
+ elif case == "empty-lock":
+ lock.write_text("")
+ elif case == "unhashed":
+ lock.write_text("torch==2.9.1\n")
+ else:
+ lock.write_text(lock.read_text() * 2)
+ result = command("upload", TAG, "rocm-runtime", *artifacts)
+ assert result.returncode != 0
+ assert "ROCm" in result.stderr
+ assert not log.exists()
+
+
def test_pages_publishes_only_released_channels(tmp_path, release):
remote, _ = release
artifacts = wheels(tmp_path, "cu130")
assert command("upload", TAG, "cu130", *artifacts).returncode == 0
- # Neither a harness manifest nor an unknown platform's manifest is an index channel.
+ # Neither a harness or ROCm runtime manifest nor an unknown platform's manifest is an index channel.
(remote / "harness-SHA256SUMS").write_text(f"{'0' * 64} eagle_harness-0.1.0-py3-none-any.whl\n")
+ (remote / "runtime-rocm-SHA256SUMS").write_text(f"{'0' * 64} torch-2.9.1-py3-none-any.whl\n")
(remote / "engine-cu999-SHA256SUMS").write_text(f"{'0' * 64} invented-0.1.0-py3-none-any.whl\n")
site = tmp_path / "site"
result = command("pages", TAG, site)
diff --git a/tests/test_repack_rocm_torch.py b/tests/test_repack_rocm_torch.py
new file mode 100644
index 0000000..3be83a6
--- /dev/null
+++ b/tests/test_repack_rocm_torch.py
@@ -0,0 +1,76 @@
+# Copyright 2026 Eagle AI Corp.
+# SPDX-License-Identifier: LicenseRef-Eagle-4-Source-Available
+
+"""The ROCm Torch repack changes dependency metadata, never runtime payload."""
+
+import csv
+import importlib.util
+import io
+from pathlib import Path
+import tempfile
+import unittest
+import zipfile
+
+SPEC = importlib.util.spec_from_file_location(
+ "repack_rocm_torch", Path(__file__).parents[1] / "tools/repack_rocm_torch.py"
+)
+assert SPEC is not None and SPEC.loader is not None
+MODULE = importlib.util.module_from_spec(SPEC)
+SPEC.loader.exec_module(MODULE)
+
+
+class RepackTest(unittest.TestCase):
+ def setUp(self):
+ self.directory = tempfile.TemporaryDirectory()
+ self.addCleanup(self.directory.cleanup)
+ self.root = Path(self.directory.name)
+ self.source = self.root / f"{MODULE.TORCH}-cp310-cp310-linux_x86_64.whl"
+ self.info = f"{MODULE.TORCH}.dist-info"
+
+ def fixture(self, requirement=MODULE.OLD):
+ with zipfile.ZipFile(self.source, "w") as wheel:
+ wheel.writestr("torch/version.py", '__version__ = "unchanged"\n')
+ binary = zipfile.ZipInfo("torch/lib/example.so", date_time=(2020, 1, 2, 3, 4, 6))
+ binary.external_attr = 0o100755 << 16
+ wheel.writestr(binary, b"\x00binary fixture\xff")
+ wheel.writestr(
+ f"{self.info}/METADATA",
+ "Metadata-Version: 2.1\nName: torch\nVersion: 2.9.1\n" + requirement + ' platform_system == "Linux"\n',
+ )
+ wheel.writestr(f"{self.info}/WHEEL", "Wheel-Version: 1.0\nTag: cp310-cp310-linux_x86_64\n")
+ wheel.writestr(f"{self.info}/RECORD", "")
+
+ def test_valid_requirement_and_unchanged_payload(self):
+ self.fixture()
+ receipt = MODULE.repack(self.source, self.root / "out")
+ with zipfile.ZipFile(self.root / "out" / receipt["output"]) as wheel:
+ metadata = wheel.read(f"{self.info}/METADATA").decode()
+ self.assertIn(
+ 'Requires-Dist: triton==3.7.0+amd.rocm7.2.0.git89002410; platform_system == "Linux"', metadata
+ )
+ self.assertNotIn(MODULE.OLD, metadata)
+ self.assertEqual(wheel.read("torch/version.py"), b'__version__ = "unchanged"\n')
+ self.assertEqual(wheel.read("torch/lib/example.so"), b"\x00binary fixture\xff")
+ self.assertEqual(wheel.getinfo("torch/lib/example.so").external_attr >> 16, 0o100755)
+ self.assertEqual(wheel.getinfo("torch/lib/example.so").date_time, (2020, 1, 2, 3, 4, 6))
+ self.assertIn(b"Build: 1eagle\n", wheel.read(f"{self.info}/WHEEL"))
+ rows = list(csv.reader(io.StringIO(wheel.read(f"{self.info}/RECORD").decode())))
+ self.assertEqual(len(rows), 5)
+ self.assertTrue(all(row[1].startswith("sha256=") and row[2] for row in rows[:-1]))
+ self.assertTrue(receipt["record_verified"])
+ self.assertEqual(receipt["unchanged_payload_members"], 2)
+
+ def test_rejects_unexpected_dependency(self):
+ self.fixture("Requires-Dist: triton==0.0;")
+ with self.assertRaisesRegex(ValueError, "exactly one"):
+ MODULE.repack(self.source, self.root / "out")
+
+ def test_refuses_to_overwrite(self):
+ self.fixture()
+ MODULE.repack(self.source, self.root / "out")
+ with self.assertRaises(FileExistsError):
+ MODULE.repack(self.source, self.root / "out")
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tools/engine_release.py b/tools/engine_release.py
index d6df6a4..4959cb0 100644
--- a/tools/engine_release.py
+++ b/tools/engine_release.py
@@ -23,7 +23,8 @@ import mk_index
REPOSITORY = "eagle-hq/EAGLE-4"
CHANNELS = ("cu130", "rocm")
CHANNEL_LABELS = {"cu130": "CUDA 13.0", "rocm": "ROCm"}
-UPLOAD_CHANNELS = (*CHANNELS, "harness")
+UPLOAD_CHANNELS = (*CHANNELS, "harness", "rocm-runtime")
+ROCM_LOCK = Path(__file__).resolve().parents[1] / "docker/rocm/requirements.lock"
REQUIRED = {
"harness": {"eagle-harness"},
"cu130": {"sglang", "vllm", "tokenspeed", "tokenspeed-kernel", "tokenspeed-scheduler"},
@@ -42,10 +43,46 @@ def gh(*args: str, repository: str = REPOSITORY) -> str:
def manifest_name(channel: str) -> str:
+ if channel == "rocm-runtime":
+ return "runtime-rocm-SHA256SUMS"
return "harness-SHA256SUMS" if channel == "harness" else f"engine-{channel}-SHA256SUMS"
-def validate_wheels(channel: str, wheels: list[Path]) -> None:
+def validate_rocm_runtime(wheels: list[Path], lock: Path) -> None:
+ expected = {}
+ for line in lock.read_text().splitlines():
+ if not line.strip() or line.startswith("#"):
+ continue
+ match = re.fullmatch(r"([A-Za-z0-9_.-]+)==(\S+) --hash=sha256:([a-f0-9]{64})", line)
+ if not match:
+ raise ValueError(f"invalid pinned ROCm requirement: {line!r}")
+ project = mk_index.normalize(match[1])
+ if project in expected:
+ raise ValueError(f"duplicate locked ROCm package: {project}")
+ expected[project] = (match[2], match[3])
+ if not expected:
+ raise ValueError("empty ROCm runtime lock")
+ actual = {}
+ for wheel in wheels:
+ if not WHEEL_NAME.fullmatch(wheel.name):
+ raise ValueError(f"invalid wheel filename: {wheel.name}")
+ meta = mk_index.metadata(wheel)
+ project = mk_index.normalize(meta["name"])
+ if project in actual:
+ raise ValueError(f"duplicate ROCm runtime package: {project}")
+ if expected.get(project) != (meta["version"], mk_index.sha256(wheel)):
+ raise ValueError(f"wheel does not match ROCm runtime lock: {wheel.name}")
+ actual[project] = wheel
+ missing = expected.keys() - actual.keys()
+ if missing:
+ raise ValueError(f"missing locked ROCm packages: {', '.join(sorted(missing))}")
+ validate_wheels("rocm", [actual["sglang"]] if "sglang" in actual else [])
+
+
+def validate_wheels(channel: str, wheels: list[Path], *, rocm_lock: Path | None = None) -> None:
+ if channel == "rocm-runtime":
+ validate_rocm_runtime(wheels, rocm_lock if rocm_lock is not None else ROCM_LOCK)
+ return
names = set()
projects = set()
for wheel in wheels:
diff --git a/tools/repack_rocm_torch.py b/tools/repack_rocm_torch.py
new file mode 100644
index 0000000..2db3347
--- /dev/null
+++ b/tools/repack_rocm_torch.py
@@ -0,0 +1,108 @@
+# Copyright 2026 Eagle AI Corp.
+# SPDX-License-Identifier: LicenseRef-Eagle-4-Source-Available
+
+"""Correct the MI35x upstream image's Torch/Triton wheel metadata.
+
+The upstream ROCm image uses these Torch binaries with Triton 3.7, but its
+metadata rewrite drops the Requires-Dist header. Preserve that runtime pairing
+with a real requirement, a distinct wheel build tag, and complete RECORD hashes.
+No Python module or native library is changed.
+"""
+
+import argparse
+import base64
+import copy
+import csv
+import hashlib
+import io
+import json
+from pathlib import Path
+import zipfile
+
+TORCH = "torch-2.9.1+rocm7.2.0.lw.git7e1940d4"
+OLD = "Requires-Dist: triton==3.5.1+rocm7.2.0.gita272dfa8;"
+NEW = "Requires-Dist: triton==3.7.0+amd.rocm7.2.0.git89002410;"
+
+
+def repack(source: Path, destination: Path) -> dict:
+ expected = f"{TORCH}-cp310-cp310-linux_x86_64.whl"
+ if source.name != expected:
+ raise ValueError(f"expected {expected}, got {source.name}")
+ destination.mkdir(parents=True, exist_ok=True)
+ output = destination / f"{TORCH}-1eagle-cp310-cp310-linux_x86_64.whl"
+ if output.exists():
+ raise FileExistsError(output)
+ with zipfile.ZipFile(source) as original:
+ names = original.namelist()
+ metadata = next(n for n in names if n.endswith(".dist-info/METADATA"))
+ record = next(n for n in names if n.endswith(".dist-info/RECORD"))
+ wheel = next(n for n in names if n.endswith(".dist-info/WHEEL"))
+ text = original.read(metadata).decode()
+ if text.count(OLD) != 1:
+ raise ValueError("expected exactly one original Torch Triton requirement")
+ changes = {
+ metadata: text.replace(OLD, NEW).encode(),
+ wheel: original.read(wheel).rstrip() + b"\nBuild: 1eagle\n",
+ }
+ rows = []
+ payload = {}
+ attributes = {info.filename: (info.external_attr, info.date_time) for info in original.infolist()}
+ with zipfile.ZipFile(output, "w", compression=zipfile.ZIP_DEFLATED, compresslevel=1) as rebuilt:
+ for name in names:
+ if name == record:
+ continue
+ data = changes[name] if name in changes else original.read(name)
+ digest = hashlib.sha256(data).digest()
+ encoded = base64.urlsafe_b64encode(digest).rstrip(b"=").decode()
+ rows.append([name, f"sha256={encoded}", str(len(data))])
+ if name not in changes:
+ payload[name] = digest.hex()
+ rebuilt.writestr(copy.copy(original.getinfo(name)), data, compresslevel=1)
+ rows.append([record, "", ""])
+ buffer = io.StringIO(newline="")
+ csv.writer(buffer).writerows(rows)
+ rebuilt.writestr(copy.copy(original.getinfo(record)), buffer.getvalue(), compresslevel=1)
+ with zipfile.ZipFile(output) as rebuilt:
+ for info in rebuilt.infolist():
+ if (info.external_attr, info.date_time) != attributes[info.filename]:
+ raise ValueError(f"archive attributes changed: {info.filename}")
+ for name, digest in payload.items():
+ if hashlib.sha256(rebuilt.read(name)).hexdigest() != digest:
+ raise ValueError(f"payload changed: {name}")
+ for name, digest, size in csv.reader(io.StringIO(rebuilt.read(record).decode())):
+ if name == record:
+ continue
+ data = rebuilt.read(name)
+ actual = base64.urlsafe_b64encode(hashlib.sha256(data).digest()).rstrip(b"=").decode()
+ if digest != f"sha256={actual}" or size != str(len(data)):
+ raise ValueError(f"RECORD mismatch: {name}")
+
+ def sha256(path):
+ h = hashlib.sha256()
+ with path.open("rb") as stream:
+ for chunk in iter(lambda: stream.read(8 << 20), b""):
+ h.update(chunk)
+ return h.hexdigest()
+
+ receipt = {
+ "input": source.name,
+ "input_sha256": sha256(source),
+ "output": output.name,
+ "output_sha256": sha256(output),
+ "old_requirement": OLD,
+ "new_requirement": NEW,
+ "changed_members": [metadata, wheel, record],
+ "unchanged_payload_members": len(payload),
+ "record_verified": True,
+ "archive_modes_and_timestamps_preserved": True,
+ }
+ (destination / "torch-repack.json").write_text(json.dumps(receipt, indent=2) + "\n")
+ return receipt
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("source", type=Path)
+ parser.add_argument("destination", type=Path)
+ args = parser.parse_args()
+ print(json.dumps(repack(args.source, args.destination), indent=2))