Giter Club home page Giter Club logo

cnmem's Introduction

CNMeM Library

Simple library to help the Deep Learning frameworks manage CUDA memory.

CNMeM is not intended to be a general purpose memory management library. It was designed as a simple tool for applications which work on a limited number of large memory buffers.

CNMeM is mostly developed on Ubuntu Linux. It should support other operating systems as well. If you encounter an issue with the library on other operating systems, please submit a bug (or a fix).

Prerequisites

CNMeM relies on the CUDA toolkit. It uses C++ STL and the Pthread library on Linux. On Windows, it uses the native Win32 threading library. The build system uses CMake. The unit tests are written using Google tests (but are not mandatory).

CUDA

The CUDA toolkit is required. We recommend using CUDA >= 7.0 even if earlier versions will work.

  • Download from the CUDA website
  • Follow the installation instructions
  • Don't forget to set your path. For example:
    • CUDA_HOME=/usr/local/cuda
    • LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH

Build CNMeM

Grab the source

% cd $HOME
% git clone https://github.com/NVIDIA/cnmem.git cnmem

Build CNMeM without the unit tests

% cd cnmem
% mkdir build
% cd build
% cmake ..
% make

Build CNMeM with the unit tests

To build the tests, you need to add an extra option to the cmake command.

% cd cnmem
% mkdir build
% cd build
% cmake -DWITH_TESTS=True ..
% make

Link with CNMeM

The source folder contains a header file 'include/cnmem.h' and the build directory contains the library 'libcnmem.so', 'cnmem.lib/cnmem.dll' or 'libcnmem.dylib', depending on your operating system.

cnmem's People

Contributors

jdemouth avatar nouiz avatar lukeyeager avatar

Watchers

zsf 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.