C2TACO: Lifting Tensor Code to TACO

José Wesley De Souza Magalhães, Jackson Woodruff, Elizabeth Polgreen, Michael F P O'Boyle

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract / Description of output

Domain-specific languages (DSLs) promise a significant performance and portability advantage over traditional languages. DSLs are designed to be high-level and platform-independent, allowing an optimizing compiler significant leeway when targeting a particular device. Such languages are particularly popular with emerging tensor algebra workloads. However, DSLs present their own challenge: they require programmers to learn new programming languages and put in significant effort to migrate legacy code. We present C2TACO, a synthesis tool for synthesizing TACO, a well-known tensor DSL, from C code. We develop a guided enumerative synthesizer that uses automatically generated IO examples and source-code analysis to efficiently generate dense tensor algebra code. C2TACO is able to synthesize 95% benchmarks from a tensor benchmark suite, outperforming an alternative neural machine translation technique, and demonstrates substantially higher levels of accuracy when evaluated against two state-of-the-art existing schemes, TF-Coder and ChatGPT. Our synthesized TACO programs are, by design, portable achieving significant performance improvement when evaluated on a multi-core and GPU platform
Original languageEnglish
Title of host publicationGPCE 2023: Proceedings of the 22nd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
Number of pages15
ISBN (Electronic)9798400704062
Publication statusPublished - 22 Oct 2023
EventThe 22nd International Conference on Generative Programming: Concepts & Experiences, 2023 - Cascais, Portugal
Duration: 22 Oct 202323 Oct 2023
Conference number: 22


ConferenceThe 22nd International Conference on Generative Programming: Concepts & Experiences, 2023
Abbreviated titleGPCE 2023
Internet address

Keywords / Materials (for Non-textual outputs)

  • program lifting
  • tensor algebra
  • TACO
  • synthesis


Dive into the research topics of 'C2TACO: Lifting Tensor Code to TACO'. Together they form a unique fingerprint.

Cite this