---
id: pr-tensorrt-llm-12427
repo: NVIDIA/TensorRT-LLM
pr: 12427
title: '[None][feat] MLIR-based auto-generated elementwise fusion for AutoDeploy'
author: suyoggupta
date: '2026-04-04'
url: https://github.com/NVIDIA/TensorRT-LLM/pull/12427
source_category: upstream-code
architectures:
- sm100
tags:
- triton kernel
techniques:
- kernel-fusion
hardware_features: []
kernel_types: []
languages:
- cuda-cpp
- triton
captured_at: '2026-05-16'
status: merged
merge_sha: 173b350b74133ecd6d24617d2633c1c7357c799c
inclusion_reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.
changed_paths:
- requirements.txt
- tensorrt_llm/_torch/auto_deploy/config/default.yaml
- tensorrt_llm/_torch/auto_deploy/mlir/README.md
- tensorrt_llm/_torch/auto_deploy/mlir/__init__.py
- tensorrt_llm/_torch/auto_deploy/mlir/agent_learnings.md
- tensorrt_llm/_torch/auto_deploy/mlir/codegen/__init__.py
- tensorrt_llm/_torch/auto_deploy/mlir/codegen/kernel_cache.py
- tensorrt_llm/_torch/auto_deploy/mlir/codegen/triton_emitter.py
- tensorrt_llm/_torch/auto_deploy/mlir/decompose.py
- tensorrt_llm/_torch/auto_deploy/mlir/decompose_rules/__init__.py
- tensorrt_llm/_torch/auto_deploy/mlir/decompose_rules/normalization.py
- tensorrt_llm/_torch/auto_deploy/mlir/dialect.py
- tensorrt_llm/_torch/auto_deploy/mlir/fusion/__init__.py
- tensorrt_llm/_torch/auto_deploy/mlir/fusion/subgraph_discovery.py
- tensorrt_llm/_torch/auto_deploy/mlir/fusion/subgraph_replace.py
- tensorrt_llm/_torch/auto_deploy/mlir/fx_to_mlir.py
- tensorrt_llm/_torch/auto_deploy/mlir/mlir_to_fx.py
- tensorrt_llm/_torch/auto_deploy/transform/library/mlir_elementwise_fusion.py
- tensorrt_llm/_torch/auto_deploy/transform/library/multi_stream_moe.py
- tests/integration/defs/perf/test_perf.py
- tests/unittest/auto_deploy/_utils_test/_model_test_utils.py
- tests/unittest/auto_deploy/singlegpu/custom_ops/test_multi_stream_moe.py
- tests/unittest/auto_deploy/singlegpu/mlir/__init__.py
- tests/unittest/auto_deploy/singlegpu/mlir/conftest.py
- tests/unittest/auto_deploy/singlegpu/mlir/test_decompose.py
- tests/unittest/auto_deploy/singlegpu/mlir/test_dialect.py
- tests/unittest/auto_deploy/singlegpu/mlir/test_elementwise_fusion_e2e.py
- tests/unittest/auto_deploy/singlegpu/mlir/test_fx_mlir_roundtrip.py
- tests/unittest/auto_deploy/singlegpu/mlir/test_string_codegen.py
- tests/unittest/auto_deploy/singlegpu/mlir/test_subgraph_discovery.py
- tests/unittest/auto_deploy/singlegpu/smoke/test_ad_build_small_single.py
artifact_dir: evidence/pull-bundles/tensorrt-llm/gh-12427
head_ref_oid: 63fcfa3f10ff27370d34603e07bb81a07cdf9d03
---
# [None][feat] MLIR-based auto-generated elementwise fusion for AutoDeploy

- Repository: `NVIDIA/TensorRT-LLM`
- PR: [12427](https://github.com/NVIDIA/TensorRT-LLM/pull/12427)
- Decision: `Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.`
- Reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.

## Changed Paths

- `requirements.txt`
- `tensorrt_llm/_torch/auto_deploy/config/default.yaml`
- `tensorrt_llm/_torch/auto_deploy/mlir/README.md`
- `tensorrt_llm/_torch/auto_deploy/mlir/__init__.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/agent_learnings.md`
- `tensorrt_llm/_torch/auto_deploy/mlir/codegen/__init__.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/codegen/kernel_cache.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/codegen/triton_emitter.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/decompose.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/decompose_rules/__init__.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/decompose_rules/normalization.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/dialect.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/fusion/__init__.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/fusion/subgraph_discovery.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/fusion/subgraph_replace.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/fx_to_mlir.py`
- `tensorrt_llm/_torch/auto_deploy/mlir/mlir_to_fx.py`
- `tensorrt_llm/_torch/auto_deploy/transform/library/mlir_elementwise_fusion.py`
- `tensorrt_llm/_torch/auto_deploy/transform/library/multi_stream_moe.py`
- `tests/integration/defs/perf/test_perf.py`
- `tests/unittest/auto_deploy/_utils_test/_model_test_utils.py`
- `tests/unittest/auto_deploy/singlegpu/custom_ops/test_multi_stream_moe.py`
- `tests/unittest/auto_deploy/singlegpu/mlir/__init__.py`
- `tests/unittest/auto_deploy/singlegpu/mlir/conftest.py`
- `tests/unittest/auto_deploy/singlegpu/mlir/test_decompose.py`
- `tests/unittest/auto_deploy/singlegpu/mlir/test_dialect.py`
- `tests/unittest/auto_deploy/singlegpu/mlir/test_elementwise_fusion_e2e.py`
- `tests/unittest/auto_deploy/singlegpu/mlir/test_fx_mlir_roundtrip.py`
- `tests/unittest/auto_deploy/singlegpu/mlir/test_string_codegen.py`
- `tests/unittest/auto_deploy/singlegpu/mlir/test_subgraph_discovery.py`
- `tests/unittest/auto_deploy/singlegpu/smoke/test_ad_build_small_single.py`

## Evidence Bundle

`evidence/pull-bundles/tensorrt-llm/gh-12427`
