Alert button
Picture for Le Chen

Le Chen

Alert button

CompCodeVet: A Compiler-guided Validation and Enhancement Approach for Code Dataset

Nov 11, 2023
Le Chen, Arijit Bhattacharjee, Nesreen K. Ahmed, Niranjan Hasabnis, Gal Oren, Bin Lei, Ali Jannesari

Large language models (LLMs) have become increasingly prominent in academia and industry due to their remarkable performance in diverse applications. As these models evolve with increasing parameters, they excel in tasks like sentiment analysis and machine translation. However, even models with billions of parameters face challenges in tasks demanding multi-step reasoning. Code generation and comprehension, especially in C and C++, emerge as significant challenges. While LLMs trained on code datasets demonstrate competence in many tasks, they struggle with rectifying non-compilable C and C++ code. Our investigation attributes this subpar performance to two primary factors: the quality of the training dataset and the inherent complexity of the problem which demands intricate reasoning. Existing "Chain of Thought" (CoT) prompting techniques aim to enhance multi-step reasoning. This approach, however, retains the limitations associated with the latent drawbacks of LLMs. In this work, we propose CompCodeVet, a compiler-guided CoT approach to produce compilable code from non-compilable ones. Diverging from the conventional approach of utilizing larger LLMs, we employ compilers as a teacher to establish a more robust zero-shot thought process. The evaluation of CompCodeVet on two open-source code datasets shows that CompCodeVet has the ability to improve the training dataset quality for LLMs.

Viaarxiv icon

Leveraging Neural Radiance Fields for Uncertainty-Aware Visual Localization

Oct 10, 2023
Le Chen, Weirong Chen, Rui Wang, Marc Pollefeys

Figure 1 for Leveraging Neural Radiance Fields for Uncertainty-Aware Visual Localization
Figure 2 for Leveraging Neural Radiance Fields for Uncertainty-Aware Visual Localization
Figure 3 for Leveraging Neural Radiance Fields for Uncertainty-Aware Visual Localization
Figure 4 for Leveraging Neural Radiance Fields for Uncertainty-Aware Visual Localization

As a promising fashion for visual localization, scene coordinate regression (SCR) has seen tremendous progress in the past decade. Most recent methods usually adopt neural networks to learn the mapping from image pixels to 3D scene coordinates, which requires a vast amount of annotated training data. We propose to leverage Neural Radiance Fields (NeRF) to generate training samples for SCR. Despite NeRF's efficiency in rendering, many of the rendered data are polluted by artifacts or only contain minimal information gain, which can hinder the regression accuracy or bring unnecessary computational costs with redundant data. These challenges are addressed in three folds in this paper: (1) A NeRF is designed to separately predict uncertainties for the rendered color and depth images, which reveal data reliability at the pixel level. (2) SCR is formulated as deep evidential learning with epistemic uncertainty, which is used to evaluate information gain and scene coordinate quality. (3) Based on the three arts of uncertainties, a novel view selection policy is formed that significantly improves data efficiency. Experiments on public datasets demonstrate that our method could select the samples that bring the most information gain and promote the performance with the highest efficiency.

* 8 pages, 5 figures 
Viaarxiv icon

Data Race Detection Using Large Language Models

Aug 15, 2023
Le Chen, Xianzhong Ding, Murali Emani, Tristan Vanderbruggen, Pei-hung Lin, Chuanhua Liao

Figure 1 for Data Race Detection Using Large Language Models
Figure 2 for Data Race Detection Using Large Language Models
Figure 3 for Data Race Detection Using Large Language Models
Figure 4 for Data Race Detection Using Large Language Models

Large language models (LLMs) are demonstrating significant promise as an alternate strategy to facilitate analyses and optimizations of high-performance computing programs, circumventing the need for resource-intensive manual tool creation. In this paper, we explore a novel LLM-based data race detection approach combining prompting engineering and fine-tuning techniques. We create a dedicated dataset named DRB-ML, which is derived from DataRaceBench, with fine-grain labels showing the presence of data race pairs and their associated variables, line numbers, and read/write information. DRB-ML is then used to evaluate representative LLMs and fine-tune open-source ones. Our experiment shows that LLMs can be a viable approach to data race detection. However, they still cannot compete with traditional data race detection tools when we need detailed information about variable pairs causing data races.

Viaarxiv icon

Creating a Dataset for High-Performance Computing Code Translation: A Bridge Between HPC Fortran and C++

Jul 28, 2023
Bin Lei, Caiwen Ding, Le Chen, Pei-Hung Lin, Chunhua Liao

Figure 1 for Creating a Dataset for High-Performance Computing Code Translation: A Bridge Between HPC Fortran and C++
Figure 2 for Creating a Dataset for High-Performance Computing Code Translation: A Bridge Between HPC Fortran and C++
Figure 3 for Creating a Dataset for High-Performance Computing Code Translation: A Bridge Between HPC Fortran and C++
Figure 4 for Creating a Dataset for High-Performance Computing Code Translation: A Bridge Between HPC Fortran and C++

