Menu

Is the CUDA backend really utilized

XapaJIaMnu
2014-08-07
2014-08-08
  • XapaJIaMnu

    XapaJIaMnu - 2014-08-07

    Hey,

    I compiled ViennaCL examples with "Enable EIGEN, ENABLE UBLAS, ENABLE CUDA". However examples such as blas1-cuda and blas3-cuda run fine and report successful tutorial completion even when my video card is off. When my video card is on I can see that there is memory copied to the device (By monitoring nvidia-settings), however the GPU utilization is 0%. I tested this with blas1-cuda blas3-cuda and interative-cuda.

    Looking at the source i can see code for memory allocation on the GPU, but I can't see any kernel functions being called. Am I missing something? How do I make ViennaCL use CUDA for calculations?

     
  • Karl Rupp

    Karl Rupp - 2014-08-07

    Hi,
    what do you mean by 'video card is off'? You do not need to have graphical output for the GPU in order to run CUDA kernels on it.

    As for monitoring nvidia-settings: The code in the tutorial intentionally uses small data sizes, thus most likely the kernel simply does not create enough load. Also, in the iterative-cuda example quite some time is usually spent in the construction of the preconditioners, which are mostly computed on the CPU due to their sequential nature. To verify that CUDA is indeed used, change BLAS3_MATRIX_SIZE in blas3.cu to something in the range of 4000, comment the matrix-matrix-product using ublas (it's too slow) and you will see a significant load on your GPU.

    Best regards,
    Karli

     
  • XapaJIaMnu

    XapaJIaMnu - 2014-08-08

    Hey,
    By "the gpu is off" i mean the gpu is physically turned off using bbswitch. In such situation modprobe nvidia results in:

    [root@adjudicator dheart]# modprobe nvidia
    modprobe: ERROR: could not insert 'nvidia': No such device

    I will try the blas3 thing in a bit.

    Cheers,

    Nick

    EDIT: After recompilation all -cuda functions fail when the device is off, strange... Problem solved anyways.

     

    Last edit: XapaJIaMnu 2014-08-08

Log in to post a comment.