Skip to content

champloo2878/CIM-Tuner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CIM-Tuner: Balancing the Compute and Storage Capacity of SRAM-CIM Accelerator via Hardware-mapping Co-exploration

This repository consists of:

  • CIMMA-Compiler (C-based bottom-level compiler)
  • Simulator (Python-based top-level simulator)

System Environments

  • Ubuntu 22.04
  • gcc 11.4.0
  • python 3.12.4

1. CIMMA-Compiler Setup

Compilation Steps

  1. Navigate to the compiler directory:
cd ./evacim/CIMMA_Compiler
  1. Compile the C program:
make

Testing & Verification

  • Run the test script to validate compilation:
python3 try.py

Instruction Visualization

  1. Enable instruction writing in compiler_count.c:
#define WRITE_INST 1
  1. Recompile and run:
make
python3 try.py

Compiled instructions will be saved to ./Result/inst.txt.

Note: For speed during top-level simulations, disable visualization by setting WRITE_INST to 0.


2. Simulator and Evaluation Setup

Basic Operation

Return to the root directory:

cd ../..

Run a single accelerator operation:

python3 -m evacim.sim \
    --cim ./cim_config/FPCIM@ISSCC23.cfg \
    --para 25.6 2 2 16 128 64 \
    --operator 256 512 256 \
    --dataflow R_WP_PF

Parameter Reference

View all parameter options:

python3 -m evacim.sim --help

Full Model Evaluation

Run an end-to-end evaluation:

python3 -m evacim.sw_func \
    --cim ./cim_config/FPCIM@ISSCC23.cfg \
    --paras 25.6 2 2 16 64 64 \
    --model nn_config/bert_base_sl64.csv \
    --target th

3. Hardware-Mapping Co-exploration

Operator-Level Exploration

python3 -m experiments.cim_sa_gli

This script explores the accelerator architecture of FPCIM@ISSCC23 under fixed operator and dataflow. The optimal target is throughput and area constraint is 5 mm^2. The annealing progress is shown: Single Operator SA

Network-Level Exploration

python3 -m experiments.cim_sa_model

This script explores both the architecture and mapping strategies of FPCIM based accelerator on Bert_base. The optimal target is energy efficiency and area constraint is 5 mm^2. For other configurations, directly revise the script. The example annealing is shown: Model SA

Additional Experiments

  • View all paper experiments in ./experiments
  • Access result visualizations in ./plot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors