Coder Social home page Coder Social logo

cmu-safari / impica Goto Github PK

View Code? Open in Web Editor NEW
43.0 7.0 24.0 353.06 MB

This is a processing-in-memory simulator which models 3D-stacked memory within gem5. Also includes the workloads used for IMPICA (In-Memory PoInter Chasing Accelerator), an ICCD 2016 paper by Hsieh et al. at https://users.ece.cmu.edu/~omutlu/pub/in-memory-pointer-chasing-accelerator_iccd16.pdf

Python 0.50% Shell 0.04% C 84.76% C++ 12.91% Makefile 0.19% CMake 0.01% M4 0.01% HTML 0.02% Visual Basic 0.01% Protocol Buffer 0.01% Assembly 1.28% Perl 0.08% Emacs Lisp 0.01% Java 0.01% Objective-C 0.19% Awk 0.01% GDB 0.01% SourcePawn 0.01% Yacc 0.01% Lex 0.01%

impica's Introduction

IMPICA (In-Memory PoInter Chasing Accelerator)

License

This repo consists of the simulator and the workloads for IMPICA (In-Memory PoInter Chasing Accelerator), an ICCD 2016 paper.

Folder structure

gem5: The main gem5-based simulator.

linux-aarch64-gem5-20140821: The Linux kernel code.

pim_driver: The Linux kernel driver for IMPICA.

workloads: The evaluated workloads.

System prerequisites

The system needs to be able to build gem5 and the Linux kernel for ARM. Please refer to:

http://www.gem5.org/Dependencies
https://wiki.linaro.org/Resources/HowTo/KernelDeploy#A3_-_Build_the_Kernel

If using Ubuntu, the dependecies are

sudo apt-get install libncurses5-dev gcc make git exuberant-ctags bc libssl-dev python-dev scons m4 build-essential g++ swig zlib-dev

Build the simulator and driver

cd gem5
scons -j8 PIM_DEVICE=btree build/ARM.gem5.opt

cd linux-aarch64-gem5-20140821
make menuconfig
make dep
make -j

cd pim_driver
make

The PIM_DEVICE can be btree, hash_table, or link_list. It needs to match the workload.

Prepare the disk image

Get the full-system files for 64-bit ARM at

http://www.gem5.org/dist/current/arm/aarch-system-2014-10.tar.xz

Follow the tutorial to prepare the disk image.

http://gem5.org/Ubuntu_Disk_Image_for_ARM_Full_System

This is an example to put the driver (pim_driver) and workloads into the disk image.

mount -oloop,offset=32256 aarch64-ubuntu-trusty-headless.img /mnt
cp -r pim_driver /mnt/home/
cp -r workloads /mnt/home/
mount -o bind /proc /mnt/proc
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
cp /etc/resolv.conf /mnt/etc/
chroot .

Then go to the subdirectory of the workload and make it. Please remember to umount the image before running the simulator.

Run the simulator

cd gem5
M5_PATH=/path/to/full/system/ ./build/ARM/gem5.opt configs/example/fs.py --machine-type=VExpress_EMM64 -n 4 --mem-size=2048MB --disk-image=aarch64-ubuntu-trusty-headless.img --dtb-file=/path/to/full/system/binaries/vexpress.aarch64.20140821.dtb --kernel=/path/to/full/system/binaries/vmlinux.aarch64.20140821 

Open another terminal

cd gem5/util/term
make
m5 localhost 3456

Wait until the booting finishes, and login as root

You can make a checkpoint so you don't have to run the boot-up everytime

m5 checkpoint 

Install the driver in the simulator

cd /path/to/pim_driver
./go_test.sh

Now you can run the workload. All workloads make a checkpoint after initialization so you can resume the detailed (cycle accurate) simulation from that checkpoint. Assuming the second checkpoint is the one after workload initialization. For example, a detailed simulation can be executed as:

cd gem5
M5_PATH=/path/to/full/system/ --redirect-stdout --redirect-stderr --outdir=/path/to/output ./build/ARM/gem5.opt configs/example/fs.py --machine-type=VExpress_EMM64 -n 4 --mem-size=2048MB --disk-image=aarch64-ubuntu-trusty-headless.img --dtb-file=/path/to/full/system/binaries/vexpress.aarch64.20140821.dtb --kernel=/path/to/full/system/binaries/vmlinux.aarch64.20140821 -r 2 --checkpoint-dir=/path/to/checkpoints --caches --l2cache --cpu-type=detailed --ioc_size=32kB --ioc_lat=1 --pim_tlb_num=32 --l2_size=1MB --l1d_size=32kB

Reference Paper

Kevin Hsieh, Samira Khan, Nandita Vijaykumar, Kevin K. Chang, Amirali Boroumand, Saugata Ghose, and Onur Mutlu, Accelerating Pointer Chasing in 3D-Stacked Memory: Challenges, Mechanisms, Evaluation. In Proceedings of the 34th IEEE International Conference on Computer Design (ICCD), Phoenix, AZ, USA, October 2016.

impica's People

Contributors

kevinhsieh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

impica's Issues

too many arguments to function ‘get_user_pages’

Hi,
When I'm trying to do make in the pim-driver I'm getting this error. I tried a few online approaches but doesn't match this criteria , most of the solutions were related to Nvidia drivers. Can anyone please help with this issue.
" error: too many arguments to function ‘get_user_pages’"

Thank You

Could please tell me the the linux and the gcc version you uesd?

I'm using ubuntu14.04 and gcc4.8
And I loaded ./arch/arm64/configs/gem5_defconfig when I use make menuconfig. then I make install
Then I 'make' in pim_driver and I'm suffering lots of errors, like can't find asm/types.h
Could you please help me, thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.