Skip to content

[WIP][LLVM][Flydsl] bump up llvm for upstream and internal coexec opt and adapt flydsl api - #945

Open
jli-melchior wants to merge 8 commits into
mainfrom
jli/update-llvm-basemain
Open

[WIP][LLVM][Flydsl] bump up llvm for upstream and internal coexec opt and adapt flydsl api#945
jli-melchior wants to merge 8 commits into
mainfrom
jli/update-llvm-basemain

Conversation

@jli-melchior

Copy link
Copy Markdown
Collaborator

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

jli-melchior and others added 4 commits July 29, 2026 00:51
Update build scripts to read repo/commit from internal-llvm-build-info.json
and tag build/install directories with the commit short hash. Fix C++ API
breakage introduced by the internal LLVM:

- OpaqueProperties → PropertyRef in inferReturnTypes
- Buffer op aux parameter from Value → Attribute
- Atomic buffer ops now require explicit result Type
- MFMA blgp parameter from IntegerAttr → MFMAPermB enum
- MFMA scale cbsz/blgp from IntegerAttr → MatrixFormat enum
- WMMA modC from raw uint16_t → WMMACModifier enum
- WMMA scale params from raw casts → typed ROCDL enums
- TDM cachePolicy from uint32_t → Attribute
- DenseMapInfo: remove sentinel keys (tombstone-free hashing)

Co-Authored-By: Claude <noreply@anthropic.com>
Consolidate internal-llvm-build-info.json and llvm-hash.txt into a
single thirdparty/llvm-build-info.json with "upstream" and "internal"
entries. Build scripts select by key name:
- build_llvm.sh reads ['upstream']
- build_internal_llvm.sh / build_internal_flydsl.sh read ['internal']

Update CI workflows (build-whl, flydsl, build-custom-llvm-tools) to
use llvm-build-info.json for cache keys and commit lookups.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@jli-melchior jli-melchior changed the title [llvm] bump up llvm for upstream and internal coexec opt and adapt flydsl api [wip][llvm][flydsl] bump up llvm for upstream and internal coexec opt and adapt flydsl api Jul 31, 2026
@jli-melchior jli-melchior changed the title [wip][llvm][flydsl] bump up llvm for upstream and internal coexec opt and adapt flydsl api [WIP][LLVM][Flydsl] bump up llvm for upstream and internal coexec opt and adapt flydsl api Jul 31, 2026
jli-melchior and others added 4 commits July 31, 2026 06:31
The internal LLVM update changed several ROCDL ops: operands became
keyword-only attributes (aux, mask, cache_policy) and WMMA sign params
were removed. Add compatibility wrappers in expr/rocdl so downstream
callers (e.g. aiter) continue to work without source changes.

- raw_ptr_buffer_load: accept aux as positional, convert Value/int → Attr
- raw_ptr_buffer_load_lds: same aux handling
- sched_barrier / sched_group_barrier: convert int mask → SchedGroupMask enum attr
- tensor_load_to_lds / tensor_store_from_lds: accept cache_policy as positional
- tdm_ops: pass cache_policy as keyword to underlying ROCDL ops

Co-Authored-By: Claude <noreply@anthropic.com>
The internal LLVM update changed WMMA op parameters (fmtA, fmtB, modC,
scaleAType, scaleBType, fmtScaleA, fmtScaleB) from plain integers to
typed ROCDL enum attributes. Add int-to-enum conversion in the existing
wmma_scale_f32_16x16x128_f8f6f4, wmma_scale_f32_32x16x128_f4, and
wmma_f32_16x16x128_fp8_fp8 wrappers so downstream callers passing ints
continue to work.

Co-Authored-By: Claude <noreply@anthropic.com>
RawPtrBufferLoadOp/StoreOp aux changed from a positional Value operand
to a keyword-only Attribute in the internal LLVM update. Convert the
cache_modifier int to IntegerAttr and pass as keyword.

Co-Authored-By: Claude <noreply@anthropic.com>
global_prefetch's second param changed from positional `scope` to
keyword-only `cache_policy` in the LLVM binding regeneration.
l2_prefetch_tile was the only call site missed — fix it to use
cache_policy=_cache_policy_attr(scope), consistent with the
tensor_load_to_lds/tensor_store_from_lds fixes in the same file.

Co-Authored-By: Claude <noreply@anthropic.com>
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