Skip to content

refactor(triton): simplify JIT backend architecture - #925

Draft
voltjia wants to merge 4 commits into
stack/pr-800-triton-backend-jitfrom
refactor/triton-jit-architecture
Draft

refactor(triton): simplify JIT backend architecture#925
voltjia wants to merge 4 commits into
stack/pr-800-triton-backend-jitfrom
refactor/triton-jit-architecture

Conversation

@voltjia

@voltjia voltjia commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Separate backend-neutral Triton JIT orchestration from the NVIDIA runtime implementation through the JitBackend<device_type> template boundary.
  • Split backend, compiler, cache, and JIT config responsibilities into focused modules; remove wrappers that had no independent semantics.
  • Use structured backend metadata and one shared Triton config parser in generated Python bindings.
  • Tighten kernel and auto-tuning cache identity, argument ordering, device/stream handling, artifact publication, and failure recovery.
  • Add focused wrapper-generation, compiler, configured Add, empty-tensor, and polymorphic context coverage.

Motivation

This is a stacked cleanup of #800 focused on architecture, naming, modularity,
readability, and maintainability while preserving the template boundary needed
for future Triton backends.

The branch also carries the corresponding #919 changes because #800 has not
yet been rebased onto the master commit containing that merged PR.

Related: #800, #919

Type of Change

  • refactor - code restructuring without an intended public behavior change
  • Breaking change

Platforms Affected

  • CPU (WITH_CPU)
  • NVIDIA (WITH_NVIDIA)
  • Iluvatar (WITH_ILUVATAR)
  • MetaX (WITH_METAX)
  • Cambricon (WITH_CAMBRICON)
  • Moore (WITH_MOORE)
  • Ascend (WITH_ASCEND)
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Smoke Test Result

Validated commit de9694aef9aef5bfb1c2705536b3d00592d6e318 on
accelerator-dev/nvidia:latest (8 x A100-SXM4-80GB, CUDA 13.1.80,
Python 3.12.3, Triton 3.5.1) against InfiniRT
0cdbb16967e15f2e055dea1ec9641617bf3b6cf6.

InfiniRT WITH_NVIDIA build/install: PASS
InfiniOps WITH_NVIDIA + WITH_TRITON + Python bindings build/install: PASS
Ruff 0.15.22 check/format: PASS
clang-format 21.1.8 on changed C++ files: PASS
focused generator/compiler tests: 32 passed
focused Add Triton tests: 3 passed, 3 skipped, 266 deselected
compile config on cuda:1 with current cuda:0: PASS (device 0 -> 0 -> 0)
auto-tuning on cuda:1 with current cuda:0: PASS (device 0 -> 0 -> 0)

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA Yes Pass Triton JIT build, configured Add, auto-tuning, and multi-device guard passed
Iluvatar No N/A
MetaX No N/A
Cambricon No N/A
Moore No N/A
Ascend No N/A

Benchmark / Performance Impact

N/A. This PR does not make a performance claim.

Notes for Reviewers

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