Giter Club home page Giter Club logo

cuml's Introduction

 cuML - RAPIDS Machine Learning Algorithms

Machine learning is a fundamental capability of RAPIDS. cuML is a suite of libraries that implements a machine learning algorithms within the RAPIDS data science ecosystem. cuML enables data scientists, researchers, and software engineers to run traditional ML tasks on GPUs without going into the details of CUDA programming.

The cuML repository contains:

  1. python: Python based GPU Dataframe (GDF) machine learning package that takes cuDF dataframes as input. cuML connects the data to C++/CUDA based cuML and ml-prims libraries without ever leaving GPU memory.

  2. cuML: C++/CUDA machine learning algorithms. This library currently includes the following six algorithms; a) Single GPU Truncated Singular Value Decomposition (tSVD), b) Single GPU Principal Component Analysis (PCA), c) Single GPU Density-based Spatial Clustering of Applications with Noise (DBSCAN), d) Single GPU Kalman Filtering, e) Multi-GPU K-Means Clustering, f) Multi-GPU K-Nearest Neighbors (Uses Faiss).

  3. ml-prims: Low level machine learning primitives used in cuML. ml-prims is comprised of the following components; a) Linear Algebra, b) Statistics, c) Basic Matrix Operations, d) Distance Functions, e) Random Number Generation.

Available Algorithms:

  • Truncated Singular Value Decomposition (tSVD).

  • Principal Component Analysis (PCA).

  • Density-based spatial clustering of applications with noise (DBSCAN).

  • K-Means Clustering.

  • K-Nearest Neighbors (Requires Faiss installation to use).

Upcoming algorithms:

  • Kalman Filter.

More ML algorithms in cuML and more ML primitives in ml-prims are being added currently. Example notebooks are provided in the python folder to test the functionality and performance. Goals for future versions include more algorithms and multi-gpu versions of the algorithms and primitives.

The installation option provided currently consists on building from source. Upcoming versions will add pip and conda options, along docker containers. They will be available in the coming weeks.

Setup

cuML is available from the rapidsai conda channel:

conda install -c nvidia -c rapidsai -c conda-forge -c pytorch -c defaults cuml

Dependencies for Installing/Building from Source:

To install cuML from source, ensure the dependencies are met:

  1. cuDF (>=0.3.0)
  2. zlib
  3. cmake (>= 3.8, version 3.11.4 or 3.12.4 is recommended)
  4. CUDA (>= 9.2)
  5. Cython (>= 0.28)
  6. gcc (>=5.4.0)
  7. faiss-gpu (>=1.4.0) - To install with conda: conda install -c pytorch faiss-gpu

Installing from Source:

Once dependencies are present, follow the steps below:

  1. Clone the repository.
$ git clone --recurse-submodules https://github.com/rapidsai/cuml.git
  1. Build and install libcuml (the C++/CUDA library containing the cuML algorithms), starting from the repository root folder:
$ cd cuML
$ mkdir build
$ cd build
$ cmake ..

Note: if using a conda environment (recommended currently), then cmake can be configured appropriately via:

$ cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
  1. Build libcuml:
$ make -j
$ make install

To run tests (optional):

$ ./ml_test

If you want a list of the available tests:

$ ./ml_test --gtest_list_tests
  1. Build the cuml python package:
$ cd ../../python
$ python setup.py build_ext --inplace

To run Python tests (optional):

$ py.test cuML/test -v

If you want a list of the available tests:

$ py.test cuML/test --collect-only
  1. Finally, install the Python package to your Python path:
$ python setup.py install

Python Notebooks

Demo notebooks can be found in python/notebooks folder.

External

The external folders contains submodules that this project in-turn depends on. Appropriate location flags will be automatically populated in the main CMakeLists.txt file for these.

Current external submodules are:

Contributing

Please use issues and pull requests to report bugs and add functionality.

Contact

Find out more details on the RAPIDS site

Open GPU Data Science

The RAPIDS suite of open source software libraries aim to enable execution of end-to-end data science and analytics pipelines entirely on GPUs. It relies on NVIDIA® CUDA® primitives for low-level compute optimization, but exposing that GPU parallelism and high-bandwidth memory speed through user-friendly Python interfaces.

cuml's People

Contributors

burlachenkok avatar dantegd avatar erjanmx avatar mike-wendt avatar oyilmaz-nvidia avatar randerzander avatar raydouglass avatar rongou avatar teju85 avatar

Watchers

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