Skip to content

Commit 969b5c6

Browse files
committed
Fixing integer divides to make clBLAS work when building with python3
1 parent 1af16a8 commit 969b5c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/library/blas/AutoGemm/KernelOpenCL.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,11 @@ def makeOpenCLKernelString(kernel):
351351
kStr += endLine
352352
kStr += " /* load global -> local */" + endLine
353353
numALoads = (kernel.workGroupNumRows*kernel.microTileNumRows*kernel.unroll) \
354-
/ (kernel.workGroupNumRows*kernel.workGroupNumCols)
354+
// (kernel.workGroupNumRows*kernel.workGroupNumCols) # // -- integer divide
355355
numALoadsR = (kernel.workGroupNumRows*kernel.microTileNumRows*kernel.unroll) \
356356
% (kernel.workGroupNumRows*kernel.workGroupNumCols)
357357
numBLoads = (kernel.workGroupNumCols*kernel.microTileNumCols*kernel.unroll) \
358-
/ (kernel.workGroupNumRows*kernel.workGroupNumCols)
358+
// (kernel.workGroupNumRows*kernel.workGroupNumCols) # // - integer divide
359359
numBLoadsR = (kernel.workGroupNumCols*kernel.microTileNumCols*kernel.unroll) \
360360
% (kernel.workGroupNumRows*kernel.workGroupNumCols)
361361

src/library/blas/AutoGemm/KernelParameters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ def isValid(self):
8989
return True
9090
"""
9191
numALoads = (self.workGroupNumRows*self.microTileNumRows*self.unroll) \
92-
/ (self.workGroupNumRows*self.workGroupNumCols)
92+
// (self.workGroupNumRows*self.workGroupNumCols)
9393
numALoadsR = (self.workGroupNumRows*self.microTileNumRows*self.unroll) \
9494
% (self.workGroupNumRows*self.workGroupNumCols)
9595
numBLoads = (self.workGroupNumCols*self.microTileNumCols*self.unroll) \
96-
/ (self.workGroupNumRows*self.workGroupNumCols)
96+
// (self.workGroupNumRows*self.workGroupNumCols)
9797
numBLoadsR = (self.workGroupNumCols*self.microTileNumCols*self.unroll) \
9898
% (self.workGroupNumRows*self.workGroupNumCols)
9999
if (numALoads>0 and numALoadsR>0):

0 commit comments

Comments
 (0)