pytorch/test
Peter Bell 4b09b08d2e Fix recompilation issue with content store (#113533)
While running the accuracy minifier, I was getting the error:
```
NotImplementedError("xor_sum only implemented with inductor")
```

The logs showed that the cache limit was exceeded, and it was falling back to
eager mode which doesn't work for this function. The cache failures was due to
the code guarding on the id of the function being compiled which in this case is
a closure that gets re-created for each function call so the guard always fails.

This fixes the issue by making the storage hash kernel a global function and
working around the dynamo dependency by the `lazy_compile` helper which defers
the `torch.compile` call to the first invocation.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/113533
Approved by: https://github.com/Skylion007
2023-11-13 23:58:13 +00:00
..
ao/sparsity
autograd
backends/xeon
benchmark_utils
bottleneck_test
cpp [NCCL PG] ADD a separate monitoring thread to ensure we collect debug info and check watchdog heartbeat (#112518) 2023-11-10 04:41:14 +00:00
cpp_api_parity
cpp_extensions new_qtensor support privateuseone allocator. (#111464) 2023-11-01 05:16:58 +00:00
custom_backend
custom_operator Update impl_abstract_pystub to be less boilerplatey (#113182) 2023-11-08 00:39:00 +00:00
distributed [dtensor] refactor op dispatch and fix is_same_size/equal (#112927) 2023-11-13 22:46:31 +00:00
distributions Add Half support for poisson and use float for Half cumulative distribution on CPU (#112124) 2023-11-05 16:10:27 +00:00
dynamo Support logging aliases to list of modules (#113567) 2023-11-13 23:35:18 +00:00
edge Enable Wno-unused-private-field,Wunused-lambda-capture and fix CUDA warnings (#110856) 2023-10-25 03:39:05 +00:00
error_messages
expect Enable masked_scatter_backward for inductor (#109642) 2023-11-09 01:27:57 +00:00
export Revert "[pytree] register pytree node type in both C++ pytree and Python pytree (#112111)" 2023-11-10 17:24:40 +00:00
forward_backward_compatibility expose mem-eff to autograd (#110495) 2023-11-13 17:47:40 +00:00
functorch Revert "AOTAutograd: handle set_(), detect metadata mutations that cancel out (#111554)" 2023-11-13 21:46:57 +00:00
fx Fix typo under test directory (#112346) 2023-11-03 07:53:33 +00:00
inductor [aotinductor] add versions for the sdpa shim api (#113487) 2023-11-13 20:18:58 +00:00
jit Add support for torch.Generator type in TorchScript (#110413) 2023-11-13 23:18:14 +00:00
jit_hooks
lazy Add support for torch.Generator type in TorchScript (#110413) 2023-11-13 23:18:14 +00:00
mobile [TorchFix] Update old pretrained TorchVision API in tests (#111708) 2023-10-21 07:05:33 +00:00
nn Update skip reason for failing unit tests on ROCm 5.7 (#113286) 2023-11-13 19:29:04 +00:00
onnx Revert "[ONNX] Fix scalar type promotion between fp16 tensor and fp32 scalar (#113404)" 2023-11-13 14:56:35 +00:00
onnx_caffe2
optim Deprecated verbose parameter in LR schedulers (#111302) 2023-11-10 23:17:27 +00:00
package
profiler Revert "[pytree] reorganize submodule structure for C++ and Python pytree (#112278)" 2023-11-10 16:30:36 +00:00
quantization Enables copy/clone/reshape/contiguous operations for bits types (#113508) 2023-11-11 22:51:50 +00:00
scripts
test_img
torch_np [BE]: Enable ruff PIE794 and fix bugs it found in test suite (#112989) 2023-11-05 22:11:53 +00:00
typing Add regression test for cuda_stream type checks (#111430) 2023-10-18 07:24:01 +00:00
_test_bazel.py
allowlist_for_publicAPI.json [quant][pt2e] Add transform_for_annotation method in Quantizer (#113115) 2023-11-09 20:23:29 +00:00
conftest.py
create_dummy_torchscript_model.py
delete.py
HowToWriteTestsUsingFileCheck.md
linear.py
load_torchscript_model.py
minioptest_failures_dict.json
mkl_verbose.py
mkldnn_verbose.py
run_doctests.sh
run_test.py [experiment][TD] Rating number system (#112676) 2023-11-07 19:40:11 +00:00
simulate_nccl_errors.py
test_ao_sparsity.py
test_autocast.py
test_autograd.py [contextlib] Wrapping a function with set_grad_enabled will consume its global mutation (#113359) 2023-11-09 19:16:20 +00:00
test_autograd_fallback.py
test_binary_ufuncs.py Add Half for aten2, logaddexp, logaddexp2, hypot, and nextafter on CPU (#112138) 2023-11-06 06:01:29 +00:00
test_bundled_images.py
test_bundled_inputs.py
test_comparison_utils.py
test_compile_benchmark_util.py
test_complex.py
test_content_store.py Fix recompilation issue with content store (#113533) 2023-11-13 23:58:13 +00:00
test_cpp_api_parity.py
test_cpp_extensions_aot.py
test_cpp_extensions_jit.py
test_cpp_extensions_open_device_registration.py new_qtensor support privateuseone allocator. (#111464) 2023-11-01 05:16:58 +00:00
test_cuda.py [PyTorch Pinned Allocator] Create per thread task pool for mapping memory space (#111545) 2023-10-22 00:23:49 +00:00
test_cuda_expandable_segments.py
test_cuda_multigpu.py
test_cuda_nvml_based_avail.py
test_cuda_primary_ctx.py
test_cuda_sanitizer.py
test_cuda_trace.py
test_custom_ops.py Grandfather in built-in TorchScript ops to being pt2_compliant (#113061) 2023-11-09 02:35:33 +00:00
test_dataloader.py [BE]: Apply FURB145 to make code more readable and idiomatic. (#112990) 2023-11-06 13:15:04 +00:00
test_datapipe.py
test_decomp.py [decomp] Fix _scaled_dot_product_flash_attention decomposition bug (#113102) 2023-11-08 21:47:37 +00:00
test_deploy.py
test_determination.py
test_dispatch.py
test_dlpack.py
test_dynamic_shapes.py [FX][CodeGen] Make sure fx code is valid in python (#113345) 2023-11-10 21:12:16 +00:00
test_expanded_weights.py
test_fake_tensor.py Fix FakeTensor tolist when size is not symbolic (#112206) 2023-10-30 19:25:10 +00:00
test_flop_counter.py Updated flop counter to accept pytree inputs/outputs (#111990) 2023-10-26 01:25:27 +00:00
test_foreach.py Update skip reason for failing unit tests on ROCm 5.7 (#113286) 2023-11-13 19:29:04 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_functional_optim.py
test_functionalization.py Skip aliasing correction for lift_fresh. (#112202) 2023-11-03 20:46:30 +00:00
test_functionalization_of_rng_ops.py
test_futures.py
test_fx.py Use pytree.tree_leaves everywhere (#112324) 2023-10-30 03:39:04 +00:00
test_fx_experimental.py
test_fx_passes.py
test_fx_reinplace_pass.py
test_hub.py
test_import_stats.py
test_indexing.py
test_itt.py
test_jit.py Add support for torch.Generator type in TorchScript (#110413) 2023-11-13 23:18:14 +00:00
test_jit_autocast.py
test_jit_disabled.py
test_jit_fuser.py
test_jit_fuser_legacy.py
test_jit_fuser_te.py
test_jit_legacy.py
test_jit_llga_fuser.py
test_jit_profiling.py
test_jit_simple.py
test_jit_string.py
test_jiterator.py
test_kernel_launch_checks.py
test_legacy_vmap.py
test_license.py
test_linalg.py disable test int_mm for sm90 or later (#113327) 2023-11-13 22:13:44 +00:00
test_logging.py
test_masked.py
test_maskedtensor.py
test_matmul_cuda.py [CUDA][cuBLAS] Separate reduced precision reductions on/off for addmm tests (#112545) 2023-11-07 19:09:29 +00:00
test_meta.py [pt2] enable meta tests for foreach ops (#113484) 2023-11-11 02:43:41 +00:00
test_metal.py
test_mkl_verbose.py
test_mkldnn.py [TorchFix] Update old pretrained TorchVision API in tests (#111708) 2023-10-21 07:05:33 +00:00
test_mkldnn_fusion.py
test_mkldnn_verbose.py
test_mobile_optimizer.py
test_model_dump.py
test_model_exports_to_core_aten.py
test_module_init.py
test_modules.py Use pytree.tree_leaves everywhere (#112324) 2023-10-30 03:39:04 +00:00
test_monitor.py
test_mps.py [MPS] Fix crashes during Conv backward pass (#113398) 2023-11-10 04:29:33 +00:00
test_multiprocessing.py
test_multiprocessing_spawn.py
test_namedtensor.py Fix torch.[size|stride](dim=None)` invocation (#111991) 2023-10-26 04:14:35 +00:00
test_namedtuple_return_api.py
test_native_functions.py
test_native_mha.py
test_nestedtensor.py Implement narrow from a regular tensor to jagged tensor (#112770) 2023-11-13 19:09:59 +00:00
test_nn.py [ROCm] fix test_softmax_forward_64bit_indexing_cuda OOM (#113093) 2023-11-07 03:00:37 +00:00
test_nnapi.py
test_numba_integration.py
test_numpy_interop.py
test_openmp.py
test_ops.py fix: Flake8-BugBear code B-026 for PyTorch (#111362) 2023-11-07 21:38:18 +00:00
test_ops_fwd_gradients.py s390x: skip tests relying on specific openblas precision (#112843) 2023-11-07 17:18:20 +00:00
test_ops_gradients.py
test_ops_jit.py
test_optim.py
test_out_dtype_op.py
test_overrides.py
test_package.py
test_per_overload_api.py
test_prims.py
test_proxy_tensor.py Allow inferring divisibility on unbacked SymInts and do replacement trick (#113165) 2023-11-10 21:28:02 +00:00
test_pruning_op.py [dynamo] Eagerly install guards (#111415) 2023-11-07 19:55:19 +00:00
test_public_bindings.py Add support for torch.Generator type in TorchScript (#110413) 2023-11-13 23:18:14 +00:00
test_python_dispatch.py Make numel/sym_numel PyInterpreter work symmetrically to others (#113065) 2023-11-08 17:44:29 +00:00
test_pytree.py Revert "[pytree] reorganize submodule structure for C++ and Python pytree (#112278)" 2023-11-10 16:30:36 +00:00
test_quantization.py
test_reductions.py Add Half support for cummax, cummin, cumprod, logcumsumexp, and prod on CPU (#112132) 2023-11-05 12:31:38 +00:00
test_scatter_gather_ops.py
test_schema_check.py
test_segment_reductions.py
test_serialization.py
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py
test_show_pickle.py
test_sort_and_select.py Fix buffer overflow in torch.sort (#111672) 2023-10-21 02:30:11 +00:00
test_sparse.py Add Half support for cummax, cummin, cumprod, logcumsumexp, and prod on CPU (#112132) 2023-11-05 12:31:38 +00:00
test_sparse_csr.py [dynamo] Eagerly install guards (#111415) 2023-11-07 19:55:19 +00:00
test_sparse_semi_structured.py [sparse] semi-structured sparse + torch.compile support (#111049) 2023-10-24 02:23:20 +00:00
test_spectral_ops.py
test_stateless.py
test_static_runtime.py Skip test_fork_wait_4 and test_fork_wait_4_async (#112743) 2023-11-02 20:46:29 +00:00
test_subclass.py
test_sympy_utils.py
test_tensor_creation_ops.py Remove unecessary warning when getting storage.filename (#113212) 2023-11-08 02:09:59 +00:00
test_tensorboard.py
test_tensorexpr.py
test_tensorexpr_pybind.py
test_testing.py Revert "[Kineto] Initialize libkineto profilers during torch init process during pybind set-up (#112623)" 2023-11-11 00:35:56 +00:00
test_throughput_benchmark.py
test_torch.py Fix UntypedStorage.resize_ to keep same CUDA device index (#113386) 2023-11-10 01:57:25 +00:00
test_transformers.py [BE] Cleanup sdpa test helper usage (#113294) 2023-11-09 01:16:53 +00:00
test_type_hints.py
test_type_info.py
test_type_promotion.py Make addc[mul|div] support different out dtypes (#112682) 2023-11-03 17:03:06 +00:00
test_typing.py [BE] Revive test_typing (#111428) 2023-10-18 02:19:49 +00:00
test_unary_ufuncs.py
test_utils.py
test_view_ops.py
test_vulkan.py
test_weak.py
test_xnnpack_integration.py