Tile IR bytecode v13.5 support

オープン
#333 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
julia
領域
backend, compilers

調査の方向性

Start with src/bytecode/writer.jl, src/bytecode/encodings.jl, and src/language/types.jl, then compare the linked upstream commits and check the v13.5 bytecode rules. The listed tasks also touch src/compiler/transform/token_order.jl, src/launch.jl, src/language/atomics.jl, and docs/src/man/performance.md; run the relevant bytecode and compiler tests as you work. Done means v13.5 encodings, hints, worker warp ranges, multimem ops, and foreign calls are supported and the performance table and release notes are updated.

索引モデルが issue の本文から書いたものです。

説明

CUDA 13.5 is out (https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html), so a released tileiras now accepts Tile IR bytecode v13.5. Upstream, cutile-python main has moved V_13_5 out of "dev only" and into _SUPPORTED_VERSIONS (https://github.com/NVIDIA/cutile-python/commit/9e8ef5ebc7f1ec19523cd19ff3a67e7ecd6eac98), its tileiras extra now pins cuda-toolkit<13.6, and the v1.8.0 release notes list the 13.5 features: foreign calls (in a separate cuda-tile-preview package), FP8 on Ada, and the wider num_worker_warps range. cuTile.jl emits v13.1 to v13.4 (SUPPORTED_BYTECODE_VERSIONS in src/bytecode/types.jl), and CUDA_Tile_jll stops at 13.4.1. The first three tasks change the encoding of every kernel, so they are needed before anything can target v13.5. The fourth turns v13.5 on.

Tasks

  • Function header. At v13.5, add_function! in src/bytecode/writer.jl sets only 0x02 in an entry's flags byte; the 0x04 "has hints" bit is gone. Every entry must carry an OptimizationHints attribute, so encode_entry_hints can no longer return nothing and should emit an empty one instead. Every function's header then ends with an empty tagged Array attribute for arg_attrs (tag 0x06, count 0). https://github.com/NVIDIA/cutile-python/commit/b8c47728234dfbd1da9b0e7313831ccf4e179bd6

  • DISubprogram flags. At v13.5, subprogram! in src/bytecode/writer.jl appends a trailing varint flags field, currently always 0. DebugAttrTable needs to know the bytecode version for this. https://github.com/NVIDIA/cutile-python/commit/b8c47728234dfbd1da9b0e7313831ccf4e179bd6

  • inbounds on AtomicRedViewTkoOp. At v13.5, encode_AtomicRedViewTkoOp! in src/bytecode/encodings.jl encodes a dense bool inbounds array after mode, as LoadViewTkoOp and StoreViewTkoOp have done since v13.4. It should throw if any entry is true below v13.5. Upstream always passes all-false; a check_bounds keyword on ct.atomic_store_* (src/language/atomics.jl) could come later. v13.5 also lets atomic_red_view_tko take views that carry a padding_value; the "Tile IR atomic views cannot carry padding" comment and PaddingMode.Undetermined in make_atomic_tile_view (src/language/atomics.jl) only hold below v13.5. https://github.com/NVIDIA/cutile-python/commit/b8c47728234dfbd1da9b0e7313831ccf4e179bd6

  • Enable v13.5. Once the encoding tasks above are done:

    • Add 13.5 to SUPPORTED_BYTECODE_VERSIONS. test/bytecode.jl currently asserts that TypeTable(; version=v"13.5") throws; flip that.
    • Build CUDA_Tile_jll 13.5 on Yggdrasil. The CUDA_Tile_jll = "13.3" compat already admits it.
    • Emit v13.5 by default when the detected tileiras is 13.5.
    • Update docs/src/man/compatibility.md, docs/src/installation.md and NEWS.md.
  • num_worker_warps from 1 to 32. At v13.5, accept any power of two from 1 to 32. Below v13.5, keep allowing only 4 and 8.

    • Relax the val in (4, 8) check in validate_hint (src/language/types.jl).
    • Add the version check next to the existing v13.3 check in encode_entry_hints (src/bytecode/writer.jl).
    • Update the table in docs/src/man/performance.md.

    https://github.com/NVIDIA/cutile-python/commit/a13e157fc890066f1521ba8f1a16d5530993b401

  • Multimem view ops. Add encoders for MultimemLoadReduceViewTkoOp (opcode 123), MultimemReduceViewTkoOp (124) and MultimemStoreViewTkoOp (125) to src/bytecode/encodings.jl, plus the MultimemReductionKind enum (add, min, max, and, or, xor, umin, umax). Upstream has only the encoders, with no user API yet. A usable API would also need the new ptr_attr values unicast (peer access over NVLink) and multicast (requires NVSwitch with NVLink SHARP). The release notes list support on sm_100, sm_103 and sm_107. https://github.com/NVIDIA/cutile-python/commit/b8c47728234dfbd1da9b0e7313831ccf4e179bd6

  • FP8 on Ada. With tileiras 13.5, Float8_E4M3FN and Float8_E5M2 casts and mma work on sm_89. Upstream lowers its per-dtype minimum SM from 90 to 89 at v13.5 (https://github.com/NVIDIA/cutile-python/commit/db66c131b4c7be056084f10580211d1d34960e9e). cuTile.jl has no per-architecture dtype check, so any failure before 13.5 would have come from tileiras. This is likely just a docs line plus a test on sm_89.

  • Foreign calls: bytecode. Add the encoder for PreviewCallOp (opcode 16386) and its preview attribute tags: PreviewExprInt (0xD1), PreviewConcreteType (0xDB) and PreviewExprConstStr (0xE4). These tags are varint-encoded as two bytes each. The existing AttributeTags are all pushed as single bytes, so this needs new handling. When a module uses preview ops, bit 0 of the version tag in the header must be set (write_header!). https://github.com/NVIDIA/cutile-python/commit/66964ac29340eb90c5a6c0e7846650feaf443e41

  • Foreign calls: frontend. Add an intrinsic in the style of upstream's cuda.tile_preview.foreign_call, gated on v13.5. It calls a symbol from a .tilelib and takes these arguments:

    • the library path and version
    • constant parameters (integers, strings and element types)
    • tile or scalar inputs
    • the output types

    Supporting work:

    https://github.com/NVIDIA/cutile-python/commit/66964ac29340eb90c5a6c0e7846650feaf443e41

Other upstream changes since v1.6.0

These changes are not tied to v13.5.

Assisted by: Opus 5.5

主要言語
Julia
スター
90
フォーク
13
平均マージ
4日 8時間
マージ済み PR(30日)
19

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaGPU/cuTile.jl のほかの issue

JuliaGPU/cuTile.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。