Skip to content
Snippets Groups Projects
Commit c7d5aaa2 authored by Ribbon's avatar Ribbon :speech_balloon:
Browse files

Add a recipe

parent 5ab688b8
No related branches found
No related tags found
No related merge requests found
#TODO maybe incomplete script, see https://github.com/pytorch/pytorch/blob/main/docs/libtorch.rst#building-libtorch-using-cmake
[source]
git = "https://github.com/pytorch/pytorch"
branch = "release/2.3"
[build]
template = "custom"
script = """
mkdir pytorch-build
cd pytorch-build
COOKBOOK_CONFIGURE="cmake"
COOKBOOK_CONFIGURE_FLAGS=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CROSSCOMPILING=True
-DCMAKE_EXE_LINKER_FLAGS="-static"
-DCMAKE_INSTALL_PREFIX="/"
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
-DCMAKE_SYSTEM_NAME=Generic
-DCMAKE_SYSTEM_PROCESSOR="$(echo "${TARGET}" | cut -d - -f1)"
-DCMAKE_VERBOSE_MAKEFILE=On
-DBUILD_SHARED_LIBS:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=Release -DPYTHON_EXECUTABLE:PATH=`which python3` -DCMAKE_INSTALL_PREFIX:PATH=../pytorch-install ../pytorch
"${COOKBOOK_SOURCE}"
)
cookbook_configure
"""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment