Skip to content

Commit 2bc9ee9

Browse files
nairbvfacebook-github-bot
authored andcommitted
Revert D22418731: [JIT] Add out-of-source-tree to_backend tests
Test Plan: revert-hammer Differential Revision: D22418731 (pytorch@e2a291b) Original commit changeset: 621ba4efc1b1 fbshipit-source-id: 475ae24c5b612fe285035e5ebb92ffc66780a468
1 parent 131a0ea commit 2bc9ee9

File tree

12 files changed

+1
-366
lines changed

12 files changed

+1
-366
lines changed

.jenkins/pytorch/build.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,6 @@ else
233233
make VERBOSE=1
234234
popd
235235
assert_git_not_dirty
236-
237-
# Build custom backend tests.
238-
CUSTOM_BACKEND_BUILD="$PWD/../custom-backend-build"
239-
CUSTOM_BACKEND_TEST="$PWD/test/custom_backend"
240-
python --version
241-
mkdir "$CUSTOM_BACKEND_BUILD"
242-
pushd "$CUSTOM_BACKEND_BUILD"
243-
cmake "$CUSTOM_BACKEND_TEST" -DCMAKE_PREFIX_PATH="$SITE_PACKAGES/torch" -DPYTHON_EXECUTABLE="$(which python)"
244-
make VERBOSE=1
245-
popd
246-
assert_git_not_dirty
247236
else
248237
# Test standalone c10 build
249238
if [[ "$BUILD_ENVIRONMENT" == *xenial-cuda10.1-cudnn7-py3* ]]; then

.jenkins/pytorch/macos-test.sh

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,6 @@ test_libtorch() {
9999
fi
100100
}
101101

102-
test_custom_backend() {
103-
echo "Testing custom backends"
104-
pushd test/custom_backend
105-
rm -rf build && mkdir build
106-
pushd build
107-
SITE_PACKAGES="$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')"
108-
CMAKE_PREFIX_PATH="$SITE_PACKAGES/torch" cmake ..
109-
make VERBOSE=1
110-
popd
111-
112-
# Run Python tests and export a lowered module.
113-
python test_custom_backend.py -v
114-
python backend.py --export-module-to=model.pt
115-
# Run C++ tests using the exported module.
116-
build/test_custom_backend ./model.pt
117-
rm -f ./model.pt
118-
popd
119-
assert_git_not_dirty
120-
}
121-
122102
test_custom_script_ops() {
123103
echo "Testing custom script operators"
124104
pushd test/custom_operator
@@ -144,13 +124,11 @@ if [ -z "${BUILD_ENVIRONMENT}" ] || [[ "${BUILD_ENVIRONMENT}" == *-test ]]; then
144124
test_python_all
145125
test_libtorch
146126
test_custom_script_ops
147-
test_custom_backend
148127
else
149128
if [[ "${BUILD_ENVIRONMENT}" == *-test1 ]]; then
150129
test_python_all
151130
elif [[ "${BUILD_ENVIRONMENT}" == *-test2 ]]; then
152131
test_libtorch
153132
test_custom_script_ops
154-
test_custom_backend
155133
fi
156134
fi

.jenkins/pytorch/test.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -228,23 +228,6 @@ test_libtorch() {
228228
fi
229229
}
230230

231-
test_custom_backend() {
232-
if [[ "$BUILD_ENVIRONMENT" != *rocm* ]] && [[ "$BUILD_ENVIRONMENT" != *asan* ]] ; then
233-
echo "Testing custom backends"
234-
CUSTOM_BACKEND_BUILD="$PWD/../custom-backend-build"
235-
pushd test/custom_backend
236-
cp -a "$CUSTOM_BACKEND_BUILD" build
237-
# Run tests Python-side and export a lowered module.
238-
python test_custom_backend.py -v
239-
python backend.py --export-module-to=model.pt
240-
# Run tests C++-side and load the exported lowered module.
241-
build/test_custom_backend ./model.pt
242-
rm -f ./model.pt
243-
popd
244-
assert_git_not_dirty
245-
fi
246-
}
247-
248231
test_custom_script_ops() {
249232
if [[ "$BUILD_ENVIRONMENT" != *rocm* ]] && [[ "$BUILD_ENVIRONMENT" != *asan* ]] ; then
250233
echo "Testing custom script operators"
@@ -348,7 +331,6 @@ elif [[ "${BUILD_ENVIRONMENT}" == *-test2 || "${JOB_BASE_NAME}" == *-test2 ]]; t
348331
test_aten
349332
test_libtorch
350333
test_custom_script_ops
351-
test_custom_backend
352334
test_torch_function_benchmark
353335
elif [[ "${BUILD_ENVIRONMENT}" == *-bazel-* ]]; then
354336
test_bazel
@@ -364,6 +346,5 @@ else
364346
test_aten
365347
test_libtorch
366348
test_custom_script_ops
367-
test_custom_backend
368349
test_torch_function_benchmark
369350
fi

.jenkins/pytorch/win-test-helpers/test_custom_backend.bat

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

.jenkins/pytorch/win-test.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ run_tests() {
4141
$SCRIPT_HELPERS_DIR/test_python_nn.bat "$DETERMINE_FROM" && \
4242
$SCRIPT_HELPERS_DIR/test_python_all_except_nn.bat "$DETERMINE_FROM" && \
4343
$SCRIPT_HELPERS_DIR/test_custom_script_ops.bat && \
44-
$SCRIPT_HELPERS_DIR/test_custom_backend.bat && \
4544
$SCRIPT_HELPERS_DIR/test_libtorch.bat
4645
else
4746
if [[ "${JOB_BASE_NAME}" == *-test1 ]]; then
4847
$SCRIPT_HELPERS_DIR/test_python_nn.bat "$DETERMINE_FROM" && \
4948
$SCRIPT_HELPERS_DIR/test_libtorch.bat
5049
elif [[ "${JOB_BASE_NAME}" == *-test2 ]]; then
5150
$SCRIPT_HELPERS_DIR/test_python_all_except_nn.bat "$DETERMINE_FROM" && \
52-
$SCRIPT_HELPERS_DIR/test_custom_backend.bat && \
5351
$SCRIPT_HELPERS_DIR/test_custom_script_ops.bat
5452
fi
5553
fi

test/cpp/jit/test_backend.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <torch/csrc/jit/api/module.h>
12
#include <torch/csrc/jit/backends/backend.h>
23

34
namespace torch {

test/custom_backend/CMakeLists.txt

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

test/custom_backend/backend.py

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

test/custom_backend/custom_backend.cpp

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

test/custom_backend/custom_backend.h

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

0 commit comments

Comments
 (0)