pytorch/test
Nikita Shulga 5211f4c108 [MPS] Fix SDPA fp16 overflow (#165961)
Do not cast intermediate result back to lower precision data data until
softmax is finished, otherwise it might produce NaN

Adjust the test to use 256 as filler value rather than 64

Fixes https://github.com/pytorch/pytorch/issues/160841
Pull Request resolved: https://github.com/pytorch/pytorch/pull/165961
Approved by: https://github.com/dcci, https://github.com/Skylion007
ghstack dependencies: #165960
2025-10-22 01:29:42 +00:00
..
ao/sparsity Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
autograd
backends/xeon
benchmark_utils [BE][3/6] fix typos in test/ (#157637) 2025-07-17 12:08:33 +00:00
compiled_autograd_skips
cpp Revert "Move toString(ScalarType) and ScalarType ostream operator to headeronly (#164405)" 2025-10-20 17:48:08 +00:00
cpp_api_parity [BE][PYFMT] migrate PYFMT for test/[a-h]*/ to ruff format (#144555) 2025-06-24 04:53:54 +00:00
cpp_extensions Revert "[AMP][Refactor] Autocast dtype handling to simplify device-specific c… (#165221)" 2025-10-22 00:26:57 +00:00
custom_backend
custom_operator Using the latest torch.library.register_fake API instead of torch.library.impl_abstract (#158839) 2025-07-25 02:37:30 +00:00
distributed [CUDA][cuBLAS] addmm -- some refactoring for easier navigation between the Lt and non-Lt paths (#163955) 2025-10-21 20:48:12 +00:00
distributions Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
dynamo [dynamo][annotate] Graph break cleanly on fx.traceback.annotate reconstruction (#166006) 2025-10-21 20:48:04 +00:00
dynamo_expected_failures Patch the flex_attention._get_mod_type to not use inspect.signature when computing num_positional_args (an alternative fix for flex attention graph break on create_block_mask) (#164923) 2025-10-17 17:44:45 +00:00
dynamo_skips Add functions to setup PrivateUse1 as a python backend device. (#157859) 2025-10-01 21:32:59 +00:00
error_messages
expect Add scaled_grouped_mm_v2 and python API (#165154) 2025-10-15 17:47:23 +00:00
export better error message when there is no pytree impl (#165955) 2025-10-21 18:49:22 +00:00
forward_backward_compatibility Revert "[BC-Breaking] Remove long-deprecated casting functions from native_functions.yaml (#164641)" 2025-10-09 15:42:51 +00:00
functorch Back out "Do not decompose in functionalization/proxy tensor if autograd wouldn't have decomposed (#164939)" (#165910) 2025-10-21 16:36:38 +00:00
fx Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
higher_order_ops Revert "Update gm.print_readable to include Annotation (#165397)" 2025-10-17 22:35:50 +00:00
inductor Revert "[Inductor] support masked vectorization for the tail_loop for float64 datatype (#163316)" 2025-10-21 17:44:42 +00:00
inductor_expected_failures [dynamo] Graph break on on user-defined class in compiled region (#161670) 2025-09-10 04:39:20 +00:00
inductor_skips
jit Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
jit_hooks
lazy Back out "Do not decompose in functionalization/proxy tensor if autograd wouldn't have decomposed (#164939)" (#165910) 2025-10-21 16:36:38 +00:00
mobile Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
nn Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
onnx Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
optim Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
package [Torch Package] Make get names of OrderedImporters support fallback to importers (#155743) 2025-08-06 02:26:10 +00:00
profiler Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
quantization Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
scripts [BE][PYFMT] migrate PYFMT for test/[i-z]*/ to ruff format (#144556) 2025-07-29 03:26:09 +00:00
strobelight/examples
test_img
torch_np Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
typing Revert "Add __init__.pyi to torch/linalg (#160750)" 2025-09-02 16:53:55 +00:00
xpu [WOQ] Add XPU kernel for _weight_int8pack_mm (#160938) 2025-09-19 07:37:14 +00:00
_test_bazel.py
allowlist_for_publicAPI.json Revert "[BC-Breaking] Remove long-deprecated casting functions from native_functions.yaml (#164641)" 2025-10-09 15:42:51 +00:00
bench_mps_ops.py [BE] Remove macos-13 guard from bench_mps_ops (#159732) 2025-08-03 20:53:58 +00:00
conftest.py Stop parsing command line arguments every time common_utils is imported. (#156703) 2025-10-02 22:22:04 +00:00
create_dummy_torchscript_model.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 [CI] Fix doctest job if build without distributed (#165449) 2025-10-14 19:19:03 +00:00
simulate_nccl_errors.py
slow_tests.json Update slow tests (#165301) 2025-10-13 11:47:32 +00:00
test_accelerator.py Add UT for torch.accelerator memory-related API (#155200) 2025-08-08 17:41:22 +00:00
test_ao_sparsity.py [testing] Add test owner labels for some ao sparse tests (#163203) 2025-09-18 16:08:13 +00:00
test_appending_byte_serializer.py
test_autocast.py Revert "[AMP][Refactor] Autocast dtype handling to simplify device-specific c… (#165221)" 2025-10-22 00:26:57 +00:00
test_autograd_fallback.py Fix TestAutogradFallback flaky tests under Dynamo: migrate to lib._destroy() (#159443) 2025-07-30 19:30:55 +00:00
test_autograd.py Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
test_autoload.py
test_binary_ufuncs.py Enable ruff rule E721 (#165162) 2025-10-13 01:48:55 +00:00
test_bundled_images.py
test_bundled_inputs.py Pyrefly suppressions 7/n (#164913) 2025-10-08 07:27:17 +00:00
test_ci_sanity_check_fail.py
test_comparison_utils.py
test_compile_benchmark_util.py
test_complex.py Pyrefly suppressions 7/n (#164913) 2025-10-08 07:27:17 +00:00
test_content_store.py [ROCm] Enabling several UTs (#161715) 2025-09-09 15:49:21 +00:00
test_cpp_api_parity.py Revert "Stop parsing command line arguments every time common_utils is imported. (#156703)" 2025-08-04 20:37:39 +00:00
test_cpp_extensions_aot.py Replace setup.py install with pip install (#156711) 2025-09-29 15:15:10 +00:00
test_cpp_extensions_jit.py Move from/to to torch::stable::detail (#164956) 2025-10-21 02:59:46 +00:00
test_cpp_extensions_mtia_backend.py
test_cpp_extensions_stream_and_event.py
test_cuda_expandable_segments.py
test_cuda_multigpu.py [ROCm] Enabling several UTs (#161715) 2025-09-09 15:49:21 +00:00
test_cuda_nvml_based_avail.py More ruff SIM fixes (#164695) 2025-10-09 03:24:50 +00:00
test_cuda_primary_ctx.py [ROCm][CI] skip TestCudaPrimaryCtx.test_set_device_0 (#163693) 2025-09-23 22:15:10 +00:00
test_cuda_sanitizer.py
test_cuda_trace.py
test_cuda.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_custom_ops.py [Bugfix][vLLM] Explicitly do not support instead of crashing for named tuples in infer schema (#165191) 2025-10-14 14:18:42 +00:00
test_dataloader.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_datapipe.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_decomp.py Back out "Do not decompose in functionalization/proxy tensor if autograd wouldn't have decomposed (#164939)" (#165910) 2025-10-21 16:36:38 +00:00
test_determination.py
test_dispatch.py
test_dlpack.py [Fix] Completely remove stride normalization on DLPack Tensor (#164161) 2025-10-14 17:17:11 +00:00
test_dynamic_shapes.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_expanded_weights.py Revert "Stop parsing command line arguments every time common_utils is imported. (#156703)" 2025-08-04 20:37:39 +00:00
test_extension_utils.py
test_fake_tensor.py [FakeTensor] Supplement the relevant logic for converting conv1d to conv2d in meta_conv (#160408) 2025-09-26 15:45:02 +00:00
test_file_check.py
test_flop_counter.py [ROCm] Enable MI355 CI on PRs, and run full set of UTs on PRs (#160215) 2025-10-09 18:03:12 +00:00
test_foreach.py Remove old ROCm version check in tests (#164245) 2025-10-06 22:42:01 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_functional_optim.py
test_functionalization_of_rng_ops.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_functionalization.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_futures.py
test_fx_experimental.py [8/N] Apply ruff UP035 rule (#165214) 2025-10-15 03:18:57 +00:00
test_fx_passes.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_fx_reinplace_pass.py [dynamic shapes] avoid unnecessary slices (#157528) 2025-07-10 06:34:46 +00:00
test_fx.py [reland][fx] Move Node._prepend/Node._remove_from_list to C++ (#165882) 2025-10-21 19:43:55 +00:00
test_hop_infra.py
test_hub.py
test_import_stats.py
test_indexing.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_itt.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_jit_autocast.py Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
test_jit_disabled.py
test_jit_fuser_legacy.py Stop parsing command line arguments every time common_utils is imported. (#156703) 2025-10-02 22:22:04 +00:00
test_jit_fuser_te.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_jit_fuser.py Stop parsing command line arguments every time common_utils is imported. (#156703) 2025-10-02 22:22:04 +00:00
test_jit_legacy.py Stop parsing command line arguments every time common_utils is imported. (#156703) 2025-10-02 22:22:04 +00:00
test_jit_llga_fuser.py
test_jit_profiling.py
test_jit_simple.py
test_jit_string.py More ruff SIM fixes (#164695) 2025-10-09 03:24:50 +00:00
test_jit.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_jiterator.py
test_kernel_launch_checks.py [testing] Add test owner labels for some cuda? tests (#163296) 2025-09-26 18:26:56 +00:00
test_legacy_vmap.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_license.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_linalg.py [cuda] fix triu/tril int32 overflow for large matrices (#164705) 2025-10-20 07:17:41 +00:00
test_logging.py
test_masked.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_maskedtensor.py Fix MaskedTensor to device ignored mask (#151205) 2025-07-21 21:44:49 +00:00
test_matmul_cuda.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_meta.py [Inductor] support mixed dtype in the native_layer_norm_backward meta function (#159830) 2025-09-17 20:29:12 +00:00
test_metal.py
test_mkl_verbose.py
test_mkldnn_fusion.py
test_mkldnn_verbose.py
test_mkldnn.py Enable TF32 as fp32 internal precision for matmul/linear/conv (#157520) 2025-07-17 08:57:34 +00:00
test_mobile_optimizer.py
test_model_exports_to_core_aten.py Replace export_for_training with export (#162396) 2025-09-10 14:19:34 +00:00
test_module_tracker.py
test_modules.py [ROCm][CI] unskip some test_memory_format tests (#162766) 2025-09-12 15:02:40 +00:00
test_monitor.py
test_mps.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_multiprocessing_spawn.py Change forkserver test to only run below 3.13.8 (#165667) 2025-10-16 19:34:10 +00:00
test_multiprocessing.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_namedtensor.py Fix tensor creation with empty names crash (#163957) 2025-09-26 17:41:00 +00:00
test_namedtuple_return_api.py
test_native_functions.py
test_native_mha.py
test_nestedtensor.py [CI] Move the periodic debug tests to newer runner (#165158) 2025-10-21 21:28:12 +00:00
test_nn.py [CUDA] fix reflection padding for large batch size (#165942) 2025-10-21 21:07:38 +00:00
test_nnapi.py
test_numa_binding.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_numba_integration.py [testing] Add test owner labels for some cuda? tests (#163296) 2025-09-26 18:26:56 +00:00
test_numpy_interop.py Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
test_opaque_obj_v2.py [opaque_obj_v2] PyObject custom op schema type (#165004) 2025-10-14 20:21:04 +00:00
test_opaque_obj.py [opaque_obj] Add make_fx tracing support (#163278) 2025-10-08 09:09:16 +00:00
test_openmp.py
test_ops_fwd_gradients.py
test_ops_gradients.py
test_ops_jit.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_ops.py [ATen] Add reduction tag to reduction operators (#165155) 2025-10-21 04:35:03 +00:00
test_optim.py Fix LBFGS wolfe max iteration (#161488) 2025-09-16 12:07:50 +00:00
test_out_dtype_op.py
test_overrides.py Revert "[Reland] Use std::string_view in torchgen (#158625)" 2025-09-13 07:52:50 +00:00
test_package.py
test_per_overload_api.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_prims.py [Bugfix] Match eager stride semantics for cloned tensors with preserve_format in compile (#163017) 2025-09-19 19:41:33 +00:00
test_privateuseone_python_backend.py Add functions to setup PrivateUse1 as a python backend device. (#157859) 2025-10-01 21:32:59 +00:00
test_proxy_tensor.py Fix refine_ranges corner case (#164075) (#164846) 2025-10-08 18:42:37 +00:00
test_pruning_op.py Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
test_public_bindings.py Revert "[CUDA] Add experimental green context support for SM carveout (#159104)" 2025-10-07 20:51:22 +00:00
test_python_dispatch.py Fix double dispatch to Python for detach (#163671) 2025-10-15 17:24:50 +00:00
test_pytree.py [BE][pytree] cleanup parameterized pytree tests (#160842) 2025-09-05 20:15:29 +00:00
test_quantization.py Enable all flake8-logging-format rules (#164655) 2025-10-19 00:59:28 +00:00
test_reductions.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_rename_privateuse1_to_existing_device.py [Device] Add support for PrivateUse1 device type in parse_type function (#157609) 2025-07-17 01:27:44 +00:00
test_scaled_matmul_cuda.py test_scaled_matmul_cuda: fix infer_scale_swizzle (#165788) 2025-10-19 21:42:01 +00:00
test_scatter_gather_ops.py fix deterministic scatter_add path for multi-d tensors (#162866) 2025-09-15 06:50:00 +00:00
test_schema_check.py [inductor] slow test some Windows UTs. (#160267) 2025-08-10 18:35:42 +00:00
test_segment_reductions.py Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
test_serialization.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py
test_show_pickle.py
test_sort_and_select.py Add dtype checks in meta dispatch for various ordering ops (#159556) 2025-08-14 17:06:27 +00:00
test_sparse_csr.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_sparse_semi_structured.py [CI] Move the periodic debug tests to newer runner (#165158) 2025-10-21 21:28:12 +00:00
test_sparse.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_spectral_ops.py
test_stateless.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_static_runtime.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_subclass.py
test_sympy_utils.py [1/N] Apply UP035 rule in tests (#163947) 2025-09-29 01:42:01 +00:00
test_tensor_creation_ops.py Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
test_tensorboard.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_tensorexpr_pybind.py
test_tensorexpr.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_testing.py [1/N] Apply UP035 rule in tests (#163947) 2025-09-29 01:42:01 +00:00
test_throughput_benchmark.py
test_torch.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_torchfuzz_repros.py Enable all SIM rules except disabled ones (#164645) 2025-10-17 07:27:11 +00:00
test_transformers.py [MPS] Fix SDPA fp16 overflow (#165961) 2025-10-22 01:29:42 +00:00
test_type_hints.py Pyrefly suppressions 7/n (#164913) 2025-10-08 07:27:17 +00:00
test_type_info.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_type_promotion.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_typing.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_unary_ufuncs.py [BUG] Fix nonzero_static crash on CUDA when the input is a empty tensor (#162578) 2025-09-15 05:44:15 +00:00
test_utils_config_module.py
test_utils_filelock.py
test_utils.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_varlen_attention.py varlen api (#164502) 2025-10-15 19:45:55 +00:00
test_view_ops.py Enable PLW0127 in ruff (#165851) 2025-10-21 03:30:57 +00:00
test_vulkan.py
test_weak.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_xnnpack_integration.py Enable all PIE rules on ruff (#165814) 2025-10-18 07:36:18 +00:00
test_xpu.py Add a new API torch.xpu.is_tf32_supported for Intel GPU (#163141) 2025-10-12 12:11:57 +00:00