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.
- 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.
- Initialization: Reads input matrices A and B, initializes result matrix C.
- Parallel Execution Strategy: Each row computation of A is assigned to a separate PE.
- Three-Address Code (TAC) Conversion: Converts operations into intermediate representation.
- ISA Generation: Translates TAC into PIM-specific machine instructions.
- Execution: Executes machine instructions in parallel across multiple PEs.
- Result Storage: Stores computed matrix C in memory.
PIMCompilerProject/
├── include/
│ ├── PIMInstructionGenerator.h
│ ├── MatrixMultiplicationTranslator.h
├── src/
│ ├── PIMInstructionGenerator.cpp
│ ├── MatrixMultiplicationTranslator.cpp
│ ├── main.cpp # Entry point
├── build/ # Compiled output
├── Makefile # Build automation
Matrix A:
1 2
3 4
Matrix B:
5 6
7 8
Matrix C:
19 22
43 50
- Clone the repository:
git clone https://github.com/your-username/PIMCompilerProject.git
- Navigate to the project directory:
cd PIMCompilerProject - Build the project:
make
- Run the executable:
./build/PIMCompilerProject
- Implement dynamic load balancing for better PE utilization.
- Optimize memory access patterns for reduced latency.
- Explore vectorization techniques for further acceleration.
This project is licensed under the MIT License. See the LICENSE file for details.