Papers › Mirage: A Multi-Level Superoptimizer for Tensor Programs

Mirage: A Multi-Level Superoptimizer for Tensor Programs

9 May 2024arXiv:2405.05751archive 2025-07-28

Mengdi Wu, Xinhao Cheng, Shengyu Liu, Chunan Shi, Jianan Ji, Kit Ao, Praveen Velliengiri, Xupeng Miao, Oded Padon, Zhihao Jia

We introduce Mirage, the first multi-level superoptimizer for tensor programs. A key idea in Mirage is μGraphs, a uniform representation of tensor programs at the kernel, thread block, and thread levels of the GPU compute hierarchy. μGraphs enable Mirage to discover novel optimizations that combine algebraic transformations, schedule transformations, and generation of new custom kernels. To navigate the large search space, Mirage introduces a pruning technique based on abstraction that significantly reduces the search space and provides a certain optimality guarantee. To ensure that the optimized μGraph is equivalent to the input program, Mirage introduces a probabilistic equivalence verification procedure with strong theoretical guarantees. Our evaluation shows that Mirage outperforms existing approaches by up to 3.3× even for DNNs that are widely used and heavily optimized. Mirage is publicly available at https://github.com/mirage-project/mirage.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.05751")

Code

Syntology Ran 8 of 11 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 8 ran with no contract checked.

By repository: official repository: 11 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

mirage-project/mirage officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

11 samples harvested; 8 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

8ran
3unverified

Licence: 0 of the 11 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from mirage-project/mirage. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

check_stride mirage-project/mirage/python/mirage/kernel.py official repository ran Apache-2.0 (permissive) · 7b480c4ac3023f72 · report
decode_tag mirage-project/mirage/python/mirage/profiler.py official repository ran Apache-2.0 (permissive) · cef40499cf065020 · report
gen_empty_tensor mirage-project/mirage/python/mirage/kernel.py official repository ran Apache-2.0 (permissive) · 9caa520c6c1a019a · report
get_cc_cmd mirage-project/mirage/python/mirage/kernel.py official repository ran Apache-2.0 (permissive) · 0ecdc2aa68b5b2b4 · report
get_format_str mirage-project/mirage/python/mirage/visualizer.py official repository ran Apache-2.0 (permissive) · da8a9e6ba7c9cece · report
get_scheduler mirage-project/mirage/python/mirage/utils.py official repository ran fingerprinted Apache-2.0 (permissive) · fa9480318ea67b0c · report
get_shared_memory_capacity mirage-project/mirage/python/mirage/utils.py official repository ran Apache-2.0 (permissive) · 9140e6b567f2889f · report
is_graph_data mirage-project/mirage/python/mirage/visualizer.py official repository ran Apache-2.0 (permissive) · c0dfdf08d5ad9257 · report
get_builder mirage-project/mirage/python/mirage/mpk/model_registry.py official repository unverified Apache-2.0 (permissive) · 6675ca92f6d07cc1 · report
get_configurations_from_gpu mirage-project/mirage/python/mirage/utils.py official repository unverified Apache-2.0 (permissive) · b70214a477fae3a4 · report
profile_and_select_best_graph mirage-project/mirage/python/mirage/triton_profiler.py official repository unverified Apache-2.0 (permissive) · 45a7a84f44c207b0 · report

Tasks

Navigate

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Pruning

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections