Skip to content

Commit 764d741

Browse files
authored
updates docs for SDXL (#2708)
Adds details on how to force-update the artifacts while exporting MLIR and IRPA files Also, includes the individual build command for debugging the issues. Signed-off-by: Vivek Agrawal <[email protected]>
1 parent 8aac6c9 commit 764d741

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

shortfin/python/shortfin_apps/sd/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@ python -m shortfin_apps.sd.server --device=hip --device_ids=0 --build_preference
2828
INFO - Application startup complete.
2929
INFO - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
3030
```
31+
32+
> [!NOTE]
33+
> - Server command mentioned above will use the pre-compiled version of artifacts and start the server. To export the MLIR and compile the new MLIR, user can use option `--build_preference=export --force_update=True`
34+
> - MLIR and IRPA files gets exported in `.cache` directory in user's home directory e.g. `/home/<username>/.cache/amdshark/genfiles/sdxl/`
35+
> - VMFB gets compiled at `/home/<username>/.cache/amdshark/bin/sdxl/`
36+
37+
To export and compile MLIR for individual components, one can refer following commands
38+
```
39+
python -m iree.build /home/<username>/scratch/mlperf/sdxl/sanity_test/3.12.venv/lib/python3.12/site-packages/shortfin_apps/sd/components/builders.py --model-json=/home/<username>/.cache/amdshark/genfiles/sdxlconfig/sdxl_config_i8.json --target=gfx942 --splat=False --build-preference=export --output-dir=/home/<username>/.cache/amdshark --model=clip --force-update=False --iree-hal-target-device=hip --iree-hip-target=gfx942 --iree-compile-extra-args= --force-update=True
40+
41+
python -m iree.build /home/<username>/scratch/mlperf/sdxl/sanity_test/3.12.venv/lib/python3.12/site-packages/shortfin_apps/sd/components/builders.py --model-json=/home/<username>/.cache/amdshark/genfiles/sdxlconfig/sdxl_config_i8.json --target=gfx942 --splat=False --build-preference=export --output-dir=/home/<username>/.cache/amdshark --model=unet --force-update=False --iree-hal-target-device=hip --iree-hip-target=gfx942 --iree-compile-extra-args= --force-update=True
42+
43+
python -m iree.build /home/<username>/scratch/mlperf/sdxl/sanity_test/3.12.venv/lib/python3.12/site-packages/shortfin_apps/sd/components/builders.py --model-json=/home/<username>/.cache/amdshark/genfiles/sdxlconfig/sdxl_config_i8.json --target=gfx942 --splat=False --build-preference=export --output-dir=/home/<username>/.cache/amdshark --model=vae --force-update=False --iree-hal-target-device=hip --iree-hip-target=gfx942 --iree-compile-extra-args= --force-update=True
44+
45+
python -m iree.build /home/<username>/scratch/mlperf/sdxl/sanity_test/3.12.venv/lib/python3.12/site-packages/shortfin_apps/sd/components/builders.py --model-json=/home/<username>/.cache/amdshark/genfiles/sdxlconfig/sdxl_config_i8.json --target=gfx942 --splat=False --build-preference=export --output-dir=/home/<username>/.cache/amdshark --model=scheduler --force-update=False --iree-hal-target-device=hip --iree-hip-target=gfx942 --iree-compile-extra-args= --force-update=True
46+
```
47+
3148
### Run the SDXL Client
3249

3350
```

0 commit comments

Comments
 (0)