1 基本流程
- 使用cuda预实现的sample程序
deviceQuery
查询本机设备(显卡)信息 - 利用grep抓取
shared
字样查询共享内存大小
2 操作步骤
环境:Ubuntu 18.04
, win系统可利用everything等索引搜索找到deviceQuery.exe
-
定位
deviceQuery
$ locate deviceQuery
-
选用
/usr/local/cuda-10.2/samples/bin/x86_64/linux/release/deviceQuery
$ /usr/local/cuda-10.2/samples/bin/x86_64/linux/release/deviceQuery
以上为内容全览,可以看到,本机共享内存大小是49152 bytes。 -
通过
grep
直接选中包含shared的字段$ /usr/local/cuda-10.2/samples/bin/x86_64/linux/release/deviceQuery | grep shared
可以清晰看到,本机共享内存大小是49152 bytes。
2020/6 Karl