Giter Club home page Giter Club logo

goro's Introduction

Managing Prefetchers with Deep Reinforcement Learning

We aim to reduce contention caused by multiple aggressive prefetchers on shared resources (e.g., LLC and memory bandwidth) with a multi-agent reinforcement learning scheme. The agent finds what prefetchers to use and determines how aggressive they should be at any time during the execution.

Goro

There is one shared network and one branch per prefetcher in the system. In our system, there are two prefetchers per L1, two prefetchers per L2, and three prefetchers in L3. We use features (hardware counters) to form the state of the system. We take features from both caches and cores. To determine the prefetcher’s configuration, we forward-propagate the state into the network and obtain the configuration of each prefetcher.

Action Branching Architecture

Platform

We extend gem5 to evaluate Goro. Figure below shows the overview of our platform. We run simulations in parallel and communicate states and actions to a single server process. The server has three threads running: (1) Thread Action: a thread that receives a state from any running simulation, performs inference, and returns the action to the simulator; (2) Thread Fill: a thread that receives a tuple of < state;nextstate;action; reward > from any running simulation and inserts it to the Replay Buffer; and (3) Thread Train: a thread that at a reconfigurable interval picks a batch from the replay buffer and performs a typical deep learning training. The server uses PyTorch to implement the networks and performs the training.

In gem5, we devise a simple interface to read out any counters. The interface takes two inputs: (1) epoch length in terms of instruction counts; and (2) gem5 component and counter’s names that we are interested in reading (e.g., L1 miss rate). The interface then runs the simulation based on the action obtained from the Thread Action for the epoch length, stops the simulation when the epoch is finished, returns the counters to the Thread Fill, and resumes the simulation with the new actions (a.k.a new prefetcher’s configuration). This loop continues until the simulation is over.

Extended gem5 to support Goro

Citation

If you find this open-source release useful, please reference in your paper:

@inproceedings{jalili2022Goro,
  title={Managing Prefetchers with Deep Reinforcement Learning},
  author={Jalili, Majid and Erez, Mattan},
  year={2022}
}

goro's People

Contributors

majid0jalili avatar

Stargazers

 avatar CacheL1ne avatar  avatar

Forkers

trellixvulnteam

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.