"...text-generation-inference.git" did not exist on "68e9d6ab333715008c542467c8d5202cf4692253"
Unverified Commit 576e0bbf authored by Amit Aflalo's avatar Amit Aflalo Committed by GitHub
Browse files

Compile flags for mac arm64 (#121)

parent e8620a86
...@@ -4,6 +4,7 @@ import glob ...@@ -4,6 +4,7 @@ import glob
import os.path as osp import os.path as osp
from itertools import product from itertools import product
from setuptools import setup, find_packages from setuptools import setup, find_packages
import platform
import torch import torch
from torch.__config__ import parallel_info from torch.__config__ import parallel_info
...@@ -46,6 +47,11 @@ def get_extensions(): ...@@ -46,6 +47,11 @@ def get_extensions():
else: else:
print('Compiling without OpenMP...') print('Compiling without OpenMP...')
# Compile for mac arm64
if (sys.platform == 'darwin' and platform.machine() == 'arm64'):
extra_compile_args['cxx'] += ['-arch', 'arm64']
extra_link_args += ['-arch', 'arm64']
if suffix == 'cuda': if suffix == 'cuda':
define_macros += [('WITH_CUDA', None)] define_macros += [('WITH_CUDA', None)]
nvcc_flags = os.getenv('NVCC_FLAGS', '') nvcc_flags = os.getenv('NVCC_FLAGS', '')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment