-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,645 additions
and
0 deletions.
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,59 @@ | ||
cmake_minimum_required(VERSION 3.12) | ||
project(cmake_wrapper) | ||
|
||
include(conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
#----------------------------- | ||
# Workaround for github action | ||
# see https://github.com/actions/setup-python/issues/121#issuecomment-777748504 | ||
if (POLICY CMP0094) | ||
cmake_policy(SET CMP0094 NEW) | ||
endif () | ||
if (NOT DEFINED Python_FIND_REGISTRY) | ||
set(Python_FIND_REGISTRY "LAST") | ||
endif () | ||
if (NOT DEFINED Python_FIND_FRAMEWORK) | ||
set(Python_FIND_FRAMEWORK "LAST") | ||
endif () | ||
#----------------------------- | ||
|
||
find_package(Python 3.8.0 REQUIRED) | ||
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) | ||
|
||
find_package(Eigen3 REQUIRED) | ||
set(EIGEN3_FOUND 1) | ||
set(EIGEN3_INCLUDE_DIR ${Eigen3_INCLUDE_DIR}) | ||
|
||
add_library(cpuinfo INTERFACE IMPORTED) | ||
add_library(clog INTERFACE IMPORTED) | ||
set_property(TARGET cpuinfo PROPERTY INTERFACE_LINK_LIBRARIES CONAN_PKG::cpuinfo) | ||
set_property(TARGET clog PROPERTY INTERFACE_LINK_LIBRARIES CONAN_PKG::cpuinfo) | ||
|
||
if(USE_PYTORCH_QNNPACK) | ||
add_library(fxdiv INTERFACE IMPORTED) | ||
set_property(TARGET fxdiv PROPERTY INTERFACE_LINK_LIBRARIES CONAN_PKG::fxdiv) | ||
|
||
add_library(psimd INTERFACE IMPORTED) | ||
set_property(TARGET psimd PROPERTY INTERFACE_LINK_LIBRARIES CONAN_PKG::psimd) | ||
|
||
add_library(fp16 INTERFACE IMPORTED) | ||
set_property(TARGET fp16 PROPERTY INTERFACE_LINK_LIBRARIES CONAN_PKG::fp16) | ||
endif() | ||
|
||
if(USE_TENSORPIPE) | ||
add_library(tensorpipe INTERFACE IMPORTED) | ||
set_property(TARGET tensorpipe PROPERTY INTERFACE_LINK_LIBRARIES CONAN_PKG::tensorpipe) | ||
endif() | ||
|
||
if(CONAN_LIBTORCH_USE_SLEEF) | ||
add_library(sleef INTERFACE IMPORTED) | ||
set_property(TARGET sleef PROPERTY INTERFACE_LINK_LIBRARIES CONAN_PKG::sleef) | ||
endif() | ||
|
||
if(CONAN_LIBTORCH_USE_PTHREADPOOL) | ||
add_library(pthreadpool INTERFACE IMPORTED) | ||
set_property(TARGET pthreadpool PROPERTY INTERFACE_LINK_LIBRARIES CONAN_PKG::pthreadpool) | ||
endif() | ||
|
||
add_subdirectory(source_subfolder) |
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,20 @@ | ||
sources: | ||
"1.8.1": | ||
url: "https://github.com/pytorch/pytorch/archive/v1.8.1.tar.gz" | ||
sha256: "a13b379d7acd2470e643b4fd54a3bd4a68eea6032153aa3fd705ba34718a32dc" | ||
patches: | ||
"1.8.1": | ||
- patch_file: "patches/0001-fix-system-onnx-namespace.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0002-allow-pytorch-subproject.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0003-disable-pybind11-for-no-build-python.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0004-avoid-python-external-typing-extensions.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0005-fix-vulkan-codegen.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0006-fix-install-target.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0007-unvendor-dependencies-and-honor-flags.patch" | ||
base_path: "source_subfolder" |
Oops, something went wrong.