aboutsummaryrefslogblamecommitdiff
path: root/README.rst
blob: 1aa0775e3420987ada87578a202c525765154fb9 (plain) (tree)































































                                                                                                                      
NERV Toolkit
============

NOTE: This readme is in-progress.

Installation
------------
First, make sure you have at least one implementation of BLAS and CUDA installed
on your computer.

- Checkout NERV:
  
  ::

    bash
    git clone https://speechlab.sjtu.edu.cn/gitlab/Nerv-SJTU/nerv.git

- Checkout submodules (luajit, luarocks, Penlight, etc.):

  ::

    cd nerv
    git submodule init && git submodule update

- Build NERV: you can specify either ``mkl`` or ``atlas`` to ``BLAS_TYPE``.
  ``BLAS_BASE`` is the directory containing BLAS ``.so`` files. By default,
  ``atlas`` is used for ``BLAS_TYPE``, ``/usr/lib/`` is used for ``BLAS_BASE``,
  and ``/usr/local/cuda`` is used for ``CUDA_BASE``.

  ::

    # an example for compiling on SJTU Speechlab major cluster
    make BLAS_TYPE=mkl BLAS_BASE=/home/intel/mkl/lib/intel64/ CUDA_BASE=/usr/lib/cuda

- To include some new features (e.g. ``atomicCAS`` in CUDA), add corresponding flags to
  ``NERV_FEAT`` (e.g. ``NERV_FEAT=-D__NERV_FUTURE_CUDA_7``) while making:

  ::

    make NERV_FEAT=-D__NERV_FUTURE_CUDA_7 BLAS_TYPE=mkl BLAS_BASE=/home/intel/mkl/lib/intel64/ CUDA_BASE=/usr/lib/cuda

- For speech tasks, you need to install related lua rocks (Lua packages):

  ::

    # checkout speech repository to local directory nerv/speech (suppose you're
    # still at the root directory of NERV repo)
    git clone https://speechlab.sjtu.edu.cn/gitlab/Nerv-SJTU/nerv-speech.git speech
    # build and install HTK I/O support, Kaldi I/O support, Kaldi decoding support, etc.
    make speech

Example & Tutorial
------------------
For speech tasks, please refer to ``tutorial/`` in ``nerv-speech`` repository.

Contribution
------------
The basic rule is simple: just fork the original repository, then create a pull
request (merge request) to the administrator of the project. If you want to fix
any bugs in existing code, don't hesitate to create a pull (merge) request to
the repository with clear and detailed analysis of the problem. If you want to
add additional task-specific functionalities (modules) for speech to NERV,
please create a luarocks-compliant package and also a pull (merge) request to
the ``nerv-speech`` repository instead of ``nerv``.