Skip to content

PurdueDualityLab/LLM-code-optimization

Repository files navigation

LLM for software optimization

About

Table of Contents

Environment Requirement

This artifact requires a machine with the following capabilities to support RAPL (Running Average Power Limit) and read MSR (Model-Specific Registers):

  1. Hardware
  • Intel Processor: Machine with Intel processors supporting RAPL (Sandy Bridge or newer).
  • MSR Support: Machine must allow access to MSRs.
  1. Operating System
  • Linux-based OS (e.g., Ubuntu 16.04+).
  • Linux Kernel Version 3.13+ required for RAPL support.
  • Root Access: MSRs can only be accessed with root/superuser privileges.
  1. Software
  • msr-tools: Install for reading MSRs:
    sudo apt-get install msr-tools
    

Reproduce Results

To set up the pipeline for energy-efficient code optimization, follow these steps:

  1. Clone the repository:
    git clone <repository-link>
    cd <project-directory>
  2. Install the required dependencies using the Makefile
    make setup
  3. Create .env in root directory This should include:
    API_KEY=your_openai_api_key_here
    USER_PREFIX=/path/to/E2COOL
  4. Update RAPL/main.c write path Change the path to language .csv file to match your absolute path
    strcpy(path, “ABSOLUTE_PATH/E2COOL/src/runtime_logs/");
    Then run make in RAPL directory
    make

Running the pipeline

  1. Run the main script in the home directory (/E2COOL)
    make run ARGS="--benchmark PIE --llm gpt-4o --self_optimization_step 2 --num_programs 2"
    To use GenAI studio to inference open-source models
    make run ARGS="--benchmark PIE --llm llama3.3:70b --self_optimization_step 2 --num_programs 2 --genai_studio True"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published