Skip to content

Commit d742a28

Browse files
cyyeverpytorchmergebot
authored andcommitted
Remove tensorexpr tests (pytorch#158928)
The tests are not maintained. Pull Request resolved: pytorch#158928 Approved by: https://github.com/albanD, https://github.com/malfet
1 parent 11d6559 commit d742a28

39 files changed

+10
-36802
lines changed

.ci/pytorch/build.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ if [[ ${BUILD_ENVIRONMENT} == *"parallelnative"* ]]; then
5050
export ATEN_THREADING=NATIVE
5151
fi
5252

53-
# Enable LLVM dependency for TensorExpr testing
54-
export USE_LLVM=/opt/llvm
55-
export LLVM_DIR=/opt/llvm/lib/cmake/llvm
5653

5754
if ! which conda; then
5855
# In ROCm CIs, we are doing cross compilation on build machines with
@@ -192,7 +189,6 @@ if [[ "$BUILD_ENVIRONMENT" == *-clang*-asan* ]]; then
192189
export USE_ASAN=1
193190
export REL_WITH_DEB_INFO=1
194191
export UBSAN_FLAGS="-fno-sanitize-recover=all"
195-
unset USE_LLVM
196192
fi
197193

198194
if [[ "${BUILD_ENVIRONMENT}" == *no-ops* ]]; then

.ci/pytorch/test.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,20 +1037,10 @@ test_libtorch_api() {
10371037
mkdir -p $TEST_REPORTS_DIR
10381038

10391039
OMP_NUM_THREADS=2 TORCH_CPP_TEST_MNIST_PATH="${MNIST_DIR}" "$TORCH_BIN_DIR"/test_api --gtest_filter='-IMethodTest.*' --gtest_output=xml:$TEST_REPORTS_DIR/test_api.xml
1040-
"$TORCH_BIN_DIR"/test_tensorexpr --gtest_output=xml:$TEST_REPORTS_DIR/test_tensorexpr.xml
10411040
else
10421041
# Exclude IMethodTest that relies on torch::deploy, which will instead be ran in test_deploy
10431042
OMP_NUM_THREADS=2 TORCH_CPP_TEST_MNIST_PATH="${MNIST_DIR}" python test/run_test.py --cpp --verbose -i cpp/test_api -k "not IMethodTest"
10441043

1045-
# On s390x, pytorch is built without llvm.
1046-
# Even if it would be built with llvm, llvm currently doesn't support used features on s390x and
1047-
# test fails with errors like:
1048-
# JIT session error: Unsupported target machine architecture in ELF object pytorch-jitted-objectbuffer
1049-
# unknown file: Failure
1050-
# C++ exception with description "valOrErr INTERNAL ASSERT FAILED at "/var/lib/jenkins/workspace/torch/csrc/jit/tensorexpr/llvm_jit.h":34, please report a bug to PyTorch. Unexpected failure in LLVM JIT: Failed to materialize symbols: { (main, { func }) }
1051-
if [[ "${BUILD_ENVIRONMENT}" != *s390x* ]]; then
1052-
python test/run_test.py --cpp --verbose -i cpp/test_tensorexpr
1053-
fi
10541044
fi
10551045

10561046
# quantization is not fully supported on s390x yet

aten/src/ATen/test/thread_init_test.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1+
#include <gtest/gtest.h>
2+
13
#include <ATen/ATen.h>
24
#include <ATen/Parallel.h>
35
#include <c10/util/irange.h>
4-
#include <test/cpp/tensorexpr/test_base.h>
56
#include <thread>
67

78

89
// This checks whether threads can see the global
910
// numbers of threads set and also whether the scheduler
1011
// will throw an exception when multiple threads call
1112
// their first parallel construct.
12-
void test(int given_num_threads) {
13+
static void test(int given_num_threads) {
1314
auto t = at::ones({1000 * 1000}, at::CPU(at::kFloat));
1415
ASSERT_TRUE(given_num_threads >= 0);
1516
ASSERT_EQ(at::get_num_threads(), given_num_threads);
@@ -19,7 +20,7 @@ void test(int given_num_threads) {
1920
}
2021
}
2122

22-
int main() {
23+
TEST(ThreadInitTest, ThreadInit) {
2324
at::init_num_threads();
2425

2526
at::set_num_threads(4);
@@ -32,13 +33,11 @@ int main() {
3233

3334
#if !AT_PARALLEL_NATIVE
3435
at::set_num_threads(5);
35-
ASSERT_TRUE(at::get_num_threads() == 5);
36+
ASSERT_EQ(at::get_num_threads(), 5);
3637
#endif
3738

3839
// test inter-op settings
3940
at::set_num_interop_threads(5);
4041
ASSERT_EQ(at::get_num_interop_threads(), 5);
4142
ASSERT_ANY_THROW(at::set_num_interop_threads(6));
42-
43-
return 0;
4443
}

caffe2/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,10 +1346,6 @@ if(BUILD_TEST)
13461346
add_subdirectory(${TORCH_ROOT}/test/cpp/jit ${CMAKE_BINARY_DIR}/test_jit)
13471347
add_subdirectory(${TORCH_ROOT}/test/cpp/nativert ${CMAKE_BINARY_DIR}/test_nativert)
13481348
add_subdirectory(${TORCH_ROOT}/test/inductor ${CMAKE_BINARY_DIR}/test_inductor)
1349-
add_subdirectory(
1350-
${TORCH_ROOT}/test/cpp/tensorexpr
1351-
${CMAKE_BINARY_DIR}/test_tensorexpr
1352-
)
13531349
if(USE_DISTRIBUTED)
13541350
add_subdirectory(${TORCH_ROOT}/test/cpp/c10d ${CMAKE_BINARY_DIR}/test_cpp_c10d)
13551351
if(NOT WIN32)

test/cpp/tensorexpr/CMakeLists.txt

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

test/cpp/tensorexpr/README.md

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

test/cpp/tensorexpr/gtest_assert_float_eq.h

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

test/cpp/tensorexpr/padded_buffer.cpp

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

0 commit comments

Comments
 (0)