--- name: freetoken-rocm-build description: "Verify and execute FreeToken build on ROCm hosts — check gfx1151, ROCm 6.3, hipcc, and dependency wheel availability (torch 2.11, sgl-kernel 0.4.5, flashinfer)" --- # FreeToken ROCm Build ## When to use Verify FreeToken can build on an ROCm host (Dankclaw, similar systems) before committing to the build path. ## Steps 1. **Check hardware** ``` rocminfo | grep 'Name.*gfx' # verify GPU architecture lsmod | grep amdgpu # driver loaded ls /opt/rocm/bin/ | grep hipcc # compiler available ``` 2. **Check build deps** ``` cmake --version # needs >=3.20 python3 --version # needs >=3.10 gcc --version # needs >=9 ninja --version # optional but recommended ``` 3. **Verify wheel availability** ``` pip index versions torch # needs 2.11-2.12 range pip index versions sgl-kernel # needs 0.4.5 pip index versions flashinfer-python # needs >=0.6 ``` Check PyPI for `rocm` in wheel filenames, or use PyTorch ROCm index. 4. **Build** ``` git clone https://github.com/FlashML-org/FreeToken.git && cd FreeToken python3 -m venv .venv && source .venv/bin/activate pip install -e ".[accel]" # installs fi + sgl extras ``` ## Known issues - nvcc missing on Dankclaw — not needed for ROCm build, only for CUDA JIT - sgl-kernel at versioned endpoint may return 404 — use unversioned `pip index versions` - triton 3.6.0 pins to Linux only ## CUDA alternative If building for CUDA: install `sudo pacman -S cuda` for nvcc, or use pre-built CUDA wheels that ship pre-compiled kernels.