pytorch/test
Yuanhao Ji 312652c325 [RFC] Add support for device extension autoloading (#127074)
Fixes #122468

- Load device extensions at the end of `torch/__init__.py`
- Enabled by default, or you can disable it with `TORCH_DEVICE_BACKEND_AUTOLOAD=0`

run test:

```python
python test/run_test.py -i test_autoload_enable
python test/run_test.py -i test_autoload_disable
```

doc:

https://docs-preview.pytorch.org/pytorch/pytorch/127074/miscellaneous_environment_variables.html

co-author:  @jgong5 @bsochack @bkowalskiINTEL @jczaja @FFFrog @hipudding

Co-authored-by: albanD <desmaison.alban@gmail.com>
Co-authored-by: Jiong Gong <jiong.gong@intel.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/127074
Approved by: https://github.com/albanD, https://github.com/jgong5
2024-07-09 06:14:13 +00:00
..
ao/sparsity
autograd
backends/xeon
benchmark_utils
bottleneck_test
cpp Remove unused type traits in torch/csrc/utils (#128799) 2024-06-27 23:51:18 +00:00
cpp_api_parity
cpp_extensions [RFC] Add support for device extension autoloading (#127074) 2024-07-09 06:14:13 +00:00
custom_backend
custom_operator [custom ops] convert string type annotation to real type (#128809) 2024-06-18 00:55:50 +00:00
distributed [Pipelining] Reorder _Action from F1_1 to 1F1 (#129786) 2024-07-08 23:07:51 +00:00
distributions
dynamo Enhancements to recompiles logs (#130043) 2024-07-09 03:40:56 +00:00
dynamo_expected_failures [dynamo][user-defined] Simplify and improve scope of UserDefinedObject var_getattr (#130169) 2024-07-08 04:10:56 +00:00
dynamo_skips Dynamo testing: add some skips (#128734) 2024-06-14 20:53:30 +00:00
edge
error_messages [Ez][BE]: Enable new stable ruff rules (#129825) 2024-07-02 14:47:10 +00:00
expect Make _embedding_bag_backward explicitly dispatch to CPU and CUDA. (#129691) 2024-07-03 21:54:49 +00:00
export [runtime asserts] deduplicate runtime asserts & CSE (#128599) 2024-07-07 20:10:14 +00:00
forward_backward_compatibility [Inductor][Quant] Change the schema of QLinear Binary (#129049) 2024-07-02 12:36:38 +00:00
functorch Ignore functional tensor wrapper when caching (#128335) 2024-07-08 18:39:20 +00:00
fx Save DOT file of graph instead of SVG for GraphTranformObserver (#128634) 2024-06-14 00:54:22 +00:00
higher_order_ops [Inductor] Fix the High Order Op layout issue (#128275) 2024-06-15 00:33:21 +00:00
inductor [issue scrubbing] Fix imports in test_memory_planning.py to work with pytest (#130275) 2024-07-09 05:20:56 +00:00
jit [BE][Easy] replace import pathlib with from pathlib import Path (#129426) 2024-06-30 01:36:07 +00:00
jit_hooks
lazy [BE][Easy] replace import pathlib with from pathlib import Path (#129426) 2024-06-30 01:36:07 +00:00
mobile Revert "[BE][Easy] use pathlib.Path instead of dirname / ".." / pardir (#129374)" 2024-06-29 00:47:15 +00:00
nn Fix max_pool2d decomposition for empty list and integer limits (#129106) 2024-06-24 22:19:42 +00:00
onnx Set seed per sample for OpInfo tests + support for restricting to a single sample input (#128238) 2024-07-08 16:06:38 +00:00
optim
package
profiler Skip test_profile_memory on windows (#130037) 2024-07-08 16:11:51 +00:00
quantization Change numeric_debug_handle to store per-node id (#129811) 2024-07-08 23:36:19 +00:00
scripts
test_img
torch_np [BE][Easy] replace import pathlib with from pathlib import Path (#129426) 2024-06-30 01:36:07 +00:00
typing added type hints for __contains__ (#129653) 2024-06-30 11:49:11 +00:00
xpu
_test_bazel.py
allowlist_for_publicAPI.json Evaluate symexprs on load path of cache not write (#128997) 2024-06-20 08:55:12 +00:00
conftest.py run_test: Unset cpp stacktraces after reruns (#129004) 2024-07-03 01:50:15 +00:00
create_dummy_torchscript_model.py
delete.py
hi.py
HowToWriteTestsUsingFileCheck.md
linear.py
load_torchscript_model.py
minioptest_failures_dict.json
mkl_verbose.py
mkldnn_verbose.py
pytest_shard_custom.py
run_doctests.sh
run_test.py [RFC] Add support for device extension autoloading (#127074) 2024-07-09 06:14:13 +00:00
simulate_nccl_errors.py
test_ao_sparsity.py
test_autocast.py Revert "[MPS] Add support for autocast in MPS (#99272)" 2024-07-02 12:29:51 +00:00
test_autograd.py [Ez][BE]: Enable new stable ruff rules (#129825) 2024-07-02 14:47:10 +00:00
test_autograd_fallback.py
test_autoload.py [RFC] Add support for device extension autoloading (#127074) 2024-07-09 06:14:13 +00:00
test_binary_ufuncs.py [BE]: Update ruff to 0.5.0 (#129744) 2024-06-28 21:49:56 +00:00
test_bundled_images.py
test_bundled_inputs.py
test_ci_sanity_check_fail.py
test_comparison_utils.py
test_compile_benchmark_util.py
test_complex.py
test_content_store.py
test_cpp_api_parity.py
test_cpp_extensions_aot.py
test_cpp_extensions_jit.py
test_cpp_extensions_mtia_backend.py
test_cpp_extensions_open_device_registration.py
test_cpp_extensions_stream_and_event.py [RELAND] Add xpu to getAccelerator (#129205) 2024-07-04 10:26:52 +00:00
test_cuda.py fixes #124582 (#128483) 2024-07-02 08:45:59 +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 Revert "Add API for open registration between operators and subclasses (and modes) (#130064)" 2024-07-09 01:48:38 +00:00
test_dataloader.py [BE] enable UFMT for torch/storage.py (#127706) 2024-06-27 23:16:24 +00:00
test_datapipe.py
test_decomp.py Set seed per sample for OpInfo tests + support for restricting to a single sample input (#128238) 2024-07-08 16:06:38 +00:00
test_deploy.py
test_determination.py [Caffe2] [2/N] Remove Caffe2 from tests (#128911) 2024-06-19 00:05:50 +00:00
test_dispatch.py
test_dlpack.py
test_dynamic_shapes.py Make sympify'ing SymInt/etc produce their sympy expression (#130166) 2024-07-06 03:56:45 +00:00
test_expanded_weights.py
test_fake_tensor.py [BE] update type annotations for basic utilities in torch/__init__.py (#129001) 2024-06-24 18:04:38 +00:00
test_flop_counter.py [cuDNN][SDPA] Remove TORCH_CUDNN_SDPA_ENABLED=1, enable cuDNN SDPA by default on H100 and 2nd on other archs >= sm80 (#125343) 2024-06-30 19:22:16 +00:00
test_foreach.py Fix the rest of foreach flakers (#130277) 2024-07-09 02:08:21 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_functional_optim.py
test_functionalization.py
test_functionalization_of_rng_ops.py [dynamo][aot autograd] Silently disable default saved tensor hooks during tracing (#123196) 2024-06-14 20:28:08 +00:00
test_futures.py
test_fx.py
test_fx_experimental.py Add aten._unsafe_masked_index (#116491) 2024-06-25 02:45:02 +00:00
test_fx_passes.py
test_fx_reinplace_pass.py
test_hub.py
test_import_stats.py
test_indexing.py Change index_put on GPU to accept FP8 inputs (#128758) 2024-06-25 00:38:03 +00:00
test_itt.py
test_jit.py test_jit: Replace plain assert by test assert (#128950) 2024-06-25 09:04:53 +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 Fix manual licensing (#128630) 2024-06-14 00:12:09 +00:00
test_linalg.py Revert "[ROCm] Add int4 support (#129710)" 2024-07-08 16:07:53 +00:00
test_logging.py
test_masked.py
test_maskedtensor.py Set seed per sample for OpInfo tests + support for restricting to a single sample input (#128238) 2024-07-08 16:06:38 +00:00
test_matmul_cuda.py Updates to scaled_mm for rowwise scaling (#130059) 2024-07-04 00:53:17 +00:00
test_meta.py
test_metal.py
test_mkl_verbose.py
test_mkldnn.py
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_tracker.py
test_modules.py
test_monitor.py
test_mps.py Set seed per sample for OpInfo tests + support for restricting to a single sample input (#128238) 2024-07-08 16:06:38 +00:00
test_multiprocessing.py Enable sharing meta tensors between processes (#129520) 2024-07-04 20:29:48 +00:00
test_multiprocessing_spawn.py
test_namedtensor.py
test_namedtuple_return_api.py sdp::SDPBackend::flash_attention support PrivateUse1 (#126392) 2024-06-28 17:48:40 +00:00
test_native_functions.py
test_native_mha.py
test_nestedtensor.py Accept min / max sequence length in nested_tensor_from_jagged() constructor (#130175) 2024-07-08 22:14:52 +00:00
test_nn.py Forward fix the missing torch.nn.Module.set_submodule from D59140215 (#130075) 2024-07-04 17:46:56 +00:00
test_nnapi.py
test_numba_integration.py
test_numpy_interop.py
test_openmp.py [BE] enable UFMT for torch/storage.py (#127706) 2024-06-27 23:16:24 +00:00
test_ops.py
test_ops_fwd_gradients.py
test_ops_gradients.py
test_ops_jit.py
test_optim.py [Optim][BE] Change str(device) to _get_device_type(device) (#129984) 2024-07-04 06:44:48 +00:00
test_out_dtype_op.py
test_overrides.py
test_package.py
test_per_overload_api.py
test_prims.py
test_proxy_tensor.py Introduce int_oo (#127693) 2024-06-13 04:08:20 +00:00
test_pruning_op.py
test_public_bindings.py Enable UFMT on test/test_public_bindings.py (#128389) 2024-07-03 01:43:41 +00:00
test_python_dispatch.py
test_pytree.py
test_quantization.py
test_reductions.py Errors when 0-dim tensor of complex or bool type passed to aminmax. (#128404) 2024-06-24 21:46:49 +00:00
test_scatter_gather_ops.py
test_schema_check.py
test_segment_reductions.py
test_serialization.py [BE][Easy] replace import pathlib with from pathlib import Path (#129426) 2024-06-30 01:36:07 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py
test_show_pickle.py
test_sort_and_select.py Remove global variable SIZE, and fix linter warning (#128559) 2024-06-13 22:09:51 +00:00
test_sparse.py
test_sparse_csr.py
test_sparse_semi_structured.py [CUDA][Sparse] Change comparison function of test_sparse_semi_structured.py and bump tolerances for sp24_matmuls (#128553) 2024-06-13 06:58:07 +00:00
test_spectral_ops.py
test_stateless.py
test_static_runtime.py
test_subclass.py
test_sympy_utils.py Introduce int_oo (#127693) 2024-06-13 04:08:20 +00:00
test_tensor_creation_ops.py Fix Storage.filename to not track the filename when storage was mmap-ed with MAP_PRIVATE (#128725) 2024-06-17 18:55:47 +00:00
test_tensorboard.py [dynamo][user-defined] Simplify and improve scope of UserDefinedObject var_getattr (#130169) 2024-07-08 04:10:56 +00:00
test_tensorexpr.py
test_tensorexpr_pybind.py
test_testing.py [inductor] Add lowering and codegen for aten.sort (#128458) 2024-06-26 01:36:39 +00:00
test_throughput_benchmark.py
test_torch.py [Caffe2] [2/N] Remove Caffe2 from tests (#128911) 2024-06-19 00:05:50 +00:00
test_transformers.py Skip TestSDPAPrivateUse1Only on FBCODE (#129997) 2024-07-03 06:48:51 +00:00
test_type_hints.py Fix test test_type_hints.py::TestTypeHints::test_doc_examples (#129829) 2024-07-01 13:28:37 +00:00
test_type_info.py
test_type_promotion.py
test_typing.py Revert "[BE][Easy] use pathlib.Path instead of dirname / ".." / pardir (#129374)" 2024-06-29 00:47:15 +00:00
test_unary_ufuncs.py
test_utils.py Flip default value for mypy disallow_untyped_defs [final] (#127836) 2024-06-12 15:28:42 +00:00
test_view_ops.py
test_vulkan.py
test_weak.py
test_xnnpack_integration.py Enable UFMT for numpy_test files, test_xnnpack_integration.py (#129023) 2024-06-28 05:40:31 +00:00
test_xpu.py Refine XPU UTs (#130138) 2024-07-05 09:56:22 +00:00