Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .circleci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function run_torch_xla_tests() {
export XRT_DEVICE_MAP="CPU:0;/job:localservice/replica:0/task:0/device:XLA_CPU:0"
XLA_PORT=$(shuf -i 40701-40999 -n 1)
export XRT_WORKERS="localservice:0;grpc://localhost:$XLA_PORT"
python torch_xla/core/xrt_run_server.py --port $XLA_PORT --restart
fi
export PYTORCH_TESTING_DEVICE_ONLY_FOR="xla"

Expand Down Expand Up @@ -141,6 +142,11 @@ function run_torch_xla_tests() {
fi
fi

# clear the XRT server before cpp test since CPP test won't run torch_xla's
# __init__.py hence will force a in process server. Note that we can not use
# -m here since we are in the XLA dir. Trying to run the torch_xla module
# from this dir will result in a `version.py` missing error.
python torch_xla/core/xrt_run_server.py --stop
pushd test/cpp
echo "Running C++ Tests"
./run_tests.sh
Expand Down