pytorch/test
soulitzer e41a0b33ec Allow Fakified subclass to have different device for inner and outer tensor (#141839)
Previously if a wrapper tensor subclass is fakified, the inner tensors would end up having the same device as the outer tensor. This PR makes it so that inner and outer tensors can have different devices.

See OffloadTensor PR https://github.com/pytorch/pytorch/pull/141840/files#diff-3bc0cf540b694f4ec0a3749f78b047456657a53a5657e495ffb68e5970c5fdaaR1955 for an application. A simpler test has been added in this PR.

This is technically bc-breaking because now the callback passed to MetaConverter needs to accept an extra argument, but no one external should be using this anyway?
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141839
Approved by: https://github.com/bdhirsh
ghstack dependencies: #141166
2024-12-03 00:09:41 +00:00
..
ao/sparsity Run only listed tests on s390x (#140265) 2024-11-20 22:53:09 +00:00
autograd Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
backends/xeon
benchmark_utils
bottleneck_test
cpp [1/N] Decouple Flight Recorder from NCCL utils (#141648) 2024-11-27 18:29:42 +00:00
cpp_api_parity
cpp_extensions OpenReg: Fix releasing tensor issue when exiting process (#140936) 2024-11-22 13:50:35 +00:00
custom_backend
custom_operator
distributed Revert "ILP for auto FSDP wrapping (#140298)" 2024-12-02 14:08:04 +00:00
distributions fix test_save_load_transform. (#140494) 2024-11-19 04:36:06 +00:00
dynamo [dynamo][NFC] Rename NewCellVariable to CellVariable (#141628) 2024-12-02 19:09:30 +00:00
dynamo_expected_failures [dynamo] Fix VariableBuilder._wrap on frozenset and enforce invariants on ConstantVariable (#141504) 2024-11-27 21:58:35 +00:00
dynamo_skips
edge
error_messages
expect [export] Add device and dtype fields to assert_tensor_metadata (#141071) 2024-11-22 20:54:55 +00:00
export [export] Generate compatible thrift schema out of schema.py (#141611) 2024-11-29 20:09:49 +00:00
forward_backward_compatibility
functorch [hop] add discard_graph_changes to remove the empty calls before hop (#140334) 2024-11-26 17:32:43 +00:00
fx
higher_order_ops Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
inductor Revert "[inductor][pattern matcher] revise mkldnn pattern matcher UT (#141334)" 2024-12-02 21:29:02 +00:00
jit
jit_hooks
lazy
mobile
nn [BE] Replace skipIfMPS with expectedFailureMPS (#139940) 2024-11-15 03:48:37 +00:00
onnx [ONNX] Remove special handling of torchvision.ops imports in onnx export (#141569) 2024-11-28 18:05:40 +00:00
optim
package
profiler [9/N] Don't skip ASAN on some tests (#141534) 2024-11-26 23:52:53 +00:00
quantization [PT2E Quantization] Fix RecursionError when prepare_pt2e graph with concat of the same node (#141651) 2024-11-29 09:19:22 +00:00
scripts
test_img
torch_np
typing
xpu
_test_bazel.py
allowlist_for_publicAPI.json Refactor ShapeGuardPrinter for future C++ addiiton (#140968) 2024-11-27 20:09:58 +00:00
conftest.py
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 [BE] Remove Model Dump utility (#141540) 2024-11-27 22:52:55 +00:00
simulate_nccl_errors.py
slow_tests.json
test_ao_sparsity.py
test_autocast.py [MPS] Add support for bf16 autocast (#139390) 2024-11-20 19:52:28 +00:00
test_autograd.py Run only listed tests on s390x (#140265) 2024-11-20 22:53:09 +00:00
test_autograd_fallback.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_autoload.py
test_binary_ufuncs.py skip complex logaddexp tests in 3.12+ (#140731) 2024-11-21 01:08:07 +00:00
test_bundled_images.py
test_bundled_inputs.py
test_ci_sanity_check_fail.py
test_comparison_utils.py [export] Add device and dtype fields to assert_tensor_metadata (#141071) 2024-11-22 20:54:55 +00:00
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 Support dlpack for privateuse1 (#135331) 2024-11-13 13:13:14 +00:00
test_cpp_extensions_stream_and_event.py
test_cuda.py [CUDA][64-bit indexing] Support 64-bit indexing in distribution_elementwise_grid_stride_kernel (#141613) 2024-11-30 06:55:02 +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 Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_dataloader.py [BE][Ez]: Update ruff to 0.7.4 (#140806) 2024-11-15 17:04:32 +00:00
test_datapipe.py
test_decomp.py Added aten.bernoulli.p and aten.bernoulli.default decompositions (#139141) 2024-11-20 19:52:57 +00:00
test_deploy.py
test_determination.py
test_dispatch.py
test_dlpack.py
test_dynamic_shapes.py Try to simplify FloorDiv axioms implications when needed during evaluations. (#141267) 2024-11-28 15:35:35 +00:00
test_expanded_weights.py
test_fake_tensor.py Allow Fakified subclass to have different device for inner and outer tensor (#141839) 2024-12-03 00:09:41 +00:00
test_file_check.py
test_flop_counter.py FlopCounterMode: Decompose ops for inference mode (#138508) 2024-11-25 16:53:10 +00:00
test_foreach.py pow: fix meta function output argument dtype check. (#140287) 2024-11-20 13:28:47 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_functional_optim.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_functionalization.py
test_functionalization_of_rng_ops.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_futures.py
test_fx.py
test_fx_experimental.py [fx] make split_module work with keep_original_order=True and no-op graph (#141340) 2024-11-24 06:41:30 +00:00
test_fx_passes.py
test_fx_reinplace_pass.py
test_hub.py
test_import_stats.py
test_indexing.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_itt.py
test_jit.py Add support for parsing torch.Generator in JIT (#140489) 2024-11-13 23:06:57 +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 [Dynamo] Replace torch._dynamo.optimize() with torch.compile() [2/N] (#140238) 2024-11-13 05:13:39 +00:00
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 [ROCM] Support Multi-GPU offline tuning in TunableOp (#139673) 2024-11-26 19:07:41 +00:00
test_logging.py
test_masked.py
test_maskedtensor.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_matmul_cuda.py torch._scaled_mm: support dims of size 0 for tensorwise scaling (#140967) 2024-11-27 04:07:52 +00:00
test_meta.py pow: fix meta function output argument dtype check. (#140287) 2024-11-20 13:28:47 +00:00
test_metal.py
test_mkl_verbose.py
test_mkldnn.py
test_mkldnn_fusion.py
test_mkldnn_verbose.py
test_mobile_optimizer.py
test_model_exports_to_core_aten.py
test_module_tracker.py
test_modules.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_monitor.py
test_mps.py [MPS] Convert channels_last_3d to contiguous for input tensor in nn.Conv3d (#141780) 2024-12-01 18:36:53 +00:00
test_multiprocessing.py
test_multiprocessing_spawn.py
test_namedtensor.py
test_namedtuple_return_api.py
test_native_functions.py
test_native_mha.py
test_nestedtensor.py Switch to using Python nested int (#141166) 2024-12-02 19:17:30 +00:00
test_nn.py softshrink nan fixes (#138421) 2024-11-21 23:06:08 +00:00
test_nnapi.py
test_numba_integration.py
test_numpy_interop.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_openmp.py
test_ops.py Pass rounding_mode for div reference inputs through kwargs (#136308) 2024-11-29 21:28:24 +00:00
test_ops_fwd_gradients.py
test_ops_gradients.py Run only listed tests on s390x (#140265) 2024-11-20 22:53:09 +00:00
test_ops_jit.py
test_optim.py [MPS] Expand fused forloop to bfloat16 (#141104) 2024-11-22 01:07:15 +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 Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_pruning_op.py
test_public_bindings.py [BE] Remove Model Dump utility (#141540) 2024-11-27 22:52:55 +00:00
test_python_dispatch.py [torchgen] Improve schema parsing with regex for numeric ranges (#140210) 2024-11-14 23:28:27 +00:00
test_pytree.py
test_quantization.py
test_reductions.py use more elements per thread for narrow dtypes (#139449) 2024-11-14 22:50:16 +00:00
test_scatter_gather_ops.py Fix the check for can_use_expanded_index_path (#140351) 2024-11-15 05:52:23 +00:00
test_schema_check.py
test_segment_reductions.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_serialization.py Fix tests in test/test_serialization that were failing if run individually (#141300) 2024-11-22 02:40:37 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py
test_show_pickle.py
test_sort_and_select.py
test_sparse.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_sparse_csr.py
test_sparse_semi_structured.py [sparse] add extra options to _cslt_spare_mm (#137427) 2024-11-27 05:32:45 +00:00
test_spectral_ops.py
test_stateless.py
test_static_runtime.py
test_subclass.py
test_sympy_utils.py [dynamo] add SymNode bitwise and/or (#138777) 2024-11-22 23:36:16 +00:00
test_tensor_creation_ops.py fix test_float_to_int_conversion_nonfinite for NumPy 2 (#138131) 2024-11-14 04:19:19 +00:00
test_tensorboard.py Run only listed tests on s390x (#140265) 2024-11-20 22:53:09 +00:00
test_tensorexpr.py
test_tensorexpr_pybind.py
test_testing.py
test_throughput_benchmark.py
test_torch.py Implement deterministic scan (#140887) 2024-11-19 23:43:26 +00:00
test_transformers.py Lint: switch oncall owner for test_transformers (#141722) 2024-11-27 21:45:43 +00:00
test_type_hints.py
test_type_info.py
test_type_promotion.py
test_typing.py
test_unary_ufuncs.py Implement nonzero for large inputs (#141592) 2024-11-27 10:19:53 +00:00
test_utils.py
test_utils_config_module.py config: Throw if justknobs value is not a boolean (#139488) 2024-11-20 23:52:17 +00:00
test_view_ops.py Replace clone.detach with detach.clone (#140264) 2024-11-13 07:01:02 +00:00
test_vulkan.py
test_weak.py
test_xnnpack_integration.py
test_xpu.py Use default context on Windows for Intel GPU (#138049) 2024-11-28 02:49:46 +00:00