cuda

矩池云上如何安装nvcc

微笑、不失礼 提交于 2020-12-09 00:41:49
若您想要使用 nvcc,但是所选的镜像中没有预装 nvcc,可按照如下操作自行安装。 1、检查系统版本 source /etc/os-release && echo $VERSION_ID 2、导入apt仓库和其GPG key # 第一步若输出 16.04 curl -fsSL https://mirrors.aliyun.com/nvidia-cuda/ubuntu1604/x86_64/7fa2af80.pub | apt-key add - echo "deb https://mirrors.aliyun.com/nvidia-cuda/ubuntu1604/x86_64/ /" > /etc/apt/sources.list.d/cuda.list # 第一步若输出 18.04 curl -fsSL https://mirrors.aliyun.com/nvidia-cuda/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - echo "deb https://mirrors.aliyun.com/nvidia-cuda/ubuntu1804/x86_64/ /" > /etc/apt/sources.list.d/cuda.list 3、安装所需版本的 nvcc apt update # "10-0" 表示安装CUDA10

yolo3训练时CUDA Error: out of memory问题的解决

你离开我真会死。 提交于 2020-12-05 07:55:24
1.CUDA Error: out of memory darknet: ./src/cuda.c:36: check_error: Assertio `0' failed. 需要修改所使用的模型cfg文件中的subdivision的参数。 由subdivisions=8改成subdivisions=64。 subdivision: 这个参数很有意思的,它会让你的每一个batch不是一下子都丢到网络里。而是分成subdivision对应数字的份数,一份一份的跑完后,在一起打包算作完成一次iteration。这样会降低对显存的占用情况。如果设置这个参数为1的话就是一次性把所有batch的图片都丢到网络里,如果为2的话就是一次丢一半。 http://blog.csdn.net/renhanchi/article/details/71077830?locationNum=11&fps… 若上述方法不能解决: 导致cuda真正的原因是: 大致意思就是 服务器的GPU大小为M tensorflow只能申请N(N<M) 也就是tensorflow告诉你 不能申请到GPU的全部资源 然后就不干了 解决方法: 找到代码中Session 在session定义前 增加 config = tf.ConfigProto(allow_soft_placement=True) #最多占gpu资源的70%

CUDA __constant__ deference to global memory. Which cache?

给你一囗甜甜゛ 提交于 2020-12-04 08:22:12
问题 Instead of passing lots of arguments to a kernel, I use a __constant__ variable. This variable is an array of structures which contains many pointers to data in global (these pointer would be a list of arguments); an array for the multiple different datasets to call a kernel on. Then the kernel accesses this array and dereferences to global the appropriate data. My question is, does this data get cached through L2 or the constant cache? Moreover, if the latter and, if loaded via __ldg() ,

What does 'compute capability' mean w.r.t. CUDA?

[亡魂溺海] 提交于 2020-12-02 06:10:19
问题 I am new to CUDA programming and don't know much about it. Can you please tell me what does 'CUDA compute capability' mean? When I use the following code on my university server, it showed me the following result. for (device = 0; device < deviceCount; ++device) { cudaDeviceProp deviceProp; cudaGetDeviceProperties(&deviceProp, device); printf("\nDevice %d has compute capability %d.%d.\n", device, deviceProp.major, deviceProp.minor); } RESULT: Device 0 has compute capability 4199672.0. Device

What does 'compute capability' mean w.r.t. CUDA?

你离开我真会死。 提交于 2020-12-02 06:09:06
问题 I am new to CUDA programming and don't know much about it. Can you please tell me what does 'CUDA compute capability' mean? When I use the following code on my university server, it showed me the following result. for (device = 0; device < deviceCount; ++device) { cudaDeviceProp deviceProp; cudaGetDeviceProperties(&deviceProp, device); printf("\nDevice %d has compute capability %d.%d.\n", device, deviceProp.major, deviceProp.minor); } RESULT: Device 0 has compute capability 4199672.0. Device

Can C++17 be used together with CUDA using clang?

给你一囗甜甜゛ 提交于 2020-12-02 05:59:06
问题 As far as using nvcc , one needs to use the corresponding gcc (currently max. 5.4 I believe) in conjunction. This of course somewhat prevents one from using C++17 on the host side. Since C++17 can be compiled using clang 5 and upwards (see here), and one can compile cuda code as well (see here), is it possible to use both C++17 and CUDA at the same time (or can there be problems, e.g. with the CUDA runtime)? 回答1: Yes, as you already guessed the CUDA clang frontend is indeed ahead in C++

Can C++17 be used together with CUDA using clang?

烂漫一生 提交于 2020-12-02 05:58:05
问题 As far as using nvcc , one needs to use the corresponding gcc (currently max. 5.4 I believe) in conjunction. This of course somewhat prevents one from using C++17 on the host side. Since C++17 can be compiled using clang 5 and upwards (see here), and one can compile cuda code as well (see here), is it possible to use both C++17 and CUDA at the same time (or can there be problems, e.g. with the CUDA runtime)? 回答1: Yes, as you already guessed the CUDA clang frontend is indeed ahead in C++

Install multiple versions of CUDA and cuDNN

為{幸葍}努か 提交于 2020-12-02 03:38:19
问题 I am currently using CUDA version 7.5 with cuDNN version 5 for MatConvNet. I'd like to install version 8.0 and cuDNN version 5.1 and I want to know if there will be any conflicts if I have the environment paths pointing to both versions of CUDAand cuDNN. 回答1: The only environment variables that matter are PATH and LD_LIBRARY_PATH . There shouldn't be any conflicts due to LD_LIBRARY_PATH since all the libs' sonames seem to be bumped properly in each version. As for PATH , the shell will

Install multiple versions of CUDA and cuDNN

血红的双手。 提交于 2020-12-02 03:36:41
问题 I am currently using CUDA version 7.5 with cuDNN version 5 for MatConvNet. I'd like to install version 8.0 and cuDNN version 5.1 and I want to know if there will be any conflicts if I have the environment paths pointing to both versions of CUDAand cuDNN. 回答1: The only environment variables that matter are PATH and LD_LIBRARY_PATH . There shouldn't be any conflicts due to LD_LIBRARY_PATH since all the libs' sonames seem to be bumped properly in each version. As for PATH , the shell will

Install multiple versions of CUDA and cuDNN

▼魔方 西西 提交于 2020-12-02 03:36:35
问题 I am currently using CUDA version 7.5 with cuDNN version 5 for MatConvNet. I'd like to install version 8.0 and cuDNN version 5.1 and I want to know if there will be any conflicts if I have the environment paths pointing to both versions of CUDAand cuDNN. 回答1: The only environment variables that matter are PATH and LD_LIBRARY_PATH . There shouldn't be any conflicts due to LD_LIBRARY_PATH since all the libs' sonames seem to be bumped properly in each version. As for PATH , the shell will