pytorch/test
Michael Suo e5ae0e652d [jit] Allow instance overrides of ignored methods (#61076)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61076

Previously we would always retrieve ignored methods from the
type, which doesn't work when the user has overriden the ignored method
for a specific instance.

This PR changes things up so we retrieve the ignored method as a bound
method from the object being scripted, unwrap it, then re-bind it to the
scriptmodule.

Test Plan: Imported from OSS

Differential Revision: D29504421

Pulled By: suo

fbshipit-source-id: 14649863ea69a8d2180dd2c4341ec9a826039de1
2021-07-01 09:26:30 -07:00
..
ao/sparsity [pruning] Additional pruning tests (#60681) 2021-06-28 12:58:20 -07:00
backward_compatibility [BackwardCompatibility] Remove aten::to from allow_list (#60147) 2021-06-24 22:57:57 -07:00
benchmark_utils Make torch.utils.bencmark numpy free (#60564) 2021-06-30 14:17:32 -07:00
bottleneck_test
cpp Add IMethod interface 2021-06-30 11:28:24 -07:00
cpp_api_parity ENH Adds nn.ReflectionPad3d (#59791) 2021-06-21 10:53:14 -07:00
cpp_extensions Fix UB in library.h (#57962) 2021-05-11 16:04:02 -07:00
custom_backend [Pytorch backend delegation] Preprocess to accept (#58873) 2021-06-11 10:16:00 -07:00
custom_operator
distributed Remove extraneous process group agent test code (#60903) 2021-06-29 14:21:56 -07:00
distributions Skips failing MacOS tests (#60348) 2021-06-21 01:35:36 -07:00
error_messages
expect [jit] Set debug name for value coming out of GetAttr nodes. (#59123) 2021-06-09 12:24:55 -07:00
fx
jit [jit] Allow instance overrides of ignored methods (#61076) 2021-07-01 09:26:30 -07:00
jit_hooks
mobile [PyTorch][Edge] Adding tests for lite quantized models (#60226) 2021-06-21 15:09:42 -07:00
onnx Add new_ones symbolic (#59255) (#59539) 2021-06-17 15:49:24 -07:00
optim To add Rectified Adam Algorithm to Optimizers (#58968) 2021-06-23 18:27:57 -07:00
package [package] typing.io/re edge case hack (#60666) 2021-06-24 14:53:46 -07:00
quantization [pyper][emb][quantization] Support emb trained in FP16 (#60736) 2021-07-01 07:35:59 -07:00
scripts Disallow versionless Python shebangs (#58275) 2021-05-14 08:26:02 -07:00
test_img
typing
HowToWriteTestsUsingFileCheck.md
linear.py
run_test.py Use expecttest from PyPI (#60658) 2021-06-28 15:43:34 -07:00
simulate_nccl_errors.py
test_ao_sparsity.py [sparsity][refactor] Restructure the tests folders (#60032) 2021-06-15 13:37:19 -07:00
test_autocast.py enable torch.cpu.amp.autocast (#57386) 2021-05-20 17:48:36 -07:00
test_autograd.py Add noop register hook (#60685) 2021-06-30 07:46:34 -07:00
test_binary_ufuncs.py Test parametrization for instantiated device-specific tests (#60233) 2021-06-30 18:50:22 -07:00
test_bundled_images.py
test_bundled_inputs.py [Pytorch] Remove run_on_bundled_input (#58344) 2021-05-17 12:44:00 -07:00
test_complex.py
test_cpp_api_parity.py
test_cpp_extensions_aot.py
test_cpp_extensions_jit.py Fix breakpad build and add to more images (#59236) 2021-06-01 22:47:14 -07:00
test_cuda.py [CUDA graphs][BC-breaking] Removes post-backward syncs on default stream (#60421) 2021-06-24 17:34:02 -07:00
test_cuda_primary_ctx.py
test_dataloader.py fix for #60319 , forcing to use fork as start method in test/test_dat… (#60868) 2021-06-29 09:30:37 -07:00
test_datapipe.py [DataLoader] Rename transform DataPipe to legacy_transform (#60670) 2021-06-30 09:49:14 -07:00
test_determination.py Disable group group backend rpc tests from running on CI (#60407) 2021-06-23 10:58:31 -07:00
test_dispatch.py Expose findDanglingImpls to Python (#60827) 2021-06-30 12:31:19 -07:00
test_foreach.py Revert D29007258: Revert D28926135: [pytorch][PR] Refactor Foreach Tests: Unary Functions 2021-06-09 21:02:56 -07:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_futures.py remove unused type: ignore directives (#60006) 2021-06-18 07:23:31 -07:00
test_fx.py [special] add zeta (#59623) 2021-06-24 00:00:12 -07:00
test_fx_experimental.py [special] add zeta (#59623) 2021-06-24 00:00:12 -07:00
test_gen_backend_stubs.py remove xla-specific stuff from codegen (minus CPU fallback) (#58064) 2021-05-26 12:52:13 -07:00
test_import_time.py First step to rearrange files in tools folder (#60473) 2021-06-24 10:13:58 -07:00
test_indexing.py don't copy indices to the self device in dispatch_index (#59059) 2021-05-27 14:19:59 -07:00
test_jit.py Enable jit tracing to parametrization and add jit tests (#60969) 2021-06-30 23:54:02 -07:00
test_jit_cuda_fuser.py Gelu Backward, Contribution from Kevin Stephano (#58249) 2021-05-13 19:39:39 -07:00
test_jit_disabled.py
test_jit_fuser.py
test_jit_fuser_legacy.py
test_jit_fuser_te.py [nnc] Get rid of fuser trigger counters (#57334) 2021-06-29 22:22:15 -07:00
test_jit_legacy.py
test_jit_profiling.py
test_jit_simple.py
test_jit_string.py
test_kernel_launch_checks.py Paren-matching kernel launch check without external deps (#60778) 2021-06-28 10:18:04 -07:00
test_license.py
test_linalg.py Fix degenerate shape behavior for ord=+/-2 (#60273) 2021-06-30 02:17:26 -07:00
test_logging.py
test_metal.py
test_mkldnn.py
test_mobile_optimizer.py s/foward/forward/g (#58497) 2021-05-19 11:42:42 -07:00
test_model_dump.py
test_module_init.py ENH Adds nn.ReflectionPad3d (#59791) 2021-06-21 10:53:14 -07:00
test_multiprocessing.py
test_multiprocessing_spawn.py
test_namedtensor.py Stop warning on .names() access in max_pool2d and max_pool2d_backward (#60059) 2021-06-17 10:34:41 -07:00
test_namedtuple_return_api.py Implement histogram operator on CPU (#58780) 2021-06-22 10:06:04 -07:00
test_native_functions.py
test_nn.py add BFloat16 support for LayerNorm CPU (#55210) 2021-06-29 14:08:30 -07:00
test_nnapi.py
test_numba_integration.py
test_numpy_interop.py
test_openmp.py
test_ops.py Test parametrization for instantiated device-specific tests (#60233) 2021-06-30 18:50:22 -07:00
test_optim.py To add Nesterov Adam algorithm for multi-tensor optimizers API (#59165) 2021-06-27 17:00:41 -07:00
test_overrides.py Do not wrap Tensor.{grad,_base} by default (#60464) 2021-06-22 12:49:23 -07:00
test_package.py
test_profiler.py Update Kineto submodule (#58179) 2021-05-13 04:03:04 -07:00
test_pruning_op.py
test_public_bindings.py
test_python_dispatch.py Dispatch to Python via __torch_dispatch__ (#59760) 2021-06-25 11:50:32 -07:00
test_pytree.py
test_quantization.py [quant] Implemented InputWeightObserver for Linear inputs 2021-06-07 11:19:43 -07:00
test_reductions.py up the priority of numpy array comparisons in self.assertEqual (#59067) 2021-06-22 13:07:07 -07:00
test_segment_reductions.py [torch][segment_reduce] Add support for sum and min reductions (#60379) 2021-06-23 18:51:44 -07:00
test_serialization.py
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py [Testing] Adding reference tests to OpInfo class (#59369) 2021-06-23 19:26:08 -07:00
test_show_pickle.py
test_sort_and_select.py topk on CUDA supports bfloat16 (#59977) 2021-06-22 23:39:24 -07:00
test_sparse.py Test parametrization for instantiated device-specific tests (#60233) 2021-06-30 18:50:22 -07:00
test_sparse_csr.py Test parametrization for instantiated device-specific tests (#60233) 2021-06-30 18:50:22 -07:00
test_spectral_ops.py Add PocketFFT support (#60976) 2021-06-30 16:28:20 -07:00
test_static_runtime.py
test_tensor_creation_ops.py Revert D29330585: [pytorch][PR] add BFloat16 support for arange on CPU 2021-06-24 20:57:43 -07:00
test_tensorboard.py
test_tensorexpr.py [nnc] Get rid of fuser trigger counters (#57334) 2021-06-29 22:22:15 -07:00
test_tensorexpr_pybind.py [TensorExpr] More python binding cleanups (#60058) 2021-06-16 20:06:08 -07:00
test_testing.py add support for quantized tensors in torch.testing.assert_close (#58926) 2021-06-30 21:43:02 -07:00
test_throughput_benchmark.py
test_torch.py Implemented torch.corrcoef (#60420) 2021-06-30 12:36:02 -07:00
test_type_hints.py
test_type_info.py
test_type_promotion.py
test_typing.py
test_unary_ufuncs.py Fix test failures with some glibc libraries (#60450) 2021-06-23 07:49:27 -07:00
test_utils.py Add device runtime API for the plug-in to register platform python module into torch (#59857) 2021-06-23 07:54:45 -07:00
test_view_ops.py Improve testing of inplace views (#59891) 2021-06-22 12:28:09 -07:00
test_vmap.py Improve testing of inplace views (#59891) 2021-06-22 12:28:09 -07:00
test_vulkan.py
test_xnnpack_integration.py