Comments (5)
Sounds very strange. I don't see how this can compile as Objective C. What errors do you get when executing the Makefile with a C++ compiler?
from cudarray.
Sorry, pretty poor issue description there.
Here is what I'm getting during python setup.py install:
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
g++ -pthread -shared build/temp.linux-x86_64-2.7/./cudarray/wrap/cudart.o -L/usr/local/cuda-6.5/lib64 -L/home/tim/anaconda/lib -L/home/tim/anaconda/lib -lcudart -lcudarray -lpython2.7 -o build/lib.linux-x86_64-2.7/cudarray/wrap/cudart.so -fPIC
cythoning ./cudarray/wrap/array_data.pyx to ./cudarray/wrap/array_data.cpp
Error compiling Cython file:
...
from libcpp cimport bool
cimport numpy as np
cdef extern from 'cudarray/common.hpp' namespace 'cudarray':
ctypedef int bool_t;
^
cudarray/wrap/array_data.pxd:5:23: Syntax error in ctypedef statement
Error compiling Cython file:
...
@Property
def itemsize(self):
return self.dtype.itemsize
cdef bool_t *bool_ptr(ArrayData a):
^
cudarray/wrap/array_data.pyx:50:5: 'bool_t' is not a type identifier
Error compiling Cython file:
...
cdef int *int_ptr(ArrayData a):
return <int *> a.dev_ptr
cdef bool is_int(ArrayData a):
^
cudarray/wrap/array_data.pyx:62:5: 'bool' is not a type identifier
Error compiling Cython file:
...
cdef bool is_int(ArrayData a):
return a.dtype == np.dtype('int32')
cdef bool is_float(ArrayData a):
^
cudarray/wrap/array_data.pyx:66:5: 'bool' is not a type identifier
Error compiling Cython file:
...
self.dtype = dtype
self.nbytes = size*dtype.itemsize
self.owner = owner
self.offset = offset
if owner is None:
cudaCheck(cudaMalloc(&self.dev_ptr, self.nbytes))
^
cudarray/wrap/array_data.pyx:16:33: Cannot take address of Python variable
Error compiling Cython file:
...
if owner is None:
cudaCheck(cudaMalloc(&self.dev_ptr, self.nbytes))
else:
self.dev_ptr = owner.dev_ptr + offset*dtype.itemsize
if np_data is not None:
cudaCheck(cudaMemcpyAsync(self.dev_ptr, np.PyArray_DATA(np_data),
^
cudarray/wrap/array_data.pyx:20:42: Cannot convert Python object to 'void *'
Error compiling Cython file:
...
if np_data is not None:
cudaCheck(cudaMemcpyAsync(self.dev_ptr, np.PyArray_DATA(np_data),
self.nbytes, cudaMemcpyHostToDevice))
def to_numpy(self, np_array):
cudaCheck(cudaMemcpy(np.PyArray_DATA(np_array), self.dev_ptr,
^
cudarray/wrap/array_data.pyx:24:60: Cannot convert Python object to 'void const *'
Error compiling Cython file:
...
self.nbytes, cudaMemcpyDeviceToHost))
return np_array
def __dealloc__(self):
if self.owner is None:
cudaFree(self.dev_ptr)
^
cudarray/wrap/array_data.pyx:30:25: Cannot convert Python object to 'void *'
Error compiling Cython file:
...
def itemsize(self):
return self.dtype.itemsize
cdef bool_t *bool_ptr(ArrayData a):
return <bool_t *> a.dev_ptr
^
cudarray/wrap/array_data.pyx:51:12: 'bool_t' is not a type identifier
Error compiling Cython file:
...
cdef bool_t *bool_ptr(ArrayData a):
return <bool_t *> a.dev_ptr
cdef float *float_ptr(ArrayData a):
return <float *> a.dev_ptr
^
cudarray/wrap/array_data.pyx:55:11: Python objects cannot be cast to pointers of primitive types
Error compiling Cython file:
...
cdef float *float_ptr(ArrayData a):
return <float *> a.dev_ptr
cdef int *int_ptr(ArrayData a):
return <int *> a.dev_ptr
I'm using anaconda and it looks like I've got cython 0.20.1
Did I miss a requirement here? Make and Make Install both complete without any apparent issue.
Thanks
-Tim
from cudarray.
You need the latest version of Cython (0.21). I have recently updated the requirements in setup.py to reflect this. Be sure to checkout the latest version of CUDArray.
Best,
Anders
from cudarray.
Hi Anders,
Works like a charm now. Thanks!
-Tim
from cudarray.
Good to hear! :)
from cudarray.
Related Issues (20)
- Ubuntu 14.04 cuda7.5 cudnn 5.1 Anaconda2.7 install problem HOT 1
- CUDArray: CUDA back-end not available, using NumPy HOT 5
- 'module' object has no attribute 'extra' HOT 1
- benchmark
- macos install error, help!
- Is it support Linux?
- illegal memory access was encountered
- Help me! fatal error: 'driver_types.h' file not found HOT 1
- ImportError: No module named conv_bc01 HOT 2
- : unbound method __init__() must be called with Extension instance as first argument (got Extension instance instead)
- Ubuntu 16.04, CUDA 8, CUDNN 5.1 & Anaconda 2.7 - Install problems
- python setup.py error
- [src/nnet/pool_b01.o] Error 1
- ./include/cudarray/common.hpp:95: an illegal memory access was encountered HOT 2
- using cudarray with strictly CPU
- ImportError: No module named conv_bc01
- How to install cudarray on Windows? HOT 1
- Restrictions to CudNN and CUDA toolkit version. HOT 8
- ValueError: an illegal memory access was encountered HOT 1
- Installation Problem: `gcc failed with exit status 1`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cudarray.