QiMeng-TensorOp: One-Line Prompt is Enough for High-Performance Tensor Operator Generation with Hardware Primitives
Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 7038-7046.
https://doi.org/10.24963/ijcai.2025/783
Keywords
- Machine Learning: ML: Applications
- Agent-based and Multi-agent Systems: MAS: Applications
Abstract
Computation-intensive tensor operators constitute over 90% of the computations in Large Language Models (LLMs) and Deep Neural Networks. Automatically and efficiently generating high-performance tensor operators with hardware primitives is crucial for diverse and ever-evolving hardware architectures like RISC-V, ARM, and GPUs, as manually optimized implementation takes at least months and lacks portability. LLMs excel at generating high-level language codes, but they struggle to fully comprehend hardware characteristics and produce high-performance tensor operators.
We introduce a tensor-operator auto-generation framework with a one-line user prompt (QiMeng-TensorOp), which enables LLMs to automatically exploit hardware characteristics to generate tensor operators with hardware primitives, and tune parameters for optimal performance across diverse hardware. Experimental results on various hardware platforms, SOTA LLMs, and typical tensor operators demonstrate that QiMeng-TensorOp effectively unleashes the computing capability of various hardware platforms, and automatically generates tensor operators of superior performance. Compared with vanilla LLMs, QiMeng-TensorOp achieves up to 1291× performance improvement. Even compared with human experts, QiMeng-TensorOp could reach 251% of OpenBLAS on RISC-V CPUs, and 124% of cuBLAS on NVIDIA GPUs. Additionally, QiMeng-TensorOp also significantly reduces development costs by 200× compared with human experts.
@inproceedings{ijcai2025p783,
title = {QiMeng-TensorOp: One-Line Prompt is Enough for High-Performance Tensor Operator Generation with Hardware Primitives},
author = {Zhang, Xuzhi and Peng, Shaohui and Zhou, Qirui and Wen, Yuanbo and Guo, Qi and Chen, Ruizhi and Zhu, Xinguo and Xiong, Weiqiang and Chen, Haixin and Ma, Congying and Gao, Ke and Zhao, Chen and Wu, Yanjun and Chen, Yunji and Li, Ling},
booktitle = {Proceedings of the Thirty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-25}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {James Kwok},
pages = {7038--7046},
year = {2025},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2025/783},
url = {https://doi.org/10.24963/ijcai.2025/783},
}
TY - CPAPER TI - QiMeng-TensorOp: One-Line Prompt is Enough for High-Performance Tensor Operator Generation with Hardware Primitives AU - Zhang, Xuzhi AU - Peng, Shaohui AU - Zhou, Qirui AU - Wen, Yuanbo AU - Guo, Qi AU - Chen, Ruizhi AU - Zhu, Xinguo AU - Xiong, Weiqiang AU - Chen, Haixin AU - Ma, Congying AU - Gao, Ke AU - Zhao, Chen AU - Wu, Yanjun AU - Chen, Yunji AU - Li, Ling T2 - Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2025 SP - 7038 EP - 7046 DO - 10.24963/ijcai.2025/783 UR - https://doi.org/10.24963/ijcai.2025/783 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: