NotImplementedError:CUDA 不支持边界检查 [英] NotImplementedError: bounds checking is not supported for CUDA

查看:38
本文介绍了NotImplementedError:CUDA 不支持边界检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的 GPU 上运行代码,首先我遇到了在 ubuntu 18.04 上运行 CUDA 的问题.在经历了一些痛苦之后,我被建议在 Docker Image 中工作,在那里我(我认为)有一个运行良好的 CUDA 版本(我正在开始学习 pytorch,并且我能够获得一个 torch.cuda.is_available()= 真).

之后我尝试运行一个简单的代码复制

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

解决方案

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

这篇关于NotImplementedError:CUDA 不支持边界检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