- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi ,
Does access constant memory is faster than global memory and how fast ? If the access latency is the same , why do we need to use the constant memory ? Thanks.Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Constant Memory is faster because the constant memory cache is implemented onchip. Global memory resides offchip so it's slower. Note that the data should ideally fit inside the constant memory. If it doesn't and there's a cache miss, the fetch operation for the constant cache is expensive. To change the size of the constant cache you can use the --const-cache-bytes <N> where N is the number of bytes you want the cache to be
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
Therefore access constant memory is faster ( > 1x ) than global memory ? Or is there any detail number ? If I didn't use --const-cache-bytes <N> , the default max allocation is 1G (use helloworld to show the infomation) ? Thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, constant memory access is definitely faster than global memory. How much faster, I'm not sure on the number. You can probably perform some tests on that.
The default cache size is 16kB.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page