-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply fix for cupy issue 8654 from PR 8655 (#287)
automerged PR by conda-forge/automerge-action
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From d31c7fbd3dab8f34f4e0f2d8df88e60ba93d4827 Mon Sep 17 00:00:00 2001 | ||
From: Kenichi Maehashi <[email protected]> | ||
Date: Thu, 10 Oct 2024 11:22:05 +0200 | ||
Subject: [PATCH] Merge pull request #8655 from | ||
dagardner-nv/platform-processor-empty-fallback | ||
|
||
Switch to using platform.machine() instead of platform.processor() | ||
--- | ||
cupy/_environment.py | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/cupy/_environment.py b/cupy/_environment.py | ||
index f0df50e0d..039f66e22 100644 | ||
--- a/cupy/_environment.py | ||
+++ b/cupy/_environment.py | ||
@@ -461,9 +461,10 @@ def _get_include_dir_from_conda_or_wheel(major: int, minor: int) -> List[str]: | ||
config = get_preload_config() | ||
if config is not None and config['packaging'] == 'conda': | ||
if sys.platform.startswith('linux'): | ||
- arch = platform.processor() | ||
+ arch = platform.machine() | ||
if arch == "aarch64": | ||
arch = "sbsa" | ||
+ assert arch, "platform.machine() returned an empty string" | ||
target_dir = f"{arch}-linux" | ||
return [ | ||
os.path.join(sys.prefix, "targets", target_dir, "include"), | ||
-- | ||
2.39.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters