Giter VIP home page Giter VIP logo

gpurcuda's Introduction

gpuRcuda: The Simple CUDA GPU Interface for R

Travis-CI Build Status

Test coverage: Coverage Status

Welcome to gpuRcuda! This package is designed to be an extension upon the more general gpuR package. Essentially, this package creates a new series of classes that mirror those from gpuR classes. The key aspect of this package is to allow the user to use a CUDA backend where the NVIDIA specific language will improve overall performance.

The syntax is designed to be identical to gpuR

ORDER <- 1024
A <- matrix(rnorm(ORDER^2), nrow=ORDER)
B <- matrix(rnorm(ORDER^2), nrow=ORDER)
gpuA <- cudaMatrix(A, type="double")
gpuB <- cudaMatrix(B, type="double")

C <- A %*% B
gpuC <- gpuA %*% gpuB

all(C == gpuC)
[1] TRUE

Dependencies

  1. opencl-headers (shared library)
  2. NVIDIA Drivers & SDK

NVIDIA Driver and CUDA/OpenCL

Up-to-date Card

If you are fortunate enough to have a very recent card that you can use the most recent drivers. THis install is much more simple

# Install Boost & OpenCL headers
sudo apt-get install opencl-headers

# Install NVIDIA Drivers and CUDA
sudo add-apt-repository -y ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-346 nvidia-settings
sudo apt-get install cuda

Older Card

If you have an older card that doesn't support the newest drivers:

  1. Purge any existing nvidia and cuda implementations (sudo apt-get purge cuda* nvidia-*)
  2. Download appropriate CUDA toolkit for the specific card. You can figure this out by first checking which NVIDIA driver is compatible with your card by searching for it in NVIDIA's Driver Downloads. Then check which cuda toolkit is compatible with the driver from this Backward Compatibility Table Let's say the cuda-6.5 toolkit was appropriate, which you can download from the CUDA toolkit archive. Once downloaded, run the .run file.
  3. Reboot computer
  4. Switch to ttyl (Ctrl-Alt-F1)
  5. Stop the X server (sudo stop lightdm)
  6. Run the cuda run file (sh cuda_6.5.14_linux_64.run)
  7. Select 'yes' and accept all defaults
  8. Required reboot
  9. Switch to ttyl, stop X server and run the cuda run file again and select 'yes' and default for everything (including the driver again)
  10. Update PATH to include /usr/local/cuda-6.5/bin and LD_LIBRARY_PATH to include /usr/local/cuda-6.5/lib64
  11. Reboot again

gpurcuda's People

Contributors

cdeterman avatar

Watchers

James Cloos avatar Beibei 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.