NotImplementedError: bounds checking is not supported for CUDA

我是研究僧i 提交于 2020-03-23 12:02:39

问题


I'm trying to run code on my GPU, and firstly I clashed with the problem of having a working CUDA on ubuntu 18.04. After some pain I was suggested to work in a Docker Image, where I have (I presume) a well working CUDA version (I'm starting learning pytorch, and I was able to obtain a torch.cuda.is_available() = True).

After that I tried to run a simple code copied here, in order to see if effectively my GPU was able to do its job.

Unfortunately not... I receive the message:

NotImplementedError: bounds checking is not supported for CUDA

and I really wasn't able to understand a proper way to fix it.

This is what I obtain if I run nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce 940M        On   | 00000000:0A:00.0 Off |                  N/A |
| N/A   36C    P0    N/A /  N/A |    242MiB /  2004MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

And this is what I obtain if I run nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

回答1:


Seems like the community is dealing with some bugs

So I tried some hacks and it actually worked!!!

Just changed the line

@jit(target ="cuda")

to

@jit



来源:https://stackoverflow.com/questions/60012614/notimplementederror-bounds-checking-is-not-supported-for-cuda

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!