Skip to content

Commit e3f80ed

Browse files
authored
Add AVX2 cpuinfo check to setup.py
1 parent 9ad4e16 commit e3f80ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def cmake_bool(cond):
8888
cmake_args = [
8989
'-DBLOSC_DIR:PATH=%s' % os.environ.get('BLOSC_DIR', ''),
9090
'-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_SSE2' in os.environ) or (cpu_info is None) or ('sse2' not in cpu_info['flags'])),
91-
'-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool('DISABLE_BLOSC_AVX2' in os.environ),
91+
'-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_AVX2' in os.environ) or (cpu_info is None) or ('avx2' not in cpu_info['flags'])),
9292
'-DDEACTIVATE_LZ4:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_LZ4', '1'))),
9393
# Snappy is disabled by default
9494
'-DDEACTIVATE_SNAPPY:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_SNAPPY', '0'))),

0 commit comments

Comments
 (0)