Skip to content
Snippets Groups Projects
Commit 79fbd5bb authored by Helen Schottenhamml's avatar Helen Schottenhamml
Browse files

Allow usage of ARM architectures for Linux systems (not just Darwin).

parent 8cc89044
No related branches found
No related tags found
1 merge request!320ARM for linux
...@@ -43,7 +43,8 @@ def get_supported_instruction_sets(): ...@@ -43,7 +43,8 @@ def get_supported_instruction_sets():
return _cache.copy() return _cache.copy()
if 'PYSTENCILS_SIMD' in os.environ: if 'PYSTENCILS_SIMD' in os.environ:
return os.environ['PYSTENCILS_SIMD'].split(',') return os.environ['PYSTENCILS_SIMD'].split(',')
if platform.system() == 'Darwin' and platform.machine() == 'arm64': # not supported by cpuinfo if (platform.system() == 'Darwin' or platform.system() == 'Linux') and platform.machine() == 'arm64':
# not supported by cpuinfo
return ['neon'] return ['neon']
elif platform.system() == 'Linux' and platform.machine().startswith('riscv'): # not supported by cpuinfo elif platform.system() == 'Linux' and platform.machine().startswith('riscv'): # not supported by cpuinfo
libc = CDLL('libc.so.6') libc = CDLL('libc.so.6')
......
...@@ -146,7 +146,9 @@ def read_config(): ...@@ -146,7 +146,9 @@ def read_config():
('flags', '-Ofast -DNDEBUG -fPIC -march=native -fopenmp -std=c++11'), ('flags', '-Ofast -DNDEBUG -fPIC -march=native -fopenmp -std=c++11'),
('restrict_qualifier', '__restrict__') ('restrict_qualifier', '__restrict__')
]) ])
if platform.machine().startswith('ppc64'): if platform.machine() == 'arm64':
default_compiler_config['flags'] = default_compiler_config['flags'].replace('-march=native', '')
elif platform.machine().startswith('ppc64'):
default_compiler_config['flags'] = default_compiler_config['flags'].replace('-march=native', default_compiler_config['flags'] = default_compiler_config['flags'].replace('-march=native',
'-mcpu=native') '-mcpu=native')
elif platform.system().lower() == 'windows': elif platform.system().lower() == 'windows':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment