Skip to content

Tile IR bytecode v13.5 support #333

Open

Description

@AntonOresten

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 (NVIDIA/cutile-python@9e8ef5e), 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). NVIDIA/cutile-python@b8c4772

  • 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. NVIDIA/cutile-python@b8c4772

  • 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. NVIDIA/cutile-python@b8c4772

  • 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.

    NVIDIA/cutile-python@a13e157

  • 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. NVIDIA/cutile-python@b8c4772

  • 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 (NVIDIA/cutile-python@db66c13). 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!). NVIDIA/cutile-python@66964ac

  • 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:

    • In src/compiler/transform/token_order.jl, order the call as a store to all memory that also acquires.
    • In run_tileiras (src/launch.jl), pass --preview=simt and -l <tilelib>. Add the tilelib paths and versions to cubin_cache_fields.
    • Upstream's foreign_pointer dtype and Array.from_foreign expose an array's base pointer to foreign code (NVIDIA/cutile-python@fc66868). TileArray already has a ptr field. This may only need Ptr{T} operands, plus building a TileArray from (ptr, sizes, strides) inside a kernel.
    • Optional: initialize and finalize NVSHMEM for kernels that call nvshmem_* or nvshmemx_* symbols (NVIDIA/cutile-python@3fc0653).

    NVIDIA/cutile-python@66964ac

Other upstream changes since v1.6.0

These changes are not tied to v13.5.

Assisted by: Opus 5.5

Activity

  1. maleadt commented on Nov 6, 2026

    @maleadt
    Member

    Bunch of these were done in #348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions