NVlabs/rdir

Name: rdir

Owner: NVIDIA Research Projects

Description: RDIR Compiler Plug-in

Created: 2015-10-13 14:11:52.0

Updated: 2017-11-19 03:56:51.0

Pushed: 2015-10-13 20:44:38.0

Homepage: null

Size: 164

Language: Perl

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

RDIR Compiler Plug-in

 is a dataflow intermediate representation for optimizing
ilers for parallel programming models. This compiler plug-in adds
 support to Regent, a compiler for task-based parallel programs,
 a translator (both AST->RDIR and RDIR->AST) and a number of
le optimizations which demonstrate how to use the plug-in.

Links

Installation

Install LLVM *with headers*. (Tested with LLVM 3.5.)
Download and install Regent:

    git clone https://github.com/StanfordLegion/legion.git
    cd legion/language
    git checkout -b rdir regent-0.0
    ./install.py --debug
    export REGENT=$PWD

Note: In some cases, Terra may fail to auto-detect CUDA. If so
(and assuming you want to use CUDA), recompile Terra with CUDA
enabled.

    cd terra
    make clean
    CUDA_HOME=.../path/to/cuda ENABLE_CUDA=1 make

Install RDIR plug-in:

    git clone .../rdir.git
    cd rdir
    cp -r plugin/src $REGENT

Usage

following test is included which exercises the optimizations
uded with RDIR. Both CPU and GPU code paths should be
ing. (GPUs are enabled with the flag -ll:gpu N where N is the
er of GPUs to use.)

ing the following commands will produce output reporting bandwidth
compute throughput on a simple streaming benchmark. In general,
 and inc2 should achieve roughly the same bandwidth. When the RDIR
mizations are functioning propertly, inc2 will achieve 2x the
ute throughput as inc1 (due to loop and task fusion).

$REGENT/regent.py examples/inc.rg -fcuda 1 -ll:csize 4096
$REGENT/regent.py examples/inc.rg -fcuda 1 -ll:gpu 1 -ll:csize 4096 -ll:fsize 4096

Open Source License

yright (c) 2015, NVIDIA CORPORATION. All rights reserved.

istribution and use in source and binary forms, with or without
ification, are permitted provided that the following conditions
 met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
Neither the name of NVIDIA CORPORATION nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

S SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
RESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
LIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
POSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
TRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
MPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
CUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
FITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.