My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

GMAC: Global Memory for ACcelerators

GMAC is a user-level library that implements an Asymmetric Distributed Shared Memory model to be used by CUDA programs. An ADSM model allows CPU code to access data hosted in accelerator (GPU) memory.

GMAC is being developed by the Operating System Group at the Universitat Politecnica de Catalunya and the IMPACT Research Group at the University of Illinois.

Supported Systems

  • Any GNU/Linux ia32 and amd64
  • Mac OS X (Snow Leopard 32-bit) Please, check this MacOs compilation procedure

Overview

Reduce the complexity of your code. GMAC transparently takes care of the consistency and coherency of the data both used in the CPU and in the GPU, so your code gets simpler and cleaner. This means that you only have to use a pointer per allocation to access data both in the CPU and the GPU.

Using GMAC

This is a quick-guide to start using GMAC. Please, read the documentation for examples and further information. If you need further information, please send an e-mail to the appropriate Google group:

  • ADSM Users: public group (anybody can send e-mails) to ask questions regarding how to use GMAC.
  • ADSM Developers: restricted group (ask for an invitation if you plan developing code for GMAC) to discuss about the development of new features in GMAC.

If you find a bug or you want to request a new feature, please use the Issues Tab and add a new issue filling the necessary fields.

Get the library

You can download pre-built Debian packages here.

Get the code

You can use the package tar.gz file from here or get the latest source code cloning the Mercurial repository

hg clone https://adsm.googlecode.com/hg/ adsm

Compile (using your favorite flags)

You need to create the configuration scripts and compile the source code. Additionally, you can also install the GMAC library in your system. The new build system is based on CMake, so you need to have CMake installed to compile GMAC.

cd adsm
mkdir build
cd build
../libgmac/configure
make all install

There are many configuration options for the configure script. The unified CPU / GPU virtual address space (i.e, use the same pointer in the CPU and GPU code) is not supported in NVIDIA Fermi GPUs. NVIDIA has done major changes to their driver that prevents our mechanism to work, we are working on a limited support of this feature for single-GPU systems that we will release as soon as possible. In the meantime, the configure scripts in these systems requires the --disable-mmap flag to work.

Use the GMAC API

These are the guidelines to port your CUDA code to GMAC:

  1. Use #include <gmac/cuda.h> instead of #include <cuda.h>
  2. Use gmacMalloc() instead of cudaMalloc() and gmacFree() instead of cudaFree()
  3. Use the device pointer in your CPU code
  4. Comment out any call to cudaMemcpy().
  5. Change any call to CUDA for the analogous GMAC call (e.g., cudaMemcpyToSymblol() -> gmacMemcpyToSymbol()

Your application is ready to use GMAC.

Documentation

Documentation can be found in our Wiki

Powered by Google Project Hosting