Skip to content
nouiz edited this page May 18, 2011 · 25 revisions

Goal of compyte

Make a common GPU ndarray(matrix/tensor or n dimensions) that can be reused by all project

WARNING

This is in early development. So all what you read is discutable. If you have idea send them to the mailing list!

Mailing list

Motivation

  • Currently there is at least 4 different gpu array in python
    • CudaNdarray(Theano), GPUArray(pycuda) and CUDAMatrix(cudamat), GPUArray(pyopencl), ...
    • There is even more if we include other language.
  • They are incompatible
    • None have the same properties and interface
  • All of them are a subset of numpy.ndarray on the gpu!

Lack of Standard Creates Problems

  • Duplicate work
    • GPU code is harder/slower to do correctly and fast than on the CPU/python
  • Harder to port/reuse code
  • Harder to find/distribute code
  • Divides development work

Pitfall to Avoid

  • Start alone
    • We need differnt people/groups to "adopt" the new GpuNdArray
  • Too simple - other projects won't adopt
  • Too general - other projects will implement "light" version... and not adopt
    • Having an easy way to convert/check conditions as numpy could alleviate this.

The option choosed is to have a general version with easy check/conversion to allow supporting only a subset!

Design Goals

  • Make it VERY similar to numpy.ndarray
    • Easier to attract other peole from python community
  • Have the base object in C to allow collaboration with more project.
    • We want people from C, C++, ruby, R, ... all use the same base Gpu ndarray.
  • Be compatible with CUDA and OpenCL

Current behavior not wanted

  • No CPU code generated from the python interface(for PyOpenCL and PyCUDA) Gpu code are ok.

First implementation

I will first implement the C and python backend to have it used in Theano and PyCUDA. Then it will be probably be PyOpenCL. If you are interrested to contribute to it, more could be done at the same time!

List of planned gpu operations.

Open question

  • Is it ok that the C interface include python header? Need the python library? numpy header?
Clone this wiki locally