Examly題庫立即開始練習
國營聯招 統計資訊統計學、巨量資料概論10527單選題

在CUDA(Compute Unified Device Architecture)中,memory的分配上是相當重要的問題,GPU上具有shared memory、global memory、constant memory,下列敘述何者正確?

A存取速度: global memory > shared memory > constant memory
B容量大小: global memory > constant memory > shared memory正確答案
C要在 shared memory 中宣告變數需在前面加上 device
D使用 shared memory 配置的變數,可以被grid中的所有thread存取
答案與詳解
B
正確答案
CUDA記憶體層級:global最大但最慢,shared最快但最小,constant介於中間;容量大小為 global > constant > shared。

為什麼答案是 B

容量大小正確:global memory可達GB等級,constant memory約64KB,shared memory每個SM約48KB~96KB,故 global > constant > shared 正確。

考點:記憶體速度層級考點:記憶體容量層級考點:CUDA宣告語法考點:記憶體存取範圍
載入中…

想練更多統計學、巨量資料概論考古題?

Examly 收錄 38 萬+ 道歷屆題目,每題都有像這樣的精選詳解。免費下載,立即開練。

Download on theApp Store即將推出Google Play
黑皮