Theano / libgpuarray

Library to manipulate tensors on the GPU.
Other
189 stars 95 forks source link

PCI Bus ID length #577

Open devszr opened 6 years ago

devszr commented 6 years ago

Hi,

I was wondering about the behavior of gpuarray when the PCI busid for the CUDA device is over 13 characters in length ?

I had an issue where the PCI bus id on my machine is over 13 characters and I received the following error when running a simple gpu test program with Theano.

ERROR (theano.gpuarray): Could not initialize pygpu, support disabled Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/theano/gpuarray/__init__.py", line 227, in <module> use(config.device) File "/usr/local/lib/python2.7/dist-packages/theano/gpuarray/__init__.py", line 214, in use init_dev(device, preallocate=preallocate) File "/usr/local/lib/python2.7/dist-packages/theano/gpuarray/__init__.py", line 166, in init_dev unique_id = '(' + context.unique_id + ')' File "pygpu/gpuarray.pyx", line 1102, in pygpu.gpuarray.GpuContext.unique_id.__get__ File "pygpu/gpuarray.pyx", line 487, in pygpu.gpuarray.ctx_property GpuArrayException: cuDeviceGetPCIBusId((char *)res, 13, id): CUDA_ERROR_INVALID_VALUE: invalid argument [Elemwise{exp,no_inplace}(<TensorType(float32, vector)>), GpuFromHost<None>(Elemwise{exp,no_inplace}.0)]

Looking at the gpuarray code, I found that the line where this error occurred was trying to print the active device configuration. I tried setting print_active_device=false as part of my THEANO_FLAGS and interestingly the code worked and I was able to monitor with nvidia-smi that the code used the gpu.

I was wondering if there is some issue when the PCI BUSID is over a certain length, the busID on my machine is 17 characters in total.

Any ideas ?

Thanks.