Skip to content

Commit

Permalink
[Metal] fix metallib path on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
devandong committed Nov 16, 2020
1 parent d7153c9 commit 6d4be13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 4 additions & 3 deletions scripts/build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
SHARED_LIB="ON"
METAL="ON"

CWD=$(cd `dirname $0`; pwd)
SD=$(cd `dirname $0`; pwd)
if [ -z $TNN_ROOT_PATH ]
then
TNN_ROOT_PATH=${CWD}/..
TNN_ROOT_PATH=${SD}/..
fi
CWD=$(pwd)

function CheckRtnAndPrintMsg()
{
Expand Down Expand Up @@ -43,7 +44,7 @@ BUILD_PATH=${CWD}/build_macos
echo "check ${BUILD_PATH}"
if [ ! -f ${BUILD_PATH}/tnn.metallib ]; then
echo "No metallib found!"
exit 0
exit -1
fi
./unit_test --lp ${BUILD_PATH}/tnn.metallib --dt METAL

Expand Down
3 changes: 0 additions & 3 deletions source/tnn/device/metal/build_tnn_metallib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ function BuildMetalLib()

#build metallib
xcrun -sdk macosx metallib ${TNNAllMetalAIRFiles[@]} -o ${TNNMetallibPath}
echo "=============================="
echo ${TNNMetallibPath}
echo "=============================="

#delete air files
for file in ${TNNAllMetalAIRFiles[@]}
Expand Down

0 comments on commit 6d4be13

Please sign in to comment.