forked from microsoft/Accera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
50 lines (40 loc) · 1.72 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
REM ####################################################################################################
REM Copyright (c) Microsoft Corporation. All rights reserved.
REM Licensed under the MIT License. See LICENSE in the project root for license information.
REM Build script for the Accera Python package
REM ####################################################################################################
setlocal
set ACCERA_ROOT=%~dp0
REM Ensure that submodules are cloned
git submodule update --init --recursive
git pull --recurse-submodules
REM Install dependencies
pip install -r requirements.txt
cd external\vcpkg
call bootstrap-vcpkg.bat
vcpkg install catch2:x64-windows tomlplusplus:x64-windows --overlay-ports=..\llvm
if exist "%ACCERA_ROOT%\CMake\LLVMSetupConan.cmake" (
echo Using LLVM from Conan
set LLVM_SETUP_VARIANT=Conan
) else (
echo Using LLVM from vcpkg
set LLVM_SETUP_VARIANT=Default
REM Uncomment these lines below to build a debug version (will include release as well, due to vcpkg quirks)
REM set LLVM_BUILD_TYPE=debug
REM set VCPKG_KEEP_ENV_VARS=LLVM_BUILD_TYPE
REM Install LLVM (takes a couple of hours and ~20GB of space)
vcpkg install accera-llvm:x64-windows --overlay-ports=..\llvm
)
REM Build the accera package
cd "%ACCERA_ROOT%"
python setup.py build bdist_wheel
REM Build the subpackages
cd "%ACCERA_ROOT%\accera\python\compilers"
python setup.py build bdist_wheel -d "%ACCERA_ROOT%\dist"
cd "%ACCERA_ROOT%\accera\python\llvm"
python setup.py build bdist_wheel -d "%ACCERA_ROOT%\dist"
cd "%ACCERA_ROOT%\accera\python\gpu"
python setup.py build bdist_wheel -d "%ACCERA_ROOT%\dist"
cd "%ACCERA_ROOT%"
echo Complete. Packages are in the '%ACCERA_ROOT%\dist' folder.