/primitiv

A Neural Network Toolkit.

Primary LanguageC++Apache License 2.0Apache-2.0

c++ backend os license Build Status (master) Build Status (develop)

primitiv

A Neural Network Toolkit.

Features

  • Dynamic and incremental graph construction (a.k.a. "define-by-run" style)
  • On-demand memory allocation
  • Automatic minibatch broadcasting
  • Mostly device-independent
  • Simple usage

Languages

This repository contains only the core C++ library of primitiv. Some bindings for other programming languages (e.g., Python) can be found in the official repository.

Prerequisites

  • CMake 3.1.0 or later
  • C++11 compiler (GCC, Clang)
  • (optional) Google Test
    • Required only when -DPRIMITIV_BUILD_TESTS=ON.
  • (optional) CUDA 7.5 or later
    • Required only when -DPRIMITIV_USE_CUDA=ON
  • (optional) OpenCL 1.2/OpenCL C++ binding v2
    • Required only when -DPRIMITIV_USE_OPENCL=ON

Install

git clone <this repository>
cd primitiv
mkdir build
cd build
cmake .. [-D(Options you need)]
make [-j <threads>]
[make test]
[make install]

Building Options

  • PRIMITIV_BUILD_STATIC_LIBRARY (default=OFF)
    • Builds a static library instead of a shared object.
  • PRIMITIV_BUILD_TESTS (default=OFF)
    • Builds test binaries and generates make test command.
  • PRIMITIV_BUILD_TESTS_PROBABILISTIC (default=OFF)
    • Builds test cases that probabilistically fails.
  • PRIMITIV_GTEST_SOURCE_DIR (default="")
    • Specifies the source directory of Google Test. If you want to use googletest module provided from Debian/Ubuntu repository, add -DPRIMITIV_GTEST_SOURCE_DIR=/usr/src/googletest/googletest together with -PRIMITIV_BUILD_TESTS=ON option.
  • PRIMITIV_USE_CACHE (default=OFF)
    • Whether or not to use cached values to prevent increasing computation amount.
    • Libraries built with this flag will tend to consume more memory.
  • PRIMITIV_USE_CUDA (default=OFF)
    • Enables CUDA backend (devices::CUDA class).
  • PRIMITIV_USE_OPENCL (default=OFF)
    • Enables OpenCL backend(devices::OpenCL class).
  • Other available options:

Usage

Contact

This project is supported by ASTREC in NICT.