pytorch/test
Pian Pawakapan f0a92541fe [export] fix lifted constants order for 0-input graphs (#136658)
Summary:
With empty graphs, the `graph.inserting_before(first_user_input = None)` call turns into a `graph.inserting_after(root)` call, inverting the order of constant input nodes being inserted.

This fixes the issue by initializing to the first node in the graph (still valid if not a user input - only used for insertion).

Test Plan: test_export

Differential Revision: D63403514

Pull Request resolved: https://github.com/pytorch/pytorch/pull/136658
Approved by: https://github.com/avikchaudhuri
2024-09-26 17:44:24 +00:00
..
ao/sparsity Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
autograd [BE][Easy][7/19] enforce style for empty lines in import segments in test/[a-c]*/ and test/[q-z]*/ (#129758) 2024-07-31 10:54:03 +00:00
backends/xeon
benchmark_utils
bottleneck_test Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
cpp [TCPStore] Remove deprecated constructor (#136004) 2024-09-14 04:25:47 +00:00
cpp_api_parity Fix failures when default is flipped for weights_only (#127627) 2024-08-16 00:22:43 +00:00
cpp_extensions OpenReg: Fix issue when copying on the same device (#135956) 2024-09-14 09:57:45 +00:00
custom_backend
custom_operator Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
distributed [reland] [torchelastic][c10d] Fix store prefix race in rendezvous (#136768) 2024-09-26 17:37:07 +00:00
distributions Revert "Temp disable MKL in DistributionKernels.cpp (#132532)" 2024-08-06 20:57:09 +00:00
dynamo Correctly convert Python float to float64 when passing argument as Tensor (#136413) 2024-09-26 16:50:13 +00:00
dynamo_expected_failures Revert "Fix constant propagation in builtins and UserClasses (#131354)" 2024-09-25 23:01:03 +00:00
dynamo_skips
edge [Reland] [11/N] Use std::nullopt and std::optional (#132622) 2024-08-05 20:36:33 +00:00
error_messages
expect Add decomps for max_unpool (#133146) 2024-09-20 21:35:25 +00:00
export [export] fix lifted constants order for 0-input graphs (#136658) 2024-09-26 17:44:24 +00:00
forward_backward_compatibility Change wrapped_linear_prepack and wrapped_quantized_linear_prepacked to private by adding _ as prefix (#135401) 2024-09-08 04:16:24 +00:00
functorch [aotd] Fix rrelu compilation (#136008) 2024-09-25 11:26:19 +00:00
fx [torch][fx] Add new replacement_callback to materialize a replacement just in time (#135553) 2024-09-12 18:52:14 +00:00
higher_order_ops [aotd] Support HOP effects in backward (#132638) 2024-08-23 15:30:58 +00:00
inductor [AOTI][Tooling][9/n] Add debug printer support for cpp kernel type (#136465) 2024-09-26 17:30:43 +00:00
jit [dynamo] Remove skip from jit freeze tests (#135281) 2024-09-08 15:11:12 +00:00
jit_hooks [BE][Easy][13/19] enforce style for empty lines in import segments in test/j*/ (#129764) 2024-08-01 12:13:42 +00:00
lazy Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
mobile Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
nn [ROCm] Update to AOTriton 0.7b (#134498) 2024-09-11 20:34:01 +00:00
onnx [ONNX] Remove the operators test (#136335) 2024-09-25 17:44:18 +00:00
optim Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
package Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
profiler Fix flaky SIGSEGV crash in test_profile_memory (#136304) 2024-09-20 02:56:49 +00:00
quantization [Quant][PT2E]change flatten recipe for X86InductorQuantizer (#136298) 2024-09-24 04:30:12 +00:00
scripts [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
test_img
torch_np [torch/numpy][numpy2.0 compat] Additional changes for tests to run under numpy-2.0 (#136152) 2024-09-18 02:11:22 +00:00
typing [BE][Easy][7/19] enforce style for empty lines in import segments in test/[a-c]*/ and test/[q-z]*/ (#129758) 2024-07-31 10:54:03 +00:00
xpu Populate submodules of torch._C to sys.modules recursively (#132216) 2024-08-08 10:20:25 +00:00
_test_bazel.py
allowlist_for_publicAPI.json [reland][dtensor] move DTensor to public namespace (#134203) 2024-09-08 17:08:40 +00:00
conftest.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
create_dummy_torchscript_model.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
delete.py
hi.py
HowToWriteTestsUsingFileCheck.md [Docs] Update FileCheck doc (#135199) 2024-09-06 08:18:38 +00:00
linear.py
load_torchscript_model.py
minioptest_failures_dict.json
mkl_verbose.py
mkldnn_verbose.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
pytest_shard_custom.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
run_doctests.sh
run_test.py [ROCm] Update to AOTriton 0.7b (#134498) 2024-09-11 20:34:01 +00:00
simulate_nccl_errors.py
slow_tests.json Move slow tests to be in repo (#132379) 2024-08-07 18:42:56 +00:00
test_ao_sparsity.py
test_autocast.py [MPS] Add support for autocast in MPS (#99272) 2024-09-05 23:23:17 +00:00
test_autograd.py Run all autograd node post hooks (#134728) 2024-09-06 19:44:28 +00:00
test_autograd_fallback.py
test_autoload.py
test_binary_ufuncs.py Fix type promotion for ldexp (#133519) 2024-08-16 01:26:26 +00:00
test_bundled_images.py Fix lint errors in fbcode (#135614) 2024-09-13 02:04:34 +00:00
test_bundled_inputs.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_ci_sanity_check_fail.py
test_comparison_utils.py
test_compile_benchmark_util.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_complex.py
test_content_store.py
test_cpp_api_parity.py
test_cpp_extensions_aot.py
test_cpp_extensions_jit.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_cpp_extensions_mtia_backend.py
test_cpp_extensions_open_device_registration.py Add torch.serialization.skip_data context manager (#134504) 2024-09-05 16:53:39 +00:00
test_cpp_extensions_stream_and_event.py
test_cuda.py Update get_device_properties to take in optional device (#136683) 2024-09-26 15:07:31 +00:00
test_cuda_expandable_segments.py
test_cuda_multigpu.py Allow torch.cuda.memory.mem_get_info to take a device str argument with an unspecified device index. (#132616) 2024-08-06 13:19:46 +00:00
test_cuda_nvml_based_avail.py
test_cuda_primary_ctx.py
test_cuda_sanitizer.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_cuda_trace.py
test_custom_ops.py Improve data-dependent-output meta kernel error message (#136671) 2024-09-26 03:46:04 +00:00
test_dataloader.py [Inductor UT] Generalize device-bias code introduced from #134874 and (#136596) 2024-09-26 02:56:59 +00:00
test_datapipe.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_decomp.py Deprecate _preserve_ops and consolidate with decomp_table (#135080) 2024-09-15 17:01:58 +00:00
test_deploy.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_determination.py
test_dispatch.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_dlpack.py
test_dynamic_shapes.py Fix symbolic number's type and tensor's dtype mismatch bug in Tensor ctor (#135433) 2024-09-09 19:32:18 +00:00
test_expanded_weights.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_fake_tensor.py Implementation of scan (#134102) 2024-09-10 04:51:16 +00:00
test_file_check.py Fix the output of FileCheck when not run and add unit tests (#135345) 2024-09-11 04:13:24 +00:00
test_flop_counter.py [NJT][flop counter] attention: if offsets are fake, use max seqlen (#132356) 2024-08-02 20:42:29 +00:00
test_foreach.py fix stride compare failed when size value equal to one in ForeachUtils.h (#134546) 2024-09-19 18:43:41 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_functional_optim.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_functionalization.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_functionalization_of_rng_ops.py
test_futures.py
test_fx.py [fx] Implement deepcopy for Proxy (#133706) 2024-08-22 16:37:30 +00:00
test_fx_experimental.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_fx_passes.py [Partitioner] Reuse partition to check whether nodes exist (#135317) 2024-09-21 23:52:02 +00:00
test_fx_reinplace_pass.py Allow SymInt input for torch.fx reinplace pass (#133178) 2024-08-13 20:07:17 +00:00
test_hub.py
test_import_stats.py
test_indexing.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_itt.py
test_jit.py [EZ] Restore test_unicode_comments (#134589) 2024-08-27 21:51:06 +00:00
test_jit_autocast.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_jit_disabled.py
test_jit_fuser.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_jit_fuser_legacy.py
test_jit_fuser_te.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_jit_legacy.py
test_jit_llga_fuser.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +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 [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_license.py
test_linalg.py Fix addmm silent correctness on aarch64 (#136371) 2024-09-23 17:10:34 +00:00
test_logging.py
test_masked.py
test_maskedtensor.py Add MaskedTensor passthrough: unfold, F.Unfold, F.Fold, stack (#125262) 2024-09-06 19:06:23 +00:00
test_matmul_cuda.py [CUDA][FP8] Skip rowwise scaling test on sm89 (#135718) 2024-09-13 15:07:20 +00:00
test_meta.py
test_metal.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_mkl_verbose.py
test_mkldnn.py Add oneDNN support for Half LSTM on CPU (#132607) 2024-08-29 03:40:10 +00:00
test_mkldnn_fusion.py improve mkldnn_linear_pointwise_binary performance for contiguous tensor with non default contiguous strides (#132019) 2024-07-30 05:02:38 +00:00
test_mkldnn_verbose.py
test_mobile_optimizer.py [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
test_model_dump.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_model_exports_to_core_aten.py Replace capture_pre_autograd_graph with export_for_training in torch tests (#135623) 2024-09-11 19:23:08 +00:00
test_module_tracker.py Move module_tracker to logging for confused hierarchy (#134467) 2024-08-26 19:39:08 +00:00
test_modules.py Fix failures when default is flipped for weights_only (#127627) 2024-08-16 00:22:43 +00:00
test_monitor.py [pytorch][counters] Pybind for WaitCounter (#132357) 2024-08-02 16:08:10 +00:00
test_mps.py [EZ][MPS] Extend arange to bfloat16 (#136754) 2024-09-26 15:33:45 +00:00
test_multiprocessing.py Support IPC for Expandable Segments (#130890) 2024-08-05 18:48:13 +00:00
test_multiprocessing_spawn.py Create processes in parallel in mp.start_processes for forkserver (#134629) 2024-08-28 21:34:32 +00:00
test_namedtensor.py
test_namedtuple_return_api.py
test_native_functions.py
test_native_mha.py [ROCm] Update to AOTriton 0.7b (#134498) 2024-09-11 20:34:01 +00:00
test_nestedtensor.py Fix composite op redispatch for NJT in inference mode (#134683) 2024-09-26 14:10:53 +00:00
test_nn.py [MPS] Add upsample_bicubic2d as Metal op (#136123) 2024-09-24 18:58:11 +00:00
test_nnapi.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_numba_integration.py
test_numpy_interop.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_openmp.py
test_ops.py tf32 off for test_noncontiguous_samples in test_ops.py (#136484) 2024-09-24 14:26:47 +00:00
test_ops_fwd_gradients.py
test_ops_gradients.py
test_ops_jit.py
test_optim.py move param's device check to _init_group for fused (#131153) 2024-08-17 04:49:47 +00:00
test_out_dtype_op.py
test_overrides.py Fix test flakiness due to not resetting state (#134058) 2024-08-21 11:54:08 +00:00
test_package.py
test_per_overload_api.py
test_prims.py properly register conjugate/neg fallthroughs to prim ops (#132699) 2024-08-06 17:57:04 +00:00
test_proxy_tensor.py Fix bug in functional tensor decomp (#136600) 2024-09-25 17:37:50 +00:00
test_pruning_op.py
test_public_bindings.py Fix lint errors in fbcode (#135614) 2024-09-13 02:04:34 +00:00
test_python_dispatch.py Fix wrapper subclass reentrant dispatch + TorchDispatchMode (#136566) 2024-09-26 14:06:51 +00:00
test_pytree.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_quantization.py
test_reductions.py fix mean_out: op does not update parameter out for BF16/FP16 dtype on CPU (#135174) 2024-09-21 14:21:42 +00:00
test_scatter_gather_ops.py
test_schema_check.py
test_segment_reductions.py
test_serialization.py Make test_skip_data_serialization regex more flexible (#136580) 2024-09-25 11:27:23 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py
test_show_pickle.py
test_sort_and_select.py [torch/numpy][numpy2.0 compat] Additional changes for tests to run under numpy-2.0 (#136152) 2024-09-18 02:11:22 +00:00
test_sparse.py [sparse] enable meta tests (#133379) 2024-08-14 21:58:23 +00:00
test_sparse_csr.py Add scaling arguments to bsr_dense_addmm (#136104) 2024-09-16 20:26:54 +00:00
test_sparse_semi_structured.py Add Triton CPU as an Inductor backend (#133408) 2024-09-26 15:35:26 +00:00
test_spectral_ops.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_stateless.py Allow optional positional arguments for torch.func.functional_call (#134643) 2024-09-12 15:22:06 +00:00
test_static_runtime.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_subclass.py Fix failures when default is flipped for weights_only (#127627) 2024-08-16 00:22:43 +00:00
test_sympy_utils.py Add TensorReferenceAnalysis and some tests (#135886) 2024-09-14 23:09:40 +00:00
test_tensor_creation_ops.py
test_tensorboard.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_tensorexpr.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_tensorexpr_pybind.py [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
test_testing.py [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
test_throughput_benchmark.py
test_torch.py Add deterministic path for CUDA cumsum (#136224) 2024-09-26 04:52:05 +00:00
test_transformers.py Add option to configure reduced precision math backend for SDPA (#135964) 2024-09-24 07:11:38 +00:00
test_type_hints.py
test_type_info.py
test_type_promotion.py Add type checks for Tensor.add_ (#135864) 2024-09-19 03:09:36 +00:00
test_typing.py
test_unary_ufuncs.py
test_utils.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_utils_internal.py [justknobs] Override __bool__ method (#134799) 2024-08-30 04:54:02 +00:00
test_view_ops.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_vulkan.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_weak.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
test_xnnpack_integration.py Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
test_xpu.py Fix xpu memory stats error (#135818) 2024-09-13 02:41:21 +00:00