Visual Studio工程配置情况:

VC++目录配置:

 C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.\common\lib\x64
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.\lib\x64
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.\common\inc
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.\include

链接器配置:

 $(CudaToolkitLibDir)
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.\lib\x64

输入:

 cublas.lib
cuda.lib
cudadevrt.lib
cudart.lib
cudart_static.lib
cufft.lib
cufftw.lib
curand.lib
cusolver.lib
cusparse.lib
nppc.lib
nppial.lib
nppicc.lib
nppicom.lib
nppidei.lib
nppif.lib
nppig.lib
nppim.lib
nppist.lib
nppisu.lib
nppitc.lib
npps.lib
nvblas.lib
nvgraph.lib
nvml.lib
nvrtc.lib
OpenCL.lib

测试代码:

 #include <iostream>
#include <cuda.h>
#include "cuda_runtime.h"
#include <cuda_runtime_api.h>
#include "device_launch_parameters.h"
#include <device_functions.h> int main(void)
{
int deviceCount;
cudaGetDeviceCount(&deviceCount); int dev;
for (dev = ; dev < deviceCount; dev++)
{
int driver_version(), runtime_version();
cudaDeviceProp deviceProp;
cudaGetDeviceProperties(&deviceProp, dev);
if (dev == )
if (deviceProp.minor = && deviceProp.major == )
printf("\n");
printf("\nDevice%d:\"%s\"\n", dev, deviceProp.name);
cudaDriverGetVersion(&driver_version);
printf("CUDA驱动版本: %d.%d\n", driver_version / , (driver_version % ) / );
cudaRuntimeGetVersion(&runtime_version);
printf("CUDA运行时版本: %d.%d\n", runtime_version / , (runtime_version % ) / );
printf("设备计算能力: %d.%d\n", deviceProp.major, deviceProp.minor);
printf("Total amount of Global Memory: %u bytes\n", deviceProp.totalGlobalMem);
printf("Number of SMs: %d\n", deviceProp.multiProcessorCount);
printf("Total amount of Constant Memory: %u bytes\n", deviceProp.totalConstMem);
printf("Total amount of Shared Memory per block: %u bytes\n", deviceProp.sharedMemPerBlock);
printf("Total number of registers available per block: %d\n", deviceProp.regsPerBlock);
printf("Warp size: %d\n", deviceProp.warpSize);
printf("Maximum number of threads per SM: %d\n", deviceProp.maxThreadsPerMultiProcessor);
printf("Maximum number of threads per block: %d\n", deviceProp.maxThreadsPerBlock);
printf("Maximum size of each dimension of a block: %d x %d x %d\n", deviceProp.maxThreadsDim[],deviceProp.maxThreadsDim[],deviceProp.maxThreadsDim[]);
printf("Maximum size of each dimension of a grid: %d x %d x %d\n", deviceProp.maxGridSize[], deviceProp.maxGridSize[], deviceProp.maxGridSize[]);
printf("Maximum memory pitch: %u bytes\n", deviceProp.memPitch);
printf("Texture alignmemt: %u bytes\n", deviceProp.texturePitchAlignment);
printf("Clock rate: %.2f GHz\n", deviceProp.clockRate * 1e-6f);
printf("Memory Clock rate: %.0f MHz\n", deviceProp.memoryClockRate * 1e-3f);
printf("Memory Bus Width: %d-bit\n", deviceProp.memoryBusWidth);
}
}

未完待续!

运行结果:

