forked from amd/RyzenAI-SW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_dependencies.bat
81 lines (68 loc) · 2.15 KB
/
build_dependencies.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@echo off
setlocal
REM Check if %CONDA_PREFIX% is set
if "%CONDA_PREFIX%"=="" (
echo Error: CONDA_PREFIX is not set.
exit /b 1
)
REM Set the root directory for the dependency
set "CWD=%~dp0"
set "AIERT_CMAKE_PATH=%CWD%\ext\aie-rt\driver\src"
set "AIECTRL_CMAKE_PATH=%CWD%\ext\aie_controller"
set "DD_CMAKE_PATH=%CWD%\ext\DynamicDispatch"
set "XRT_DIR=%CWD%\third_party\xrt-ipu"
REM Check if the directory exists
if not exist "%AIERT_CMAKE_PATH%" (
echo Error: Directory %AIERT_CMAKE_PATH% does not exist.
exit /b 1
)
REM Check if the directory exists
if not exist "%AIECTRL_CMAKE_PATH%" (
echo Error: Directory %AIECTRL_CMAKE_PATH% does not exist.
exit /b 1
)
REM Check if the directory exists
if not exist "%DD_CMAKE_PATH%" (
echo Error: Directory %DD_CMAKE_PATH% does not exist.
exit /b 1
)
REM Check if the directory exists
if not exist "%XRT_DIR%" (
echo Error: Directory %XRT_DIR% does not exist.
exit /b 1
)
REM Invoke cmake to build and install the dependency
cmake -S %AIERT_CMAKE_PATH% -B build_aiert -DXAIENGINE_BUILD_SHARED=OFF -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%
if errorlevel 1 (
echo Error: cmake configuration failed.
exit /b 1
)
cmake --build build_aiert --target install --config Release
if errorlevel 1 (
echo Error: cmake build or installation failed.
exit /b 1
)
REM Invoke cmake to build and install the dependency
cmake -S %AIECTRL_CMAKE_PATH% -B build_aiectrl -DCMAKE_PREFIX_PATH=%CONDA_PREFIX% -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%
if errorlevel 1 (
echo Error: cmake configuration failed.
exit /b 1
)
cmake --build build_aiectrl --target install --config Release
if errorlevel 1 (
echo Error: cmake build or installation failed.
exit /b 1
)
REM Invoke cmake to build and install the dependency
cmake -S %DD_CMAKE_PATH% -B build_dd -DCMAKE_PREFIX_PATH=%CONDA_PREFIX% -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%
if errorlevel 1 (
echo Error: cmake configuration failed.
exit /b 1
)
cmake --build build_dd --target install --config Release
if errorlevel 1 (
echo Error: cmake build or installation failed.
exit /b 1
)
echo Build and installation completed successfully.
endlocal