Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array API failures with Metal Performance Shaders/torch #20700

Open
tylerjereddy opened this issue May 12, 2024 · 2 comments
Open

Array API failures with Metal Performance Shaders/torch #20700

tylerjereddy opened this issue May 12, 2024 · 2 comments
Labels
array types Items related to array API support and input array validation (see gh-18286) maintenance Items related to regular maintenance tasks

Comments

@tylerjereddy
Copy link
Contributor

tylerjereddy commented May 12, 2024

With latest main branch on an ARM mac SCIPY_DEVICE=mps python dev.py -n test -j 16 -b all results in 189 failures.

Some of the failures will be hard/impossible to avoid because torch doesn't support all ops on that device just yet. However, many of the failures do look avoidable given TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead. is probably something that could be shimmed around in some places perhaps.

Short test summary info only for now
===================================================================================== short test summary info =====================================================================================
FAILED scipy/_lib/tests/test__util.py::TestContainsNaNTest::test_array_api[propagate-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test__util.py::TestContainsNaNTest::test_array_api[omit-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test__util.py::TestContainsNaNTest::test_array_api[raise-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_identity[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_fft[torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_ifft[torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_rfft[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_irfft[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_hfft[torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_ihfft[torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_all_1d_norm_preserving[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_dtypes_real[float32-torch] - AssertionError: Tensor-likes are not close!
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_dtypes_real[float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_dtypes_complex[complex128-torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFTThreadSafe::test_fft[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_agrees_with_fftlog[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_special_cases[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_exact[64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_exact[63-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_helper.py::TestFFTFreq::test_definition[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_helper.py::TestRFFTFreq::test_definition[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test__util.py::TestLazywhere::test_basic[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test_array_api.py::TestArrayAPI::test_strict_checks[shape0-float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test_array_api.py::TestArrayAPI::test_strict_checks[shape1-float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestMLabLinkageConversion::test_mlab_linkage_conversion_empty[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestNumObsLinkage::test_num_obs_linkage_1x4[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestNumObsLinkage::test_num_obs_linkage_2x4[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestMaxInconsts::test_maxinconsts_difrow_linkage[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestMaxRStat::test_maxRstat_invalid_index[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestMaxRStat::test_maxRstat_difrow_linkage[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args4-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/cluster/tests/test_hierarchy.py::test_euclidean_linkage_value_error[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args0-torch] - NotImplementedError: The operator 'aten::special_log_ndtr.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this...
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args5-torch] - NotImplementedError: The operator 'aten::i0.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, plea...
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestKstat::test_moments_normal_distribution[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_circfuncs_close[circstd-std-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/constants/tests/test_constants.py::TestConvertTemperature::test_convert_temperature[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_circfuncs_small[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_circfuncs_close[circmean-mean-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args2-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_circfuncs_close[circvar-var-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCommonAxis::test_axis[case0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCommonAxis::test_axis[case1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCommonAxis::test_axis[case2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args6-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/stats/tests/test_morestats.py::TestCommonAxis::test_axis[case3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_alternative[less-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_alternative[greater-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args7-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_alternative[two-sided-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args8-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-1-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-1-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-0-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[True--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-1-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0--1-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-1-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0--1-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-0-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0--1-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[True-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-1-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0--1-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-True-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-0-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[True-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-1-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-1-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[True-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-True-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-0-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-False-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_constant_moments[1-0-float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args9-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-False--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-False-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-0-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-False-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_rename_moment_order[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-False-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-True--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-0-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None--1-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-True--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_precision_loss_gh15554[torch] - Failed: DID NOT WARN. No warnings of type (<class 'RuntimeWarning'>,) were emitted.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_empty[circmean-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-0-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-True-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None--1-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-0-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_empty[circvar-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[False--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-True-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_empty[circstd-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-True-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None--1-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-True-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-1-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[False-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None--1-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[False-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-False-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[False-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_empty_order[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-False--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::test_chk_asarray[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-False-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_variation.py::TestVariation::test_2d_size_zero_with_axis[1-expected1-torch] - AssertionError: Tensor-likes are not equal!
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args10-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args11-torch] - NotImplementedError: The operator 'aten::igammac.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature,...
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args12-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment[torch] - AssertionError: Scalars are not equal!
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_constant_moments[0-1-float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args13-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype. might be hard to avoid too.

Using torch 2.3.0.

@tylerjereddy tylerjereddy added maintenance Items related to regular maintenance tasks array types Items related to array API support and input array validation (see gh-18286) labels May 12, 2024
@tylerjereddy
Copy link
Contributor Author

On the other hand, https://data-apis.org/array-api/latest/API_specification/data_types.html is pretty clear on requiring support for those types, so we'd likely only want to shim around cases where a violation of the standard doesn't occur I suppose.

Test skips could be added with clear explanations if we thought this backend merited it.

@rgommers
Copy link
Member

I think that guidance in the array API standard may be loosened a bit. However, in SciPy we do require float64 support in order to run tests for the backend. It's just too fundamental for us. float32-only code may work, but supporting that in the test suite would be a lot of churn. We should probably punt on that for now, and document in http://scipy.github.io/devdocs/dev/api-dev/array_api.html that float64 is needed for the test suite to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
array types Items related to array API support and input array validation (see gh-18286) maintenance Items related to regular maintenance tasks
Projects
None yet
Development

No branches or pull requests

2 participants