Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 #define _CUDA_NDARRAY_C
- 2
- 3 #include <Python.h>
- 4 #include <structmember.h>
- 5
- 6 #include <numpy/arrayobject.h>
- 7 #include <iostream>
- 8
- 9 #include "cuda_ndarray.cuh"
- [...]
- 4490 {
- 4491 fprintf(fd, "CudaNdarray <%p, %p> nd=%i dev_structure_fresh=%d data_allocated=%d\n",
- 4492 self, self->devdata, self->nd, self->dev_structure_fresh, self->data_allocated);
- 4493 fprintf(fd, "\tHOST_DIMS: ");
- 4494 for (int i = 0; i < self->nd; ++i)
- 4495 {
- 4496 fprintf(fd, "%i\t", CudaNdarray_HOST_DIMS(self)[i]);
- 4497 }
- 4498 fprintf(fd, "\n\tHOST_STRIDES: ");
- 4499 for (int i = 0; i < self->nd; ++i)
- 4500 {
- 4501 fprintf(fd, "%i\t", CudaNdarray_HOST_STRIDES(self)[i]);
- 4502 }
- 4503
- 4504 if (self->dev_structure)
- 4505 {
- 4506 int data=0;
- 4507 fprintf(fd, "\n\tDEV_DIMS: ");
- 4508 for (int i = 0; i < self->nd; ++i)
- 4509 {
- 4510 cublasGetVector(1, sizeof(int),
- 4511 self->dev_structure+i, 1,
- 4512 &data, 1);
- 4513 fprintf(fd, "%i\t", data);
- 4514 }
- 4515 fprintf(fd, "\n\tDEV_STRIDES: ");
- 4516 for (int i = 0; i < self->nd; ++i)
- 4517 {
- 4518 cublasGetVector(1, sizeof(int),
- 4519 self->dev_structure + self->nd+i, 1,
- 4520 &data, 1);
- 4521 fprintf(fd, "%i \t", data);
- 4522 }
- 4523 fprintf(fd, "\n");
- 4524 }
- 4525 else
- 4526 {
- 4527 fprintf(fd, "\n\tdev_structure not allocated\n");
- 4528 }
- 4529 }
- 4530
- 4531 /*
- 4532 Local Variables:
- 4533 mode:c++
- 4534 c-basic-offset:4
- 4535 c-file-style:"stroustrup"
- 4536 indent-tabs-mode:nil
- 4537 fill-column:79
- 4538 End:
- 4539 */
- 4540 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=79 :
- 4541
- ===============================
- cc1plus: fatal error: cuda_runtime.h: No such file or directory
- compilation terminated.
- ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return status', 1, 'for cmd', 'nvcc -shared -g -O3 -m64 -Xcompiler -DCUDA_NDARRAY_CUH=bcb411d72e41f81f3deabfc6926d9728,-D NPY_ARRAY_ENSURECOPY=NPY_ENSURECOPY,-D NPY_ARRAY_ALIGNED=NPY_ALIGNED,-D NPY_ARRAY_WRITEABLE=NPY_WRITEABLE,-D NPY_ARRAY_UPDATE_ALL=NPY_UPDATE_ALL,-D NPY_ARRAY_C_CONTIGUOUS=NPY_C_CONTIGUOUS,-D NPY_ARRAY_F_CONTIGUOUS=NPY_F_CONTIGUOUS,-fPIC -Xlinker -rpath,/home/mthoma/.theano/compiledir_Linux-3.1.10-1.16-desktop-x86_64-with-SuSE-12.1-x86_64-x86_64-2.7.2/cuda_ndarray -Xlinker -rpath,/usr/local/cuda-5.0/lib -Xlinker -rpath,/usr/local/cuda-5.0/lib64 -I/usr/local/lib/python2.7/site-packages/Theano-0.6.0rc1-py2.7.egg/theano/sandbox/cuda -I/usr/local/lib/python2.7/site-packages/numpy-1.6.2-py2.7-linux-x86_64.egg/numpy/core/include -I/usr/include/python2.7 -o /home/mthoma/.theano/compiledir_Linux-3.1.10-1.16-desktop-x86_64-with-SuSE-12.1-x86_64-x86_64-2.7.2/cuda_ndarray/cuda_ndarray.so mod.cu -L/usr/local/cuda-5.0/lib -L/usr/local/cuda-5.0/lib64 -L/usr/lib64 -lpython2.7 -lcublas -lcudart')
- WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available
Add Comment
Please, Sign In to add comment