Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove NM_ALLOW_DARWIN #1290

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,8 @@ def _check_supported_system():
)

if sys.platform.startswith("darwin"):
if os.getenv("NM_ALLOW_DARWIN", "0") != "0":
# experimental support for mac, allow install to go through
return
else:
# mac is not supported, raise error on install
raise OSError(
"Native Mac is currently unsupported for DeepSparse. "
"Please run on a Linux system or within a Linux container on Mac. "
"More info can be found in our docs here: "
"https://docs.neuralmagic.com/deepsparse/source/hardware.html"
)
# beta support for mac, allow install to go through
return

# unknown system, raise error on install
raise OSError(
Expand Down
19 changes: 2 additions & 17 deletions src/deepsparse/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,6 @@ def _parse_arch_bin() -> architecture:
raise OSError(error_msg.format(ex))


def allow_experimental_darwin() -> bool:
"""
Check if experimental Darwin support is allowed.
"""
try:
allow = int(os.getenv("NM_ALLOW_DARWIN", "0"))
except ValueError:
allow = False
return allow


def get_darwin_version() -> str:
"""
If we are running Darwin, get the current version. Otherwise return None.
Expand All @@ -168,7 +157,7 @@ def check_darwin_support() -> bool:
Check if the system is running Darwin and it meets the minimum version
requirements.
"""
if sys.platform.startswith("darwin") and allow_experimental_darwin():
if sys.platform.startswith("darwin"):
ver = get_darwin_version()
return StrictVersion(ver) >= StrictVersion(MINIMUM_DARWIN_VERSION)
return False
Expand All @@ -178,11 +167,7 @@ def platform_error_msg() -> str:
"""
Generate unsupported platform error message.
"""
if allow_experimental_darwin():
darwin_str = f" or MacOS >= {MINIMUM_DARWIN_VERSION}"
else:
darwin_str = ""

darwin_str = f" or MacOS >= {MINIMUM_DARWIN_VERSION}"
darwin_ver = get_darwin_version()
if darwin_ver:
current_os = f"MacOS {darwin_ver}"
Expand Down
Loading