Skip to content

Fix topology storage max alignment#159

Open
jtuyls wants to merge 1 commit into
ROCm:mainfrom
jtuyls:codex/fix-topology-max-alignment
Open

Fix topology storage max alignment#159
jtuyls wants to merge 1 commit into
ROCm:mainfrom
jtuyls:codex/fix-topology-max-alignment

Conversation

@jtuyls

@jtuyls jtuyls commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

iree_max_align_t is already the numeric maximum host alignment value, not a type. Passing iree_alignof(iree_max_align_t) asks for the alignment of the expression produced by that value, which is conceptually the wrong operation even on compilers that accept it.

Pass iree_max_align_t directly to iree_host_align so the topology storage layout is padded to the intended maximum host alignment.

On MSVC the old expression expands to __alignof(16) and fails with: topology_builder.c(66): error C2059: syntax error: 'constant'.

iree_max_align_t is already the numeric maximum host alignment value, not a type. Passing iree_alignof(iree_max_align_t) asks for the alignment of the expression produced by that value, which is conceptually the wrong operation even on compilers that accept it.

Pass iree_max_align_t directly to iree_host_align so the topology storage layout is padded to the intended maximum host alignment.

On MSVC the old expression expands to __alignof(16) and fails with: topology_builder.c(66): error C2059: syntax error: 'constant'.
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.

1 participant