Skip to content

Commit 6b6ef5c

Browse files
authored
Remove tests that are defined outside of this repo. (#9577)
Includes: * TPU info * tests in pytorch/pytorch With this PR, I'd like to stablish the convention of tests: we test stuff defined in this repo only. If we want to test an interation of torch_xla with a third_party library, we would need to define the test itself inside of this repo. Reason for disabling TPU info test: Historically tpu-info commandline tool's source is in this repo, so the test is in this repo. It's source was then moved to https://github.com/AI-Hypercomputer/cloud-accelerator-diagnostics because it's not a Pytorch/XLA specific tool. Now, given that it is released independently, we cannot control it. (see #9568) Reason for disabling pytorch/pytorch: The test themselves are defined in pytorch/pytorch instead of pytorch/xla repo. (the ../.. path goes to the parent folder which is where pytorch/pytorch is cloned). If we find a particular test helpful, we should copy that test into pytorch/xla Historically this list are a tiny subset of the full pytorch/pytorch tests, and is often commented out if failing. i.e. this is merely a list of tests that we found out that happen to pass, not a list that we want to enforce passing.
1 parent b84c83b commit 6b6ef5c

File tree

3 files changed

+0
-143
lines changed

3 files changed

+0
-143
lines changed

test/run_tests.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -135,25 +135,6 @@ function run_pt_xla_debug_level2 {
135135
PT_XLA_DEBUG_LEVEL=2 PT_XLA_DEBUG_FILE="/tmp/pt_xla_debug.txt" run_test "$@"
136136
}
137137

138-
function run_torch_op_tests {
139-
run_dynamic "$_TEST_DIR/../../test/test_view_ops.py" "$@" -v TestViewOpsXLA
140-
run_test_without_functionalization "$_TEST_DIR/../../test/test_view_ops.py" "$@" -v TestViewOpsXLA
141-
run_test "$_TEST_DIR/../../test/test_torch.py" "$@" -v TestTorchDeviceTypeXLA
142-
run_dynamic "$_TEST_DIR/../../test/test_torch.py" "$@" -v TestDevicePrecisionXLA
143-
# TODO https://github.com/pytorch/xla/issues/9459: Investigate why this
144-
# doesn't run any tests.
145-
# run_test "$_TEST_DIR/../../test/test_torch.py" "$@" -v TestTensorDeviceOpsXLA
146-
run_test "$_TEST_DIR/../../test/test_indexing.py" "$@" -v TestIndexingXLA
147-
run_test "$_TEST_DIR/../../test/test_indexing.py" "$@" -v NumpyTestsXLA
148-
# run_dynamic "$_TEST_DIR/../../test/test_nn.py" "$@" -v TestNNDeviceTypeXLA
149-
run_dynamic "$_TEST_DIR/../../test/nn/test_dropout.py" "$@" -v TestDropoutNNDeviceTypeXLA
150-
run_dynamic "$_TEST_DIR/../../test/nn/test_pooling.py" "$@" -v TestPoolingNNDeviceTypeXLA
151-
run_dynamic "$_TEST_DIR/../../test/nn/test_embedding.py" "$@" -v TestEmbeddingNNDeviceTypeXLA
152-
run_dynamic "$_TEST_DIR/../../test/nn/test_convolution.py" "$@" -v TestConvolutionNNDeviceTypeXLA
153-
run_dynamic "$_TEST_DIR/../../test/nn/test_multihead_attention.py" "$@" -v TestMultiheadAttentionNNDeviceTypeXLA
154-
run_dynamic "$_TEST_DIR/../../test/test_type_promotion.py" "$@" -v TestTypePromotionXLA
155-
}
156-
157138
#######################################################################################
158139
################################# XLA OP TESTS SHARDS #################################
159140
#######################################################################################
@@ -300,7 +281,6 @@ function run_xla_op_tests5 {
300281
#######################################################################################
301282

302283
function run_op_tests {
303-
run_torch_op_tests
304284
run_xla_op_tests1
305285
run_xla_op_tests2
306286
run_xla_op_tests3
@@ -350,7 +330,6 @@ function run_tests {
350330
run_xla_op_tests5
351331
elif [[ "$RUN_TORCH_MP_OP_TESTS" == "torch_mp_op" ]]; then
352332
echo "Running torch op tests..."
353-
run_torch_op_tests
354333

355334
PJRT_DEVICE=CPU XLA_CUDA=0 run_mp_op_tests
356335
else
@@ -362,9 +341,6 @@ function run_tests {
362341
run_xla_op_tests4
363342
run_xla_op_tests5
364343
fi
365-
if [[ "$XLA_SKIP_TORCH_OP_TESTS" != "1" ]]; then
366-
run_torch_op_tests
367-
fi
368344
if [[ "$XLA_SKIP_MP_OP_TESTS" != "1" ]]; then
369345
run_mp_op_tests
370346
fi

test/tpu/run_training_tests.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,3 @@ if [[ -n "$TPU_VERSION" && "$TPU_VERSION" == "4" ]]; then
3232
python3 "$_TEST_DIR/../examples/eager/train_decoder_only_eager_multi_process.py"
3333
XLA_EXPERIMENTAL=nonzero:masked_select:nms python3 "$_TEST_DIR/ds/test_dynamic_shapes.py" -v
3434
fi
35-
36-
if [[ -n "$TPU_VERSION" && "$TPU_VERSION" != "6" ]]; then
37-
# Test `tpu-info` CLI compatibility
38-
python3 "$_TPU_DIR/tpu_info/test_cli.py"
39-
fi

test/tpu/tpu_info/test_cli.py

Lines changed: 0 additions & 114 deletions
This file was deleted.

0 commit comments

Comments
 (0)