In this study, we present a novel dataset for training machine learning models translating between OpenMP Fortran and C++ code. To ensure reliability and applicability, the dataset is initially refined using a meticulous code similarity test. The effectiveness of our dataset is assessed using both quantitative (CodeBLEU) and qualitative (human evaluation) methods. We demonstrate how this dataset can significantly improve the translation capabilities of large-scale language models, with improvements of $\mathbf{\times 5.1}$ for models with no prior coding knowledge and $\mathbf{\times 9.9}$ for models with some coding familiarity. Our work highlights the potential of this dataset to advance the field of code translation for high-performance computing. The dataset is available at https://github.com/bin123apple/Fortran-CPP-HPC-code-translation-dataset

Viaarxiv icon

Creating a Dataset Supporting Translation Between OpenMP Fortran and C++ Code

Jul 15, 2023
Bin Lei, Caiwen Ding, Le Chen, Pei-Hung Lin, Chunhua Liao

Figure 1 for Creating a Dataset Supporting Translation Between OpenMP Fortran and C++ Code
Figure 2 for Creating a Dataset Supporting Translation Between OpenMP Fortran and C++ Code
Figure 3 for Creating a Dataset Supporting Translation Between OpenMP Fortran and C++ Code
Figure 4 for Creating a Dataset Supporting Translation Between OpenMP Fortran and C++ Code

In this study, we present a novel dataset for training machine learning models translating between OpenMP Fortran and C++ code. To ensure reliability and applicability, the dataset is initially refined using a meticulous code similarity test. The effectiveness of our dataset is assessed using both quantitative (CodeBLEU) and qualitative (human evaluation) methods. We demonstrate how this dataset can significantly improve the translation capabilities of large-scale language models, with improvements of \times 5.1 for models with no prior coding knowledge and \times 9.9 for models with some coding familiarity. Our work highlights the potential of this dataset to advance the field of code translation for high-performance computing.

Viaarxiv icon

LM4HPC: Towards Effective Language Model Application in High-Performance Computing

Jun 26, 2023
Le Chen, Pei-Hung Lin, Tristan Vanderbruggen, Chunhua Liao, Murali Emani, Bronis de Supinski

In recent years, language models (LMs), such as GPT-4, have been widely used in multiple domains, including natural language processing, visualization, and so on. However, applying them for analyzing and optimizing high-performance computing (HPC) software is still challenging due to the lack of HPC-specific support. In this paper, we design the LM4HPC framework to facilitate the research and development of HPC software analyses and optimizations using LMs. Tailored for supporting HPC datasets, AI models, and pipelines, our framework is built on top of a range of components from different levels of the machine learning software stack, with Hugging Face-compatible APIs. Using three representative tasks, we evaluated the prototype of our framework. The results show that LM4HPC can help users quickly evaluate a set of state-of-the-art models and generate insightful leaderboards.

Viaarxiv icon

PERFOGRAPH: A Numerical Aware Program Graph Representation for Performance Optimization and Program Analysis

May 31, 2023
Ali TehraniJamsaz, Quazi Ishtiaque Mahmud, Le Chen, Nasreen K. Ahmed, Ali Jannesari

Figure 1 for PERFOGRAPH: A Numerical Aware Program Graph Representation for Performance Optimization and Program Analysis
Figure 2 for PERFOGRAPH: A Numerical Aware Program Graph Representation for Performance Optimization and Program Analysis
Figure 3 for PERFOGRAPH: A Numerical Aware Program Graph Representation for Performance Optimization and Program Analysis
Figure 4 for PERFOGRAPH: A Numerical Aware Program Graph Representation for Performance Optimization and Program Analysis

The remarkable growth and significant success of machine learning have expanded its applications into programming languages and program analysis. However, a key challenge in adopting the latest machine learning methods is the representation of programming languages, which directly impacts the ability of machine learning methods to reason about programs. The absence of numerical awareness, composite data structure information, and improper way of presenting variables in previous representation works have limited their performances. To overcome the limitations and challenges of current program representations, we propose a novel graph-based program representation called PERFOGRAPH. PERFOGRAPH can capture numerical information and the composite data structure by introducing new nodes and edges. Furthermore, we propose an adapted embedding method to incorporate numerical awareness. These enhancements make PERFOGRAPH a highly flexible and scalable representation that can effectively capture program intricate dependencies and semantics. Consequently, it serves as a powerful tool for various applications such as program analysis, performance optimization, and parallelism discovery. Our experimental results demonstrate that PERFOGRAPH outperforms existing representations and sets new state-of-the-art results by reducing the error rate by 7.4% (AMD dataset) and 10% (NVIDIA dataset) in the well-known Device Mapping challenge. It also sets new state-of-the-art results in various performance optimization tasks like Parallelism Discovery and Numa and Prefetchers Configuration prediction.

Viaarxiv icon

Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation

