Giter Club home page Giter Club logo

lailachitra / vampire Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cmu-safari/vampire

0.0 0.0 0.0 484 KB

An open-source DRAM power model based on extensive experimental characterization of real DRAM modules. Described in the SIGMETRICS 2018 paper by Ghose et al. (https://people.inf.ethz.ch/omutlu/pub/VAMPIRE-DRAM-power-characterization-and-modeling_sigmetrics18_pomacs18.pdf)

License: MIT License

Shell 0.66% C++ 88.29% Python 10.17% Makefile 0.88%

vampire's Introduction

VAMPIRE

VAMPIRE (Variation-Aware model of Memory Power Informed by Real Experiments) is an open-source DRAM power model based on an extensive experimental characterization of the power consumption of real DRAM modules. VAMPIRE can operate on any trace that is generated in the DRAMPower format, and is compatible with widely-used memory simulators such as Ramulator and DRAMSim2.

Current version: 1.1.0 (released March 1, 2019)

Key Features

VAMPIRE includes the following major features that are not included in prior DRAM power modeling tools:

  • typical-case power consumption values (as opposed to worst-case power consumption)
  • data-dependent power consumption behavior
  • the impact structural variation within a module on power consumption
  • power consumption models based on extensive data collected from DRAM modules by three major vendors

For more information, please read our paper:

S. Ghose, A. G. Yağlıkçı, R. Gupta, D. Lee, K. Kudrolli, W. X. Liu, H. Hassan, K. K. Chang, N. Chatterjee, A. Agrawal, M. O'Connor, O. Mutlu. "What Your DRAM Power Models Are Not Telling You: Lessons from a Detailed Experimental Study". In Proceedings of the ACM International Conference on Measurement and Modeling of Computer Systems (SIGMETRICS), June 2018. In Proceedings of the ACM on Measurement and Analysis of Computing Systems (POMACS), Vol. 2, No. 3, December 2018.

Using VAMPIRE

Building the VAMPIRE Executable

make -j

Note: VAMPIRE currently requires a C++11 compiler (e.g., clang++, g++-5).

Running tests

VAMPIRE includes some inbuilt test to verify functional correctness, however, please note that these tests do not cover 100% of the functionalities.

make tests

On a successful run make will exit will code 0

Generating an Input Trace File

VAMPIRE requires an input file that contains a trace (i.e., list) of DDR3 DRAM commands. This can take one of two formats:

  1. Binary
  2. ASCII (compatible with DRAMPower trace format)

Binary Trace Format

<64-bit timestamp of current cycle><31 bits of zero padding><command type (3 bits)><channel ID (2 bits)><rank ID (2 bits)><bank ID (3 bits)><row ID (16 bits)><column number (7 bits)>[<64-byte data value; optional, for reads and writes only>]

Valid values for the command type (in binary) are:

  1. 000: RD
  2. 001: WR
  3. 010: ACT
  4. 011: PRE
  5. 100: RDA
  6. 101: WRA

ASCII Trace Format

<timestamp (i.e., current cycle)>,<command>,<bank>[,row/col][,<data>]

NOTES:

  1. ACT commands require a row number while I/O commands (RD, RDA, WR and WRA) require a column number.
  2. Certain data dependency models require data for corresponding I/O command (e.g. for WR and WRA with WR data dependency model).

Generating Random Binary Test Traces Using traceGen

./traceGen 10000

This generates a number of trace files with 10000 random requests in each trace file.

Running VAMPIRE

./vampire -f <file_name> -c <config_file> -d {MEAN|DIST|WR|RD_WR} -p {BINARY|ASCII} [-v {A|B|C|Cust}] [-s] [-dramSpec <dramspec_file>]

Required Command-Line Arguments

   -f <trace_filename>                 Trace file to parse
   -c <config_filename>                Configuration file
   -d {MEAN|DIST|WR|RD_WR}             Data dependency model
   -p {BINARY|ASCII}                   Parsing format to use for trace file

Optional Command-Line Arguments

   -v {A|B|C|Cust}                     Vendor to perform power calculations for (default: A; see the paper for more information). 
                                       Cust vendor requires an additional dramspec file, specified using -dramSpec option.
   -dramSpec <dramspec_file>           Specifies DRAM specifications for calculations, required for Cust vendor type (An example in dramSpec/example.cfg).
   -s                                  Enables structural variation modeling (default: disabled).
   -csv <csv_filename>                 Specifies filename for VAMPIRE to write stats as csv to. If the file exists, it is overwritten else a new file is 
                                       created.               

Data Dependency Models

  1. MEAN: VAMPIRE assumes that all read and write requests consume a mean energy value. The energy of each read/write request is based on the mean number of ones in a 64-byte cache line for your application. The mean number of ones is read from the configuration file. The input trace should not contain any data values for read or write requests.
  2. DIST: VAMPIRE assumes that the energy consumed by the read and write requests follows a distribution based on the number of ones in all cache lines. The energy of each read/write request is selected to fit the distribution of cache lines based on the number of ones in each 64-byte line. The distribution is read from the configuration file. The input trace should not contain any data values for read or write requests.
  3. WR: VAMPIRE models the energy consumed by reads and writes based on the actual data value used by the application. In this model, VAMPIRE allocates a memory data block, where the current data value of each line is stored in the simulator. The data value for each write request is read directly from the trace file, and the data value for each read request is determined from the memory data block. The input trace should contain data values for write requests, but not for read requests. (Note: this model requires a large amount of RAM on your system to model all of the memory data.)
  4. RD_WR: VAMPIRE models the energy consumed by reads and writes based on the actual data value used by the application. In this model, VAMPIRE does not need to allocate a memory data block. The data value for each read/write request is read directly from the trace file. The input trace should contain data values for both read and write requests. (Note: unlike the WR model, this model does not consume a large amount of RAM.)

Example

The following command uses the RD_WR data dependency model, a compatible RD_WR binary trace generated by traceGen, the default configuration file (configs/default.cfg), and Vendor B to estimate energy.

./vampire -f ./trace_rd_wr_t.bin -v B -c configs/default.cfg -d RD_WR

Piping Commands to VAMPIRE

VAMPIRE supports reading trace commands from a pipe (/dev/stdin) instead of a trace file, allowing VAMPIRE to process the commands as they are fed. To read input from a pipe, use /dev/stdin as the input trace file (option -f) and pipe the commands to VAMPIRE binary.

cat sample_vampire_trace.trace | ./vampire -f /dev/stdin [options]

Summary of VAMPIRE Execution Flow

A short description of the execution flow of VAMPIRE through the source code is available here.

Maintainers

VAMPIRE is maintained by the SAFARI Research Group at Carnegie Mellon University and ETH Zürich.

Contributors include:

  • Raghav Gupta
  • Suyash Mahar
  • Sumit Kumar Yadav
  • Saugata Ghose
  • A. Giray Yağlıkçı

VAMPIRE is released under the MIT License.

vampire's People

Contributors

saugataghose avatar suyashmahar avatar

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.