DiCE: Distributed Code generation and Execution

被引:0
作者
Rao, Kunal [1 ]
Coviello, Giuseppe [1 ]
Chakradhar, Srimat [1 ]
机构
[1] NEC Labs Amer, Princeton, NJ 08540 USA
来源
2024 IEEE CONFERENCE ON PERVASIVE AND INTELLIGENT COMPUTING, PICOM 2024 | 2024年
关键词
Generative Artificial Intelligence (GenAI); Large Language Models (LLM); code generation; code optimization; parallel computing; distributed computing; distributed systems; distributed runtime;
D O I
10.1109/PICom64201.2024.00008
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Generative artificial intelligence (GenAI), specifically, Large Language Models (LLMs), have shown tremendous potential in automating several tasks and improving human productivity. Recent works have shown them to be quite useful in writing and summarizing text (articles, blogs, poems, stories, songs, etc.), answering questions, brainstorming ideas, and even writing code. Several LLMs have emerged specifically targeting code generation. Given a prompt, these LLMs can generate code in any desired programming language. Many tools like ChatGPT, CoPilot, CodeWhisperer, Cody, DeepSeek Coder, StarCoder, etc. are now routinely being used by software developers. However, most of the prior work in automatic code generation using LLMs is focused on obtaining "correct" and working code, and mainly runs on a single computer (serial code). In this paper, we take this to the next level, where LLMs are leveraged to generate code for execution on a distributed infrastructure. We propose a novel system called DiCE, which takes serial code as input and automatically generates distributed version of the code and efficiently executes it on a distributed setup. DiCE consists of two main components (a) LLM-based tool (Synthia) to understand dependencies in serial code and automatically generate distributed version of the code using specialized programming model and semantics, and (b) Runtime (Hermod) to understand the semantics in the distributed code and realize efficient execution on a cluster of machines (distributed infrastructure). DiCE currently focuses on visual programs synthesized by tools like ViperGPT [1] and VisReP [2] (serial code), automatically identifies higher-level task parallelism opportunities (e.g., parallel object detection), transforms the code to exploit the parallelism, and finally efficiently executes it on a cluster of machines. Through our experiments using 100 examples from the GQA dataset [3], we show that the serial codes generated by ViperGPT are successfully transformed into distributed codes which are then efficiently executed on a cluster of machines by DiCE. We note that DiCE correctly identifies opportunities for parallelism and distributes tasks on separate GPUs within the cluster. We observe an average speed-up of 2X, 2.95X, and 3.7X, and an average efficiency of 1, 0.74 and 0.48 for a cluster of 2 nodes, 4 nodes, and 8 nodes, respectively.
引用
收藏
页码:8 / 15
页数:8
相关论文
共 24 条
[1]  
Hudson DA, 2019, Arxiv, DOI arXiv:1902.09506
[2]  
AI D., 2023, Deepseek coder: Let the code write itself
[3]  
AI M., 2023, Introducing code llama, a state-of-the-art large language model for coding
[4]  
AI M, 2024, Codestral
[5]  
Amazon, Amazon codewhisperer documentation
[6]  
github, GitHub CoPilot
[7]  
Google, 2023, Prompt Engineering for Generative AI
[8]  
Khan Z, 2024, Arxiv, DOI arXiv:2404.04627
[9]  
Kubernetes, About us
[10]  
Li JN, 2023, Arxiv, DOI arXiv:2301.12597