-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script for running stablehlo tests. (#5360)
* Add kokoro presubmit for stablehlo tests
- Loading branch information
1 parent
c49daaf
commit e7ae1d4
Showing
4 changed files
with
68 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
DEBIAN_FRONTEND=noninteractive | ||
|
||
PYTORCH_DIR="${KOKORO_ARTIFACTS_DIR}/github/pytorch" | ||
XLA_DIR=$PYTORCH_DIR/xla | ||
git clone --quiet https://github.com/pytorch/pytorch.git "$PYTORCH_DIR" | ||
cp -r "${KOKORO_ARTIFACTS_DIR}/github/xla" "$XLA_DIR" | ||
source ${XLA_DIR}/.kokoro/common.sh | ||
|
||
TORCHVISION_COMMIT="$(cat $PYTORCH_DIR/.github/ci_commit_pins/vision.txt)" | ||
|
||
install_environments | ||
|
||
set +e | ||
# build pytorch | ||
pushd $PYTORCH_DIR | ||
pip install --user . | ||
popd | ||
build_torch_xla $XLA_DIR | ||
pushd $XLA_DIR | ||
LOGFILE=/tmp/pytorch_py_test.log | ||
TEST_DIR=test/stablehlo | ||
for FILE in $(ls $TEST_DIR); do | ||
python $TEST_DIR/$FILE | tee $LOGFILE | ||
done | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
# -*- protobuffer -*- | ||
# proto-file: google3/devtools/kokoro/config/proto/build.proto | ||
# proto-message: BuildConfig | ||
|
||
build_file: "xla/.kokoro/build_and_run_stablehlo_tests.sh" | ||
timeout_mins: 360 |