Skip to content

Adding --iree-rocm-container-type= flag. - #20902

Merged
benvanik merged 1 commit into
mainfrom
users/benvanik/rocm-container-type
May 27, 2025
Merged

benvanik merged 1 commit into
mainfrom
users/benvanik/rocm-container-type

Conversation

@benvanik

Copy link
Copy Markdown
Collaborator

This should almost always be 'auto' but when performing executable compilation (--compile-mode=hal-executable) it can be explicitly set to hsaco to have the output of the compile command be the raw HSACO ELF image.

Example:

iree-compile \
  --compile-mode=hal-executable \
  --iree-hal-target-device=hip --iree-hip-target=gfx942 \
  --iree-rocm-container-type=hsaco \
  tools/test/iree-benchmark-executable.mlir \
  -o=hsaco.elf

@benvanik
benvanik requested a review from AWoloszyn May 27, 2025 17:34

@AWoloszyn AWoloszyn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look good to me, although I am a bit less familiar with the llvm conventions.

This should almost always be 'auto' but when performing executable
compilation (`--compile-mode=hal-executable`) it can be explicitly
set to `hsaco` to have the output of the compile command be the raw
HSACO ELF image.
@benvanik
benvanik force-pushed the users/benvanik/rocm-container-type branch from d287796 to 7fc80f1 Compare May 27, 2025 17:58
@benvanik
benvanik marked this pull request as ready for review May 27, 2025 18:16
@benvanik
benvanik requested a review from kuhar as a code owner May 27, 2025 18:16
@benvanik
benvanik enabled auto-merge (squash) May 27, 2025 18:16
@benvanik
benvanik merged commit 922f751 into main May 27, 2025
@benvanik
benvanik deleted the users/benvanik/rocm-container-type branch May 27, 2025 18:20
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
This should almost always be 'auto' but when performing executable
compilation (`--compile-mode=hal-executable`) it can be explicitly set
to `hsaco` to have the output of the compile command be the raw HSACO
ELF image.

Example:
```
iree-compile \
  --compile-mode=hal-executable \
  --iree-hal-target-device=hip --iree-hip-target=gfx942 \
  --iree-rocm-container-type=hsaco \
  tools/test/iree-benchmark-executable.mlir \
  -o=hsaco.elf
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants