[clblas] 02/75: Fixing integer divides to make clBLAS work when building with python3

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Jan 24 23:30:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository clblas.

commit 969b5c6f2f8b71a44e9f064f3ac72de151caccd1
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Thu Dec 17 16:59:25 2015 -0500

    Fixing integer divides to make clBLAS work when building with python3
---
 src/library/blas/AutoGemm/KernelOpenCL.py     | 4 ++--
 src/library/blas/AutoGemm/KernelParameters.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/library/blas/AutoGemm/KernelOpenCL.py b/src/library/blas/AutoGemm/KernelOpenCL.py
index d8b3871..d7835d5 100644
--- a/src/library/blas/AutoGemm/KernelOpenCL.py
+++ b/src/library/blas/AutoGemm/KernelOpenCL.py
@@ -351,11 +351,11 @@ def makeOpenCLKernelString(kernel):
   kStr += endLine
   kStr += "    /* load global -> local */" + endLine
   numALoads  = (kernel.workGroupNumRows*kernel.microTileNumRows*kernel.unroll) \
-      / (kernel.workGroupNumRows*kernel.workGroupNumCols)
+      // (kernel.workGroupNumRows*kernel.workGroupNumCols) # // -- integer divide
   numALoadsR = (kernel.workGroupNumRows*kernel.microTileNumRows*kernel.unroll) \
       % (kernel.workGroupNumRows*kernel.workGroupNumCols)
   numBLoads  = (kernel.workGroupNumCols*kernel.microTileNumCols*kernel.unroll) \
-      / (kernel.workGroupNumRows*kernel.workGroupNumCols)
+      // (kernel.workGroupNumRows*kernel.workGroupNumCols) # // - integer divide
   numBLoadsR = (kernel.workGroupNumCols*kernel.microTileNumCols*kernel.unroll) \
       % (kernel.workGroupNumRows*kernel.workGroupNumCols)
 
diff --git a/src/library/blas/AutoGemm/KernelParameters.py b/src/library/blas/AutoGemm/KernelParameters.py
index b797d96..565a62d 100644
--- a/src/library/blas/AutoGemm/KernelParameters.py
+++ b/src/library/blas/AutoGemm/KernelParameters.py
@@ -89,11 +89,11 @@ class TileParameters:
     return True
     """
     numALoads = (self.workGroupNumRows*self.microTileNumRows*self.unroll) \
-        / (self.workGroupNumRows*self.workGroupNumCols)
+        // (self.workGroupNumRows*self.workGroupNumCols)
     numALoadsR = (self.workGroupNumRows*self.microTileNumRows*self.unroll) \
         % (self.workGroupNumRows*self.workGroupNumCols)
     numBLoads = (self.workGroupNumCols*self.microTileNumCols*self.unroll) \
-        / (self.workGroupNumRows*self.workGroupNumCols)
+        // (self.workGroupNumRows*self.workGroupNumCols)
     numBLoadsR = (self.workGroupNumCols*self.microTileNumCols*self.unroll) \
         % (self.workGroupNumRows*self.workGroupNumCols)
     if (numALoads>0 and numALoadsR>0):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clblas.git



More information about the debian-science-commits mailing list