Click here to Skip to main content
15,880,608 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to know which statement is true (suppose there is a block with 128 threads)?(or both false)

1. Memory bank conflicts occur if two threads (in the same warp) read/load the same bank. And the conflicts will not occur if two threads (not in the same warp) read/load the same bank.

2. Memory bank conflicts occur if two threads (whether they in the same warp or not) read/load the same bank.
Posted
Updated 10-Feb-19 3:08am

1 solution

2 contains 1. true + true

1 also contains an exception: broadcasting. If not only 2 but all threads access same bank, it is broadcasted to all items of warp.

1 is true because shared memory serializes access to same bank if its not intended to broadcast.

2 is true because shared memory serves multiple warps concurrently.

There is also another thing from CUDA documentation:

Devices of compute capability 2.0 and higher have the additional ability to multicast shared memory accesses, meaning that multiple accesses to the same location by any number of threads within a warp are served simultaneously.
 
Share this answer
 
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900