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

Rebuild for the arches #40

Merged
merged 7 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Monkeypatch TORCH_LIB_PATH
  • Loading branch information
xhochy committed Jun 23, 2023
commit fa072ceb8fd5fe941c17139ff1cf10ab9ac80f5a
28 changes: 28 additions & 0 deletions recipe/0001-Monkeypatch-TORCH_LIB_PATH.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 46abe2bc5164d3fedebcb1fa8612b666d3a69f7f Mon Sep 17 00:00:00 2001
From: Uwe Korn <[email protected]>
Date: Fri, 23 Jun 2023 05:19:16 +0000
Subject: [PATCH] Monkeypatch TORCH_LIB_PATH

---
setup.py | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/setup.py b/setup.py
index 173d012..fe9a07e 100644
--- a/setup.py
+++ b/setup.py
@@ -10,6 +10,11 @@ from typing import List
import torch
from torch.utils.cpp_extension import CUDA_HOME, CppExtension, CUDAExtension

+import site
+import torch.utils.cpp_extension
+
+torch.utils.cpp_extension.TORCH_LIB_PATH = site.getsitepackages()[0] + '/torch/lib'
+
torch_ver = [int(x) for x in torch.__version__.split(".")[:2]]
assert torch_ver >= [1, 8], "Requires PyTorch >= 1.8"

--
2.25.1

2 changes: 2 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ package:
source:
url: https://github.com/facebookresearch/detectron2/archive/v{{ version }}.tar.gz
sha256: 9757fed05fa32acc2116ea038185f08409d5e854573e70f41909a358b70d1004
patches:
- 0001-Monkeypatch-TORCH_LIB_PATH.patch

build:
number: 6
Expand Down