Comments (7)
I looked into "NameError: global name 'array' is not defined".
First, 'array' is not imported in _array.py. Second, 'array' doesn't have GpuArray but 'gpuarray' does.
I ran the followings in pygpu directory:
import array
array.GpuArray
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'GpuArray'
import gpuarray
gpuarray.GpuArray
<type 'pygpu.gpuarray.GpuArray'>
Is 'array' supposed to be 'gpuarray'?
from libgpuarray.
There was an 'array.py' file that was renamed to '_array.py' because of name conflicts. Maybe there is a leftover array.pyc file, which you should delete.
As for the GpuArrayException, from the sample you posted, it seems there are problems with your blas library. The error just indicates that the blas library returned an error.
from libgpuarray.
Thank you for your answers.
I looked for array.pyc by executing "find / -name array.pyc" and got nothing. "ls" in pygpu returns init.py blas.py dtypes.py gpuarray.h gpuarray_api.h parser.py scan.py tools.pyc
init.pyc blas.pyc dtypes.pyc gpuarray.py numpy_compat.h parser.pyc scan.pyc
_array.py blas.so elemwise.py gpuarray.pyc operations.py reduction.py tests
_array.pyc blas_api.h elemwise.pyc gpuarray.so operations.pyc reduction.pyc tools.py.
When you say "blas library" do you mean clblas? This machine is a mac and I didn't install BLAS as the installation page says OSX comes with the Accelerated framework.
from libgpuarray.
Yes I mean clBLAS. It seems there is a problem with your intallation (which might just be that it is trying to run on the CPU and clBLAS doesn't like that).
Also, you have an old install of pygpu which does have the array.py file as evidenced by:
File "/Library/Python/2.7/site-packages/pygpu-0.2.1-py2.7-macosx-10.9-intel.egg/pygpu/array.py", line 134, in __divmod_
Get rid of that install and the problem should go away.
from libgpuarray.
Thanks for your help. I really appreciate it. I will look into my clBLAS installation.
I don't have array.py in the pygpu directory. underscore character (_) right before array.py was italicizing it. The following is the error message with escaping:
ERROR: pygpu.tests.test_elemwise.test_divmod('uint64', (50,), array(2.450000047683716, dtype=float32))
Traceback (most recent call last):
File "/Users/dokookchoe/Library/Python/2.7/lib/python/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Library/Python/2.7/site-packages/pygpu-0.2.1-py2.7-macosx-10.9-intel.egg/pygpu/tests/support.py", line 39, in f
func(*args, **kwargs)
File "/Library/Python/2.7/site-packages/pygpu-0.2.1-py2.7-macosx-10.9-intel.egg/pygpu/tests/test_elemwise.py", line 254, in divmod_mixed
out_g = divmod(g, elem)
File "/Library/Python/2.7/site-packages/pygpu-0.2.1-py2.7-macosx-10.9-intel.egg/pygpu/_array.py", line 134, in divmod
if not isinstance(other, array.GpuArray):
NameError: global name 'array' is not defined
from libgpuarray.
I get a Floating Point Exception: 8
at some point when running the test suite on my machine. However this is after the tests for elemwise operations which seem to be the source of your array problems.
I don't have much time to investigate this right now, but I should have some next week.
from libgpuarray.
I just realized that the following code line:
File "/Library/Python/2.7/site-packages/pygpu-0.2.1-py2.7-macosx-10.9-intel.egg/pygpu/_array.py", line 134, in __divmod__
if not isinstance(other, array.GpuArray):
should read:
if not isinstance(other, gpuarray.GpuArray):
It never had any version that read array.Gpuarray
, so something modified that code and this is what broke it. I'm assuming that this is the cause of this problem and therefore closing the ticket.
from libgpuarray.
Related Issues (20)
- "host variables are not allowed in JIT mode" HOT 1
- Impossible to test API/ABI version from kernel code HOT 5
- Can not use cuDNN on context None: Device not supported HOT 1
- NCCL tests hang when run in slurm interactive job HOT 2
- ls
- GpuArrayException (b'GPU is too old for CUDA version') HOT 5
- Can not use cuDNN on context None:cannot compile with cuDNN. HOT 1
- Theano 1.0.2 GpuArrayException: b'cuInit
- PCI Bus ID length
- pygpu problem HOT 1
- problem when install
- gpuarray crashes with ARM Mali GPU HOT 3
- compile failure HOT 1
- Can't decode comm_id HOT 1
- CUDA 10.1 on Windows 10 shows error: pygpu.gpuarray.GpuArrayException: b'Could not load "nvrtc64_70.dll": The specified module could not be found.\r\n' theano HOT 11
- undefined symbol: GpuKernel_binary HOT 2
- How to start using the library ? HOT 2
- Please update python test
- Test
- Update versioneer
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 libgpuarray.