May 09, 2023
Le Chen, Quazi Ishtiaque Mahmud, Hung Phan, Nesreen K. Ahmed, Ali Jannesari

Figure 1 for Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation
Figure 2 for Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation
Figure 3 for Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation
Figure 4 for Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation

Detecting parallelizable code regions is a challenging task, even for experienced developers. Numerous recent studies have explored the use of machine learning for code analysis and program synthesis, including parallelization, in light of the success of machine learning in natural language processing. However, applying machine learning techniques to parallelism detection presents several challenges, such as the lack of an adequate dataset for training, an effective code representation with rich information, and a suitable machine learning model to learn the latent features of code for diverse analyses. To address these challenges, we propose a novel graph-based learning approach called Graph2Par that utilizes a heterogeneous augmented abstract syntax tree (Augmented-AST) representation for code. The proposed approach primarily focused on loop-level parallelization with OpenMP. Moreover, we create an OMP\_Serial dataset with 18598 parallelizable and 13972 non-parallelizable loops to train the machine learning models. Our results show that our proposed approach achieves the accuracy of parallelizable code region detection with 85\% accuracy and outperforms the state-of-the-art token-based machine learning approach. These results indicate that our approach is competitive with state-of-the-art tools and capable of handling loops with complex structures that other tools may overlook.

Viaarxiv icon

Uncertainty Guided Policy for Active Robotic 3D Reconstruction using Neural Radiance Fields

Sep 17, 2022
Soomin Lee, Le Chen, Jiahao Wang, Alexander Liniger, Suryansh Kumar, Fisher Yu

Figure 1 for Uncertainty Guided Policy for Active Robotic 3D Reconstruction using Neural Radiance Fields
Figure 2 for Uncertainty Guided Policy for Active Robotic 3D Reconstruction using Neural Radiance Fields
Figure 3 for Uncertainty Guided Policy for Active Robotic 3D Reconstruction using Neural Radiance Fields
Figure 4 for Uncertainty Guided Policy for Active Robotic 3D Reconstruction using Neural Radiance Fields

In this paper, we tackle the problem of active robotic 3D reconstruction of an object. In particular, we study how a mobile robot with an arm-held camera can select a favorable number of views to recover an object's 3D shape efficiently. Contrary to the existing solution to this problem, we leverage the popular neural radiance fields-based object representation, which has recently shown impressive results for various computer vision tasks. However, it is not straightforward to directly reason about an object's explicit 3D geometric details using such a representation, making the next-best-view selection problem for dense 3D reconstruction challenging. This paper introduces a ray-based volumetric uncertainty estimator, which computes the entropy of the weight distribution of the color samples along each ray of the object's implicit neural representation. We show that it is possible to infer the uncertainty of the underlying 3D geometry given a novel view with the proposed estimator. We then present a next-best-view selection policy guided by the ray-based volumetric uncertainty in neural radiance fields-based representations. Encouraging experimental results on synthetic and real-world data suggest that the approach presented in this paper can enable a new research direction of using an implicit 3D object representation for the next-best-view problem in robot vision applications, distinguishing our approach from the existing approaches that rely on explicit 3D geometric modeling.

* 8 pages, 9 figure; Accepted for publication at IEEE Robotics and Automation Letters (RA-L) 2022 
Viaarxiv icon

Unified Data Collection for Visual-Inertial Calibration via Deep Reinforcement Learning

Sep 30, 2021
Yunke Ao, Le Chen, Florian Tschopp, Michel Breyer, Andrei Cramariuc, Roland Siegwart

Figure 1 for Unified Data Collection for Visual-Inertial Calibration via Deep Reinforcement Learning
Figure 2 for Unified Data Collection for Visual-Inertial Calibration via Deep Reinforcement Learning
Figure 3 for Unified Data Collection for Visual-Inertial Calibration via Deep Reinforcement Learning
Figure 4 for Unified Data Collection for Visual-Inertial Calibration via Deep Reinforcement Learning

Visual-inertial sensors have a wide range of applications in robotics. However, good performance often requires different sophisticated motion routines to accurately calibrate camera intrinsics and inter-sensor extrinsics. This work presents a novel formulation to learn a motion policy to be executed on a robot arm for automatic data collection for calibrating intrinsics and extrinsics jointly. Our approach models the calibration process compactly using model-free deep reinforcement learning to derive a policy that guides the motions of a robotic arm holding the sensor to efficiently collect measurements that can be used for both camera intrinsic calibration and camera-IMU extrinsic calibration. Given the current pose and collected measurements, the learned policy generates the subsequent transformation that optimizes sensor calibration accuracy. The evaluations in simulation and on a real robotic system show that our learned policy generates favorable motion trajectories and collects enough measurements efficiently that yield the desired intrinsics and extrinsics with short path lengths. In simulation we are able to perform calibrations 10 times faster than hand-crafted policies, which transfers to a real-world speed up of 3 times over a human expert.

Viaarxiv icon