File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Dependencies:
993. Cython from http://cython.org/, ( 0.18 minimum )
10104. OpenCL runtime, such as AMD's catalyst package ( AMD v2.9 SDK tested )
1111
12- NOTE: This has only been tested with 32-bit python on windows
12+ NOTE: This has been tested with 32-bit python on windows & 64-bit on OpenSUSE
1313
1414NOTE: Only sgemm has been wrapped as proof-of-concept
1515
Original file line number Diff line number Diff line change 1919from Cython .Distutils import build_ext
2020from os import path , environ
2121import argparse
22+ import platform
2223
2324def main ():
2425 parser = argparse .ArgumentParser (description = 'Set up the pyclBLAS extension module' )
@@ -70,12 +71,22 @@ def main():
7071 print ( "or pass the command line option --clBlasRoot" )
7172 exit ( )
7273
74+ # 64bit and 32bit have different library paths
75+ if ( platform .architecture ( )[0 ] == '64bit' ):
76+ libraryPath = 'lib64'
77+ else :
78+ libraryPath = 'lib'
79+
80+ # Windows and linux have different library paths
81+ if ( platform .system ( ) == 'Windows' ):
82+ libraryPath = path .join ( libraryPath , 'import' )
83+
7384 module = [
7485 Extension ( name = 'pyclBLAS' ,
7586 sources = ['pyclBLAS.pyx' ],
7687 include_dirs = [ path .join ( clRootPath , 'include' ),
7788 path .join ( clBlasRootPath , 'include' ) ],
78- library_dirs = [ path .join ( clBlasRootPath , 'lib' , 'import' ) ],
89+ library_dirs = [ path .join ( clBlasRootPath , libraryPath ) ],
7990 libraries = ['clBLAS' ] )
8091 ]
8192
You can’t perform that action at this time.
0 commit comments