---
title: "CuBridge — paper by Ma et al. (2026) — summary and ideas"
description: "Fast CUDA kernels for new attention variants, such as custom masks, altered score functions or… 4 references, cited by 2 papers here."
authors: ["Xing Ma", "Yangjie Zhou", "Wu Sun", "Zihan Liu", "Jingwen Leng", "Yun Lin", "Shixuan Sun", "Minyi Guo", "Jin Song Dong"]
year: 2026
venue: "Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)"
source: "https://aclanthology.org/2026.acl-long.500/"
doi: "10.18653/v1/2026.acl-long.500"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/ma-2026-cubridge-llm-based-framework-understanding/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/ma-2026-cubridge-llm-based-framework-understanding/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2026](https://md.research.elamur.ai/free/en/papers/2026/page/5/) / CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernels

# CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernels

**Authors:** Xing Ma, Yangjie Zhou, Wu Sun, [Zihan Liu](https://md.research.elamur.ai/free/en/authors/zihan-liu/), Jingwen Leng, Yun Lin, Shixuan Sun, Minyi Guo and [Jin Song Dong](https://md.research.elamur.ai/free/en/authors/jin-song-dong/) · **Year:** 2026 · **Venue:** [Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)](https://md.research.elamur.ai/free/en/venues/acl/) ([ACL 2026](https://md.research.elamur.ai/free/en/venues/acl/2026/)) · **Publisher:** [Association for Computational Linguistics](https://md.research.elamur.ai/free/en/publishers/association-for-computational-linguistics/) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2026.acl-long.500/) · [PDF](https://aclanthology.org/2026.acl-long.500.pdf) · [DOI 10.18653/v1/2026.acl-long.500](https://doi.org/10.18653/v1/2026.acl-long.500) · [OpenAlex](https://openalex.org/W7166810774)

**Citations:** 1 citations (OpenAlex, 2026-10-14) · 2 in our library, of the 149,439 papers whose bibliographies we read

## Summary
Fast CUDA kernels for new attention variants, such as custom masks, altered score functions or different normalization, are hard to build. PyTorch-style frameworks and template compilers like FlexAttention are flexible but slow. Expert libraries such as FlashAttention are fast but difficult to extend. LLMs that write kernels from scratch, or edit expert code directly, often produce incorrect or slow results.

CuBridge instead treats expert-written kernels as performance references. An LLM first lifts the source CUDA into CuIR, an executable intermediate representation. CuIR exposes execution orchestration (work assignment, synchronization, data movement) while hiding low-level syntax. Given a PyTorch specification of the target variant, the system then transforms the IR program and checks it by executing it. Finally, it lowers the program back to CUDA through reference-guided reconstruction and refinement.

On A100 and H100 GPUs, across many variants and real-model configurations, CuBridge produced correct kernels. Relative to general frameworks, template-based compilers and earlier LLM methods, its average speedups were 16.03×, 1.39× and 3.33× respectively. The work shows that a structured intermediate layer makes LLM-driven kernel adaptation both reliable and efficient.

## Key points
- **Motivation:** when GPT-5 edits FlashAttention-3 directly for a PrefixLM mask, it can apply the mask before the asynchronous GEMM has finished.
- **Ablation:** tested on H100 with 96 cases (8 variants × 12 sequence lengths).
  - Pass@5 is 0.38 for vanilla GPT-5, 0.58 for GPT-5 + ReAct and 1.00 for CuBridge.
  - Normalized speedups are 1.00×, 1.23× and 4.19× respectively.
- **Comparison with Qimeng-Attention:**
  - On simple relative-position attention on A100, CuBridge is about 1.24× faster.
  - On complex "comb" masking it reaches 5.37× on A100 and 11.47× on H100.
- **LLM backends:** Claude, DeepSeek-V3 and Qwen-3-235B stay within 5% of GPT-5's throughput (e.g., ~577 TFLOPS at 4k tokens, PrefixLM, Llama2-7B config). Qwen-3-32B fails to produce valid kernels.
- **Pipeline components:** Lifter, IR Transfer, a CuIR Executor-based Verifier, IR Differencer, Rewriter and Refiner, with profiling feedback.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

## Institutions

- [National University of Singapore](https://md.research.elamur.ai/free/en/universities/national-university-of-singapore/) — University, Singapore, Singapore · 180 works · 34,304 citations
- [Shanghai Jiao Tong University](https://md.research.elamur.ai/free/en/universities/shanghai-jiao-tong-university/) — University, Shanghai, China · 149 works · 16,161 citations
- [Shanghai Qi Zhi Institute](https://md.research.elamur.ai/free/en/labs/shanghai-qi-zhi-institute/) — Research institute, Shanghai, China · 6 works · 3,008 citations

📚 Shelves (5): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works · [🔌 Hardware and Architecture](https://md.research.elamur.ai/free/en/shelves/computer-science/hardware-and-architecture/) · 81 works

🧭 Topics (1): [⚡ GPU & parallel computing](https://md.research.elamur.ai/free/en/topics/gpu-parallel-computing/) · 19 works

## Cite

Cite as: Xing Ma, Yangjie Zhou, Wu Sun, Zihan Liu, Jingwen Leng, Yun Lin, Shixuan Sun, Minyi Guo and Jin Song Dong. 2026. CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernels. Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{ma2026cubridge,
  title = {{CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernels}},
  author = {Xing Ma, Yangjie Zhou, Wu Sun, Zihan Liu, Jingwen Leng, Yun Lin, Shixuan Sun, Minyi Guo and Jin Song Dong},
  booktitle = {Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.500},
  url = {https://doi.org/10.18653/v1/2026.acl-long.500}
}
```

- [← previous CTRAP: Embedding Collapse Trap to Safeguard Large Language Models from Harmful Fine-Tuning](https://md.research.elamur.ai/free/en/papers/yi-2026-ctrap-embedding-collapse-trap-safeguard/)
- [next → d-TreeRPO: Towards More Reliable Policy Optimization for Diffusion Language Models](https://md.research.elamur.ai/free/en/papers/pan-2026-d-treerpo-more-reliable-policy/)
- [↑ back to papers of 2026](https://md.research.elamur.ai/free/en/papers/2026/page/5/)

## References

4 references, 1 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek Gordon Murray, Benoit Steiner, Paul A. Tucker, Vijay Vasudevan, Pete Warden, and 3 othe… — [TensorFlow: A system for large-scale machine learning](https://md.research.elamur.ai/free/en/papers/abadi-2016-tensorflow-system-large-scale-machine/)
2. Anthropic. 2025. Claude 3.7 sonnet and claude code. [find](https://scholar.google.com/scholar?q=Anthropic%2E+2025%2E+Claude+3%2E7+sonnet+and+claude+code%2E)
3. Carlo Baronio, Pietro Marsella, Ben Pan, Simon Guo, and Silas Alberti. 2025. Kevin: Multi-turn RL for generating CUDA kernels. CoRR, abs/2507.11948. [find](https://scholar.google.com/scholar?q=Carlo+Baronio%2C+Pietro+Marsella%2C+Ben+Pan%2C+Simon+Guo%2C+and+Silas+Alberti%2E+2025%2E+Kevin%3A+Multi%2Dturn+RL+for+generating+CUDA+kernels%2E+CoRR%2C+abs%2F2507%2E11948%2E)
4. Michael Bauer, Sean Treichler, and Alex Aiken. 2014. Singe: leveraging warp specialization for high performance on gpus. In ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP ’14, Orlando, FL, USA, February 15-19, 2014, pages 119–130. ACM. [find](https://scholar.google.com/scholar?q=Michael+Bauer%2C+Sean+Treichler%2C+and+Alex+Aiken%2E+2014%2E+Singe%3A+leveraging+warp+specialization+for+high+performance+on+gpus%2E+In+ACM+SIGPLAN+Symposium+on+Principles+and+Practice+of+Parallel+Programming%2C+PP)

*Updated 1 November 2026*
