Repository navigation
Expand on device and driver documentation, notably for ROCm. - #20112
Conversation
The list of targets is now sorted by portability then by maturity.
There was a problem hiding this comment.
Great cleanup, thanks for continuing to improve our docs, @ScottTodd!
| $ iree-compile --iree-llvmcpu-list-targets | ||
|
|
||
| Registered Targets: |
There was a problem hiding this comment.
Maybe we should add this for rocm/vulkan -- seems handy
There was a problem hiding this comment.
Yeah! Here's the code for it:
iree/compiler/plugins/target/LLVMCPU/LLVMTargetOptions.cpp
Lines 476 to 490 in d96d142
|
|
||
| ```shell hl_lines="5-6" | ||
| # See the section below for information about HIP targets. | ||
| IREE_HIP_TARGET=$(rocm_agent_enumerator | sed -n '2 p') # e.g. gfx1100 |
There was a problem hiding this comment.
Instead of making this a variable, could we suggest to run the command and copy the output? This way the user has a chance of understanding the surrounding context IMO instead of blindly executing commands.
There was a problem hiding this comment.
Also, would it make sense to show the --dump_devices version here instead of using two different methods to find the target?
There was a problem hiding this comment.
Made a few adjustments. How's this look now? I did want to keep the example working with just copy/paste but I added another section showing --dump_devices output and elaborated on what rocm_agent_enumerator does.
| --8<-- "docs/website/docs/guides/deployment-configurations/snippets/_iree-import-onnx-mobilenet.md" | ||
|
|
||
| Then run the following command to compile with the `rocm` target: | ||
| Then run the following command to compile with the `rocm` target backend: |
There was a problem hiding this comment.
The flag says hip target backend. Should we try to stay consistent? Personally, I still don't understand the exact distinction between hip and rocm, and would assume it's even more confusing for newcomers.
What do you think of calling it a hip target and then linking to https://rocm.docs.amd.com/projects/HIP/en/docs-develop/what_is_hip.html?
There was a problem hiding this comment.
What do you think of calling it a hip target
I think we should finish the discussions on #18477 and pick names we are happy with, then update the docs to reflect that.
| is the most general. | ||
| #### Choosing HIP targets | ||
|
|
||
| A HIP target (`iree-hip-target`) matching the LLVM AMDGPU backend is needed |
…#20115) Follow-up to iree-org#20112. Signed-off-by: geomin12 <[email protected]>
Progress on #18174. Fixes #17977. ### Changes included * Update support status for ROCm compiler target * Drop "experimental" status from one page * Sort ahead of CUDA (I'm biased as an AMD employee, but that reflects the current backend maturity level) * Refresh sections on enumerating drivers and devices * Suggest running status checks _after_ installing packages or building tools from source, not before * Suggest using `iree-run-module --dump_devices` in a few places * Mention Python APIs and show example outputs * Highlight ROCm/CUDA/Vulkan target selection * Promote these sections from "tips" to their own subsections that appear in the table of contents and can be linked to * Add some one-liners for getting the HIP target, e.g. `gfx1100` using different tools. We could do something similar for Vulkan, CUDA, and CPU ### Not included but would be nice to add soon * Discuss multi-device support * Switch documentation to recommend `--iree-hal-target-device` instead of `--iree-hal-target-backends` (or at least explain the difference) * Mention `HIP_VISIBLE_DEVICES` (https://rocm.docs.amd.com/en/latest/conceptual/gpu-isolation.html) * Link to pages like https://rocm.blogs.amd.com/software-tools-optimization/compute-memory-modes/README.html for advanced usage
Progress on #18174. Fixes #17977.
Note
Previews:
Changes included
iree-run-module --dump_devicesin a few placesgfx1100using different tools. We could do something similar for Vulkan, CUDA, and CPUNot included but would be nice to add soon
--iree-hal-target-deviceinstead of--iree-hal-target-backends(or at least explain the difference)HIP_VISIBLE_DEVICES(https://rocm.docs.amd.com/en/latest/conceptual/gpu-isolation.html)