DAY1 VS2017&CUDA10.01环境搭建的更多相关文章

  1. 初学者易上手的SSH-struts2 01环境搭建

    首先,SSH不是一个框架,而是多个框架(struts+spring+hibernate)的集成,是目前较流行的一种Web应用程序开源集成框架,用于构建灵活.易于扩展的多层Web应用程序. 集成SSH框 ...

  2. Flutter 即学即用系列博客——01 环境搭建

    前言 工欲善其事,必先利其器 所以第一篇我们来说说 Flutter 环境的搭建. 笔者这边使用的是 MAC 电脑,因此以 MAC 电脑的环境搭建为例. Windows 或者 Linux 也是类似的操作 ...

  3. opencv在VS2017上的环境搭建

    最近开始做一个图像识别的小项目,需要安装opencv,VS里报的错迷的一批,网上教程好多,找了好长时间,终于找的两个解决了问题,在这儿记录一下. 安装很简单,在opencv官网(https://ope ...

  4. ofbiz最新版13.07.01环境搭建、安装(linux环境下)

    一.软件必备: 1.jdk1.7 2.mysql5.6 3.安装tomcat 二.安装: 1.安装 JDK1.7 2.安装mysql数据库 3.下载apache-ofbiz-13.07.01.zip ...

  5. mybatis源码分析之01环境搭建

    直接使用maven搭建一个mybatis的运行环境 1. pom.xml <?xml version="1.0" encoding="UTF-8"?> ...

  6. maya2018 + VS2017 C++编译环境搭建

    1. 下载: https://www.autodesk.com/developer-network/platform-technologies/maya 2. 解压,将devkitBase下的incl ...

  7. vuecli学习01 - 环境搭建

    到这个链接下载nvm的安装包:https://github.com/coreybutler/nvm-windows/releases. 然后点击一顿下一步,安装即可! 安装完成后,还需要配置环境变量. ...

  8. VS2017离线安装与Oracle数据库开发环境搭建

    记得之前使用VS2015打开老的MVC4项目,不能右键创建控制器和添加视图,让我非常不习惯!找遍了网络无果,最后只能回到VS2013,但我就是不喜欢用旧的VS,这是不是病... 1.将VS2017离线 ...

  9. libuv 一 环境搭建, hello TTY

    引言 - 一时心起, libuv linux 搭建 有一天突然想起来想写个动画. 找了一下 ui 库太大. 后面想起以前弄过的 libuv. 但发现 libuv 相关资料也很少. 所以就有了这些内容. ...

随机推荐

  1. .NET框架 - NETCORE + API + EF + MYSQL

    .NET框架 - NETCORE + API + EFCORE + MYSQL 1. 新建项目: 本文中使用 框架 .netcore2.2 . 2. 生成项目框架 3 安装MYSQL插件 点击“工具” ...

  2. 计算机网络Web应用层与运输层(HTTP/TCP)

    应用层协议原理 Web和HTTP DNS:英特网的目录服务 运输层 面向连接的运输:TCP及拥塞原理 一.应用层协议原理 DNS域名解析: (用例:www.baidu.com)域名解析是网络请求的第一 ...

  3. 使用scrapy选择器selector解析获取百度结果

    0x00 概述 需要成功安装scrapy,安装方法与本文无关,不在这多说. 0x01 配置settings 由于百度对于user-agent进行验证,所以需要添加. settings.py中找到DEF ...

  4. Exp5 MSF基础应用 20164314

    一.实践内容 本实践目标是掌握metasploit的基本应用方式,重点常用的三种攻击方式的思路.具体需要完成: 1.一个主动攻击实践,如ms08_067; (成功) 2.一个针对浏览器的攻击,如ms1 ...

  5. 错误:org.springframework.jdbc.support.SQLErrorCodesFactory - SQLErrorCodes loaded

    使用spring+mybatis整合时报错:org.springframework.jdbc.support.SQLErrorCodesFactory - SQLErrorCodes loaded 错 ...

  6. js中的 Date对象 在 IOS 手机中的兼容性问题

    项目中有个时间相关的需求,很自然的用到了 js 中的 new Date() 获取时间,浏览器使用模拟手机模式访问没有问题,但是真机测试时发现,ios系统的手机无法显示时间. 定位问题发现是 new D ...

  7. js关联数组

    标准javascript 是内含支持hash关联数组,经查找资料并测试,有关标准javascript内含的hash关联数组操作备忘如下 1.Hash关联数组定义 // 定义空数组 myhash = { ...

  8. Kafka安装配置

    Kafka是由Apache软件基金会开发的一个高吞吐量的分布式发布订阅消息系统,由Scala和Java编写.官网地址:http://kafka.apache.org 0.基本概念 Broker:Kaf ...

  9. 安装pandas报错(AttributeError: 'module' object has no attribute 'main')

    在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main', 刚开始以为是pip的版本太旧了,于是乎将其 ...

  10. 友盟统计单页面应用vue

    根据友盟官方提示在index.html的body标签末尾加入相关代码后: 后来发现,由于项目为单页面应用,在路由发生跳转时(到其他页面了),并不会重新将新页面加入统计中.需要在App.vue页面中,监 ...