Code Monkey home page Code Monkey logo

cuda-preemption's Introduction

CUDA Preemption Experiments

Introduction

This set of experiments are designed to test how kernels behave when preempted. To test this we use CUDA streams with priority and cuda events to synchronize between streams.

How to use this repository

There are a number of experiments in this repository. Compile all of them at once by running make in the root directory. Each experiment can be compiled individually by cding to the experiment directory and running make.

Experiments

  1. one-stream

We create one low-priority stream and one high-priority stream. The low-priority stream and high-priority stream first run separately and we time them using cuda events. Then, the low-priority stream is launched first and the high-priority stream is launched after, preempting it.

  1. n-streams

We launch n low-priority background kernels and 1 high-priority kernel. This experiment proceeds similarly to the one-stream experiment.

  1. priority-interrupt

We launch one long-running, low-priority kernel and preempt it n consecutive times with a high-priority kernel. We measure the runtime of all kernels.

  1. priority-streams

We create n streams and launch n/m kernels with each of the m stream priority levels. On current architectures m=2 so this experiment is not that interesting.

Other files

common includes helper functions from the NVIDIA CUDA Samples.

Note

To obtain more precise timing measurements, use nvprof or the NVIDIA Visual Profiler.

This experiment was created by modifying the NVIDIA CUDA StreamPriorities sample code.

cuda-preemption's People

Contributors

vancemiller avatar

Watchers

 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.