关于学习CUDA编程中共享内存的问题 [英] A question about shared memory in studing CUDA Programming

查看:114
本文介绍了关于学习CUDA编程中共享内存的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些关于共享记忆的问题(我正在阅读的书是< cuda programming =由Shane Cook撰写):

1.书中说在费米,选择是16K或48K支持L1或共享内存

然后共享内存是一种银行交换架构。在Fermi上它是32个库每个数据库大小为4个字节



32 * 4字节= 128字节不等于48K,为什么?怎么理解?



2.什么是银行交换架构?有什么参考可以提供给我吗?



谢谢

There are some questions about shared memory(The book I am reading is <cuda programming=""> by Shane Cook):
1. The book said "In Fermi the choice is 16K or 48K in favor of the L1 or shared memory"
and then "Shared memory is a bank-switched architecture. On Fermi it is 32 banks wide" "Each bank of data is 4 bytes in size"

32 * 4 bytes = 128 bytes is not equal to 48K, why? How to understand that?

2. What is "bank-switched architecture" ? Is there any reference that can provide to me?

Thanks

推荐答案

你可以阅读关于银行的信息切换内存: https://en.wikipedia.org/wiki/Bank_switching [ ^ ]。



几乎没有算术问题可以根据上下文中的两个句子来解释。这些句子总是被错误地理解,书籍可能包含一些错误。无论它是什么,您都可以随时从其他来源找到银行和其他单位的实际尺寸,特别是原始的Nvidia文档。费米微体系结构在此解释: https://en.wikipedia.org/wiki/Fermi_%28microarchitecture%29 [ ^ ]。



-SA
You can read about bank-switched memory here: https://en.wikipedia.org/wiki/Bank_switching[^].

Your arithmetic concerns hardly can be explained based on just two sentences taken out of context. Such sentences can always be understood incorrectly, and books can contain some error. No matter what it is, you can always find out the real sizes of banks and other units from other sources, in particular, original Nvidia documentation. Fermi microarchitecture is explained here: https://en.wikipedia.org/wiki/Fermi_%28microarchitecture%29[^].

—SA


这篇关于关于学习CUDA编程中共享内存的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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