Skip to content

Commit bd1a5a4

Browse files
authored
Add libtpu configuration to cpp test script (#3957)
1 parent 5059c3b commit bd1a5a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/cpp/run_tests.sh

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ if [[ "$TPUVM_MODE" != "1" ]]; then
4747
export XLA_EXPERIMENTAL
4848
fi
4949

50+
# We need to configure the libtpu path to test on TPUVM
51+
if python -c "import libtpu" &> /dev/null; then
52+
export TPU_LIBRARY_PATH=$(dirname $(python -c "import libtpu; print(libtpu.__file__)"))/libtpu.so
53+
fi
54+
5055
rm -rf "$BUILDDIR"
5156
mkdir "$BUILDDIR" 2>/dev/null
5257
pushd "$BUILDDIR"

0 commit comments

Comments
 (0)