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 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
16 changes: 16 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions .ci_support/linux_aarch64_python3.10.____cpython.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
BUILD:
- aarch64-conda_cos7-linux-gnu
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_arch:
- aarch64
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler_version:
- None
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.10.* *_cpython
pytorch:
- '2.0'
target_platform:
- linux-aarch64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- cuda_compiler_version
- cdt_name
- docker_image
38 changes: 38 additions & 0 deletions .ci_support/linux_aarch64_python3.11.____cpython.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
BUILD:
- aarch64-conda_cos7-linux-gnu
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_arch:
- aarch64
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler_version:
- None
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.11.* *_cpython
pytorch:
- '2.0'
target_platform:
- linux-aarch64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- cuda_compiler_version
- cdt_name
- docker_image
38 changes: 38 additions & 0 deletions .ci_support/linux_aarch64_python3.8.____cpython.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
BUILD:
- aarch64-conda_cos7-linux-gnu
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_arch:
- aarch64
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler_version:
- None
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.8.* *_cpython
pytorch:
- '2.0'
target_platform:
- linux-aarch64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- cuda_compiler_version
- cdt_name
- docker_image
38 changes: 38 additions & 0 deletions .ci_support/linux_aarch64_python3.9.____cpython.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
BUILD:
- aarch64-conda_cos7-linux-gnu
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_arch:
- aarch64
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler_version:
- None
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.9.* *_cpython
pytorch:
- '2.0'
target_platform:
- linux-aarch64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- cuda_compiler_version
- cdt_name
- docker_image
3 changes: 1 addition & 2 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion conda-forge.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
build_platform:
osx_arm64: osx_64
linux_aarch64: linux_64
conda_build:
pkg_format: '2'
conda_forge_output_validation: true
github:
branch_name: main
tooling_branch_name: main
test: native_and_emulated
test: native
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

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

build:
number: 5
number: 6
skip: true # [win]
# as of pytorch 1.13, conda-forge only builds for CUDA 11.2+, see
# https://github.com/conda-forge/conda-forge-pinning-feedstock/issues/3491
Expand Down