Skip to content

The PIMCompilerProject is a compiler designed to translate matrix multiplication operations into machine instructions for Processing-In-Memory (PIM) architecture. This project exploits loop parallelism by distributing independent iterations across multiple processing elements (PEs), thereby accelerating matrix computations.

Notifications You must be signed in to change notification settings

Vedant-Kudalkar/PIM-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

PIMCompilerProject

Project Description

The PIMCompilerProject is a compiler designed to translate matrix multiplication operations into machine instructions for Processing-In-Memory (PIM) architecture. This project exploits loop parallelism by distributing independent iterations across multiple processing elements (PEs), thereby accelerating matrix computations.

Features

  • Parallel matrix multiplication using PIM architecture.
  • ISA conversion for efficient execution on PIM-based systems.
  • Optimized memory access and loop unrolling techniques.
  • Generates 24-bit machine instructions for efficient execution.

Algorithm Overview

  1. Initialization: Reads input matrices A and B, initializes result matrix C.
  2. Parallel Execution Strategy: Each row computation of A is assigned to a separate PE.
  3. Three-Address Code (TAC) Conversion: Converts operations into intermediate representation.
  4. ISA Generation: Translates TAC into PIM-specific machine instructions.
  5. Execution: Executes machine instructions in parallel across multiple PEs.
  6. Result Storage: Stores computed matrix C in memory.

Project Structure

PIMCompilerProject/
├── include/
│   ├── PIMInstructionGenerator.h
│   ├── MatrixMultiplicationTranslator.h
├── src/
│   ├── PIMInstructionGenerator.cpp
│   ├── MatrixMultiplicationTranslator.cpp
│   ├── main.cpp   # Entry point
├── build/         # Compiled output
├── Makefile       # Build automation

Sample Input

Matrix A:

1 2
3 4

Matrix B:

5 6
7 8

Expected Output

Matrix C:

19 22
43 50

Installation & Usage

  1. Clone the repository:
    git clone https://github.com/your-username/PIMCompilerProject.git
  2. Navigate to the project directory:
    cd PIMCompilerProject
  3. Build the project:
    make
  4. Run the executable:
    ./build/PIMCompilerProject

Future Enhancements

  • Implement dynamic load balancing for better PE utilization.
  • Optimize memory access patterns for reduced latency.
  • Explore vectorization techniques for further acceleration.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

The PIMCompilerProject is a compiler designed to translate matrix multiplication operations into machine instructions for Processing-In-Memory (PIM) architecture. This project exploits loop parallelism by distributing independent iterations across multiple processing elements (PEs), thereby accelerating matrix computations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published