Skip to content

GPU Implementation of the mSTAMP (STOMP) algorithm for computing the multi-dimensional matrix profile

License

Notifications You must be signed in to change notification settings

alvaroslm/mSTOMP-GPU

 
 

Repository files navigation

mSTOMP-GPU

This is a GPU implementation of the mSTAMP STOMP algorithm. mSTOMP takes multiple time series as input and computes the matrix profile for a particular window size and number of dimensions. You can read more at the Matrix Profile Homepage The dimensions are read from the input file one after another. The output is done as comma-separated values; for k=1..ndim dimensions each column is the matrix profile

  • Test run with example data (taken from the mSTAMP toy data sample): mSTOMP-GPU.exe 3 30 toy_data30.txt 3 toy_out.txt toy_outi.txt

For additional features and better performance you should use SCAMP (doesn't support multi-STAMP)

Environment

This base project requires:

  • At least version 9.0 of the CUDA toolkit available here.
  • An NVIDIA GPU with CUDA support is also required. You can find a list of CUDA compatible GPUs here
  • Currently builds under linux with the Makefile.
  • Should compile under windows, but untested.

Usage

  • Edit the Makefile

    • Volta is supported by default, but if needed set the value of ARCH to correspond to the compute capability of your GPU.
      • "-gencode=arch=compute_code,code=sm_code" where code corresponds to the compute capability or arch you wish to add.
    • Make sure CUDA_DIRECTORY corresponds to the location where cuda is installed on your system. This is usually /usr/local/cuda-(VERSION)/ on linux
    • Also, by default the kernel parameters are optimized for volta only, if you are building for Pascal or earlier, please tune the variables TILE_HEIGHT_ADJUSTMENT and UNROLL_COUNT in STOMP.cu accordingly
    • Some suggested parameters for different architectures are provided in the comments
  • make

  • STOMP window_size input_file_path output_matrix_profile_path output_indexes_path (Optional: list of device numbers that you want to run on)

  • Example:

  • STOMP 1024 SampleInput/randomlist128K.txt profile.txt index.txt 0 2

  • By default, if no devices are specified, STOMP will run on all available devices

  • There are Visual Studio 2013 project files for CUDA 9 included

About

GPU Implementation of the mSTAMP (STOMP) algorithm for computing the multi-dimensional matrix profile

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Cuda 90.5%
  • C++ 5.7%
  • Makefile 3.0%
  • Python 0.8%