Skip to content

Commit

Permalink
Eliminate passing the global and local thread group size to GpuPartition
Browse files Browse the repository at this point in the history
The best global and local size is infered basd on input size.
In future, we should infer it based on available hardware and input
size.

#15: Find the optimal size for global and local number of threads 

Task-Url: http://github.com/meisam/spark/issues/issue/15
  • Loading branch information
meisam committed Oct 29, 2014
1 parent 55dd28f commit 375baea
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ class GpuFilteredPartition[T <: Product : ClassTag]
val startSelectionTotalTime = System.nanoTime

if (columnTypes(colIndex) == "INT") {
localSize = math.min(256, intData(colIndex).length)
globalSize = localSize * math.min(1 + (size - 1) / localSize, 2048)

val resultSize = compute(intData(colIndex), size.toLong, value, operation, globalSize, localSize)
val resultSize = compute(intData(colIndex), size.toLong, value, operation)

size = resultSize
intData.zipWithIndex.filter(_._1 != null).foreach({
Expand Down

0 comments on commit 375baea

Please sign in to comment.