View Full Version : memory coalescing
02-07-2013, 10:44 PM
actually i am working on memory coalescing technique. and i have searched so much but hardly able to get code regarding this issue. Do you have code regarding this?
02-07-2013, 11:46 PM
I think the best explanation on that will ne the lectures here:
For Memory Coalescing, have a look at
CUDA University Courses
University of Illinois : ECE 498AL
Taught by Professor Wen-mei W. Hwu and David Kirk, NVIDIA CUDA Scientist.
--> Memory Bank Conflicts (115 MB)
02-09-2013, 07:18 AM
There are many nuances and details, but for simple kernels the key element is this: For adjacent work items, you want them accessing adjacent memory. Sometimes this means doing things in a counter-intuitive fashion. An example is using a 1D kernel to process 2D images (there are reasons why you'd want to do this) -- you should run it on columns and not rows (i.e., interpret get_global_id(0) as X) because then for each iteration of the Y loop inside the kernel the work items will be accessing horizontally adjacent pixels.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.