CUDA learning
文章平均质量分 56
基于GPU通用计算的目标,学习CUDA编程,深入理解GPU架构,了解底层汇编
__DARK__
Only in darkness can you see the stars
展开
-
Jetson TX2 之 JetPack 3.0 安装小记
前言本文主要参考YouTube视频,《JetPack 3.0 - NVIDIA Jetson TX2》 视频链接如下: https://www.youtube.com/watch?v=D7lkth34rgM国外主要研究NVIDIA JETSON系列的网站JetsonHacks Install JetPack 3.0 on a NVIDIA Development Kit. Jet原创 2017-06-25 21:23:51 · 10545 阅读 · 2 评论 -
PTX ISA 之 Control Flow Instructions
Control Flow InstructionsThe following PTX instructions and syntax are for controlling execution in a PTX program:{} @ bra call ret exit1.1. Control Flow Instructions: {}{} Instruction grouping.作翻译 2017-06-29 11:11:55 · 622 阅读 · 1 评论 -
Jetson TX1/TX2 deviceQuery
nvidia@tegra-ubuntu:/usr/local/cuda/samples/1_Utilities/deviceQuery$ ./deviceQuery ./deviceQuery Starting... CUDA Device Query (Runtime API) version (CUDART static linking)Detected 1 CUDA Capable devi原创 2017-07-07 16:54:09 · 1225 阅读 · 0 评论 -
GPGPU-Sim ispass2009 编译问题0
GPGPU-Sim ispass2009 编译问题0最早接触GPU-SIM时的几个问题.thanks the reply for wdwQuestionAES在编译AES的时候,一直出现这个错误“fatal error: boost/filesystem/operations.hpp: No such file or directory” 是不是缺少了什么依赖呢 Google了一下 安装了li原创 2017-08-09 09:30:36 · 994 阅读 · 0 评论 -
PTX ISA Special Registers
PTX ISA Special Registers综述PTX includes a number of predefined, read-only variables, which are visible as special registers and accessed through mov or cvt instructions.%tid CTA 内的线程号 %ntid翻译 2017-08-11 14:21:00 · 960 阅读 · 0 评论 -
零拷贝问题
Zero copy in TK1and TX1 and TX2TX1 架构图JETSON TK1,TX1,TX2都是CPU-GPU异构架构,共享主存DRAM(最下边的)左上角,四核arm A57 下一个, 四核arm A53右边GPU 双核Maxwell arch sm_53 /TX 2 是pascal arch sm_62缓存各管各的,无共享 last level cach...原创 2017-08-12 17:44:44 · 1083 阅读 · 0 评论 -
CUDA 编程 之 cuda occupancy
Occupancy = Active Warps / Maximum Active WarpsRemember: resources are allocated for the entire block Resources are finiteUtilizing too many resources per thread may limit the occupancyPotential oc原创 2016-12-28 23:19:31 · 896 阅读 · 0 评论 -
CUDA Program Analysis
Nvidia Visio profilernvprof ./app input file simple compile process.cu -> .ptx -> .cubin ->exeyou can use “nvcc -keep” to–ptxas-option=-v to see verbose compilation output原创 2016-12-29 09:05:44 · 1013 阅读 · 0 评论 -
CUDA 编程 之 CUDA-MEMCHECK 工具 简介
CUDA-MEMCHECK1.IntroductionCUDA-MEMCHECK是一个在CUDA toolkit 中的功能性的正确性检查组件。**这个**suite有4个工具 :memcheckThe memcheck tool is capable of precisely detecting and attributing out of bounds and misaligned memory原创 2016-12-29 21:01:25 · 10840 阅读 · 0 评论 -
PTX ISA 之 comparisions 小结
http://docs.nvidia.com/cuda/parallel-thread-execution/index.html#comparisonsinteger meaning signed op unsigned op bit-size op a == b eq eq eq a != b ne ne ne a < b lt l原创 2017-02-28 13:52:45 · 443 阅读 · 0 评论 -
PTX ISA 之 原子操作 atom 的小结
关于 原子操作 atom 的小结atomAtomic reduction operations for thread-to-thread communication.语法atom{.space}{.scope}.op.type d, [a], b; atom{.space}{.scope}.op.type d, [a], b, c; .space = { .global, .shared }; .s原创 2017-03-01 16:15:13 · 888 阅读 · 0 评论 -
PTX ISA 之 同步指令 bar & membar
barBarrier synchronization.Syntaxbar.sync a{, b};bar.arrive a, b;bar.red.popc.u32 d, a{, b}, {!}c;bar.red.op.pred p, a{, b}, {!}c;.op = { .and, .or };http://docs.nvidia.com/cuda/parallel-t原创 2017-03-07 23:37:00 · 2309 阅读 · 0 评论 -
CUDA 编程 之 二进制工具与反编译
1.Overview1.1什么是CUDA二进制文件cuda 二进制文件 (.cubin .elf)是一种 ELF格式的文件,其中包含可执行代码部分,还包含了一些 符号、relocator、debug 信息等其他内容。默认情况下,CUDA编译器 nvcc 可以讲cubin 文件,嵌入到 host 的可执行文件中。也可以 使用 nvcc -cubin 来编译直接得到 x.cubin 文件。注意: 更多细翻译 2017-03-15 23:22:55 · 6993 阅读 · 0 评论 -
CUDA 编程 之 基本概念理解
CUDA 基本概念理解grid分配给每个kernel总的线程资源,可以是一维二维三维的,其中包含许多block。共享global memoryblockgrid 的组成单位,线程块嘛,分配到 GPU SM上的基本单位,不能将其拆开分到不同的SM上。block内的所有线程共享 shared memory,L1 cache 。threadGPU线程,每个线程都有自己私有 资源,例如寄存器,原创 2017-04-27 10:14:50 · 704 阅读 · 0 评论 -
CUDA 编程 之 编译问题小记
在编译cuda程序时出现 这个问题obj/release/mySobeldllComb.cu_o relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC根据提示,说加上 -fPIC 重新编译,如果是 GCC的话,可以直接加 -f原创 2017-05-08 10:09:48 · 1287 阅读 · 0 评论 -
GPU架构基础 之 关于CUDA中线程访存的关系
关于CUDA中线程访存的关系,原创 2015-11-16 20:25:38 · 941 阅读 · 1 评论 -
NVCC 分歩 编译 CUDA 程序
先上一张大图,nviDIA官方文档的编译流程图 完整的说明了如何从一个 .cu or .cpp 生成一个可执行的文件。1.只打印,不运行nvcc -O2 -c backprop_cuda.cu -keep -arch sm_30 --dryrun2.打印出 具体流程1. 读取环境变量#$ _SPACE_= #$ _CUDART_=cudart#$ _HERE_=/home/gpgpu-s原创 2016-12-25 14:05:06 · 4938 阅读 · 0 评论 -
CUDA 编程 之 配置cache函数
设置L1/shared mem 配置函数Sets the preferred cache configuration for a device function.__host__ cudaError_t cudaFuncSetCacheConfig ( const void* func, cudaFuncCache cacheConfig ) 枚举参数enum cudaFuncCache CUD原创 2017-02-27 21:49:15 · 1727 阅读 · 0 评论 -
PTX ISA 之 volatile 的用法
字面意思挥发性的,不稳定的用法用于ld/st指令ld.volatile{.ss}.type d, [a]; // load from address ld.volatile{.ss}.vec.type d, [a]; // vector load from addrAn ld.volatile operation is always performed and it will not be r原创 2017-02-28 23:30:10 · 706 阅读 · 0 评论 -
GPU 架构基础 之 Concurrent Kernel Execution in Fermi arch & later
Fermi supports concurrent kernel execution, where different kernels of the same application context can execute on the GPU at the same time. Concurrent kernel execution allows programs that execute a原创 2017-03-07 14:35:42 · 1035 阅读 · 0 评论 -
CUDA 编程 之 同步函数与访存栅栏
cudaDeviceSynchronize()halts execution in the CPU/host thread (that the cudaDeviceSynchronize was issued in) until the GPU has finished processing all previously requested cuda tasks (kernels, data cop原创 2017-04-05 23:38:01 · 829 阅读 · 0 评论 -
PTX ISA 之 cache operator
ld cache operatorst cache operator原创 2017-04-25 10:20:58 · 754 阅读 · 0 评论 -
Jetson TK1 刷机步骤小记
overview下载资源硬件连接开始刷机英伟达出了三款嵌入式的开发板,TK1,TX1,TX2,分别对应Kepler ,Maxwell,Pascal架构。本文呢讲具体怎么给Jetson TK1 刷机,以上的讨论呢,另写文章讨论。overview先说一下原理,个人理解:其实这个开发板呢,应该说是一个板卡电脑,可以装Linux系统,还有很多接口,虽然资源少了点,跟电脑有什么区别吗?那么给它刷机呢,原创 2017-04-30 13:56:01 · 5299 阅读 · 3 评论