Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refined align_supported_dtypes and test_ops.py skip list (#779)
1. updated align_supported_dyptes() a) if forward does not support bfloat16, do not add it for backward b) for _refs.xxx, if op xxx is supported by torch-xpu-ops, also align the backward dtypes with CUDA. 2. added more ops in _xpu_computation_op_list to align the dtypes with cuda 3. updated skip list: a) Added some cases in skip list because with 1 and 2 more cases are added, while some cases are XFAIL with CUDA but passed with XPU. b) Removed cases from skip list: # No this case anymore # "test_python_ref__refs_linspace_tensor_overload_xpu_int16", # "test_python_ref__refs_linspace_tensor_overload_xpu_int32", # "test_python_ref__refs_linspace_tensor_overload_xpu_int64", # "test_python_ref__refs_linspace_tensor_overload_xpu_int8", # "test_python_ref__refs_linspace_tensor_overload_xpu_uint8", # "test_python_ref__refs_linspace_xpu_int16", # "test_python_ref__refs_linspace_xpu_int32", # "test_python_ref__refs_linspace_xpu_int64", # "test_python_ref__refs_linspace_xpu_int8", # "test_python_ref__refs_linspace_xpu_uint8", # "test_python_ref__refs_logaddexp_xpu_complex128", # "test_python_ref__refs_logaddexp_xpu_complex64", # "test_python_ref__refs_native_layer_norm_xpu_bfloat16", # "test_python_ref__refs_native_layer_norm_xpu_float16", # "test_python_ref__refs_native_layer_norm_xpu_float32", # "test_python_ref__refs_nn_functional_hinge_embedding_loss_xpu_bfloat16", # "test_python_ref__refs_nn_functional_hinge_embedding_loss_xpu_float16", # "test_python_ref__refs_nn_functional_margin_ranking_loss_xpu_bfloat16", # "test_python_ref__refs_nn_functional_margin_ranking_loss_xpu_float16", # "test_python_ref__refs_nn_functional_triplet_margin_loss_xpu_uint8", # "test_python_ref__refs_square_xpu_bool", # "test_python_ref__refs_trunc_xpu_float64", # skipped # "test_python_ref_executor__refs_geometric_executor_aten_xpu_bfloat16", # "test_python_ref_executor__refs_geometric_executor_aten_xpu_float16", # "test_python_ref_executor__refs_geometric_executor_aten_xpu_float32", # "test_python_ref_executor__refs_geometric_executor_aten_xpu_float64", # "test_python_ref_executor__refs_geometric_executor_aten_xpu_int16", # "test_python_ref_executor__refs_geometric_executor_aten_xpu_int32", # "test_python_ref_executor__refs_geometric_executor_aten_xpu_int64", # "test_python_ref_executor__refs_geometric_executor_aten_xpu_int8", # "test_python_ref_executor__refs_geometric_executor_aten_xpu_uint8", # "test_python_ref_executor__refs_linspace_executor_aten_xpu_int16", # "test_python_ref_executor__refs_linspace_executor_aten_xpu_int32", # "test_python_ref_executor__refs_linspace_executor_aten_xpu_int64", # "test_python_ref_executor__refs_linspace_executor_aten_xpu_int8", # "test_python_ref_executor__refs_linspace_executor_aten_xpu_uint8", # "test_python_ref_executor__refs_linspace_tensor_overload_executor_aten_xpu_int16", # "test_python_ref_executor__refs_linspace_tensor_overload_executor_aten_xpu_int32", # "test_python_ref_executor__refs_linspace_tensor_overload_executor_aten_xpu_int64", # "test_python_ref_executor__refs_linspace_tensor_overload_executor_aten_xpu_int8", # "test_python_ref_executor__refs_linspace_tensor_overload_executor_aten_xpu_uint8", # "test_python_ref_executor__refs_log_normal_executor_aten_xpu_bfloat16", # "test_python_ref_executor__refs_log_normal_executor_aten_xpu_float16", # "test_python_ref_executor__refs_log_normal_executor_aten_xpu_float32", # "test_python_ref_executor__refs_log_normal_executor_aten_xpu_float64", # skipped # "test_python_ref_executor__refs_native_layer_norm_executor_aten_xpu_bfloat16", # "test_python_ref_executor__refs_native_layer_norm_executor_aten_xpu_float16", # need to add native_layer_norm to list #"test_python_ref_executor__refs_native_layer_norm_executor_aten_xpu_float32", # skipped # "test_python_ref_executor__refs_nn_functional_alpha_dropout_executor_aten_xpu_bfloat16", # "test_python_ref_executor__refs_nn_functional_alpha_dropout_executor_aten_xpu_float16", # "test_python_ref_executor__refs_nn_functional_alpha_dropout_executor_aten_xpu_float32", # "test_python_ref_executor__refs_nn_functional_alpha_dropout_executor_aten_xpu_float64", # skipped # "test_python_ref_executor__refs_nn_functional_hinge_embedding_loss_executor_aten_xpu_bfloat16", # "test_python_ref_executor__refs_nn_functional_hinge_embedding_loss_executor_aten_xpu_float16", # "test_python_ref_executor__refs_nn_functional_margin_ranking_loss_executor_aten_xpu_bfloat16", # "test_python_ref_executor__refs_nn_functional_margin_ranking_loss_executor_aten_xpu_float16", # "test_python_ref_executor__refs_nn_functional_triplet_margin_loss_executor_aten_xpu_uint8", # skipped # "test_python_ref_executor__refs_vdot_executor_aten_xpu_complex128", # "test_python_ref_executor__refs_vdot_executor_aten_xpu_complex64", # skipped # "test_python_ref_torch_fallback__refs_linspace_tensor_overload_xpu_int16", # "test_python_ref_torch_fallback__refs_linspace_tensor_overload_xpu_int32", # "test_python_ref_torch_fallback__refs_linspace_tensor_overload_xpu_int64", # "test_python_ref_torch_fallback__refs_linspace_tensor_overload_xpu_int8", # "test_python_ref_torch_fallback__refs_linspace_tensor_overload_xpu_uint8", # "test_python_ref_torch_fallback__refs_linspace_xpu_int16", # "test_python_ref_torch_fallback__refs_linspace_xpu_int32", # "test_python_ref_torch_fallback__refs_linspace_xpu_int64", # "test_python_ref_torch_fallback__refs_linspace_xpu_int8", # "test_python_ref_torch_fallback__refs_linspace_xpu_uint8", # "test_python_ref_torch_fallback__refs_logaddexp_xpu_complex128", # "test_python_ref_torch_fallback__refs_logaddexp_xpu_complex64", # "test_python_ref_torch_fallback__refs_native_layer_norm_xpu_bfloat16", # "test_python_ref_torch_fallback__refs_native_layer_norm_xpu_float16", # skipped? added native_layer_norm in op list #"test_python_ref_torch_fallback__refs_native_layer_norm_xpu_float32", # skipped # "test_python_ref_torch_fallback__refs_nn_functional_hinge_embedding_loss_xpu_bfloat16", # "test_python_ref_torch_fallback__refs_nn_functional_hinge_embedding_loss_xpu_float16", # "test_python_ref_torch_fallback__refs_nn_functional_margin_ranking_loss_xpu_bfloat16", # "test_python_ref_torch_fallback__refs_nn_functional_margin_ranking_loss_xpu_float16", # "test_python_ref_torch_fallback__refs_sinh_xpu_complex128", # "test_python_ref_torch_fallback__refs_special_multigammaln_mvlgamma_p_5_xpu_int32", # skipped? #"test_python_ref_torch_fallback__refs_square_xpu_bool", # skipped # "test_python_ref_torch_fallback__refs_vdot_xpu_complex128", # "test_python_ref_torch_fallback__refs_vdot_xpu_complex64", # skipped #"test_compare_cpu__refs_special_zeta_xpu_float32", # skipped ? #"test_python_ref__refs_heaviside_xpu_int64", # skipped # "test_python_ref__refs_special_bessel_j0_xpu_int64", # "test_python_ref_errors__refs_dstack_xpu", # "test_python_ref_errors__refs_hstack_xpu", # "test_python_ref_errors__refs_linalg_cross_xpu", # "test_python_ref_errors__refs_vstack_xpu", # "test_python_ref_executor__refs_mul_executor_aten_xpu_complex32", # "test_python_ref__refs_special_multigammaln_mvlgamma_p_5_xpu_float64", # "test_python_ref_executor__refs_special_multigammaln_mvlgamma_p_3_executor_aten_xpu_float64", # "test_python_ref__refs_square_xpu_complex128", # "test_python_ref__refs_square_xpu_complex64", # "test_python_ref_executor__refs_istft_executor_aten_xpu_complex128", # "test_python_ref_executor__refs_square_executor_aten_xpu_complex128", # "test_python_ref_torch_fallback__refs_square_xpu_complex128", # "test_python_ref_torch_fallback__refs_square_xpu_complex64", #Fixed with xpu_test_utils.py and not add bfloat16 in backward if bloat16 is not enabled in forward #"test_dtypes_view_as_complex_xpu", # Didn't align with CUDA, The following dtypes did not work in backward but are listed by the OpInfo: {torch.bfloat16} #"test_dtypes_view_as_real_xpu", # Didn't align with CUDA, The following dtypes did not work in backward but are listed by the OpInfo: {torch.bfloat16} # no this test now #"test_noncontiguous_samples_native_dropout_backward_xpu_int64", # The implementation aligns with CUDA, RuntimeError: "masked_scale" not implemented for 'Long'. #"test_non_standard_bool_values_native_dropout_backward_xpu_bool", # The implementation aligns with CUDA, RuntimeError: "masked_scale" not implemented for 'Bool'. #"test_non_standard_bool_values_scatter_reduce_amax_xpu_bool", # Align with CUDA dtypes - "scatter_gather_base_kernel_func" not implemented for 'Bool' #"test_non_standard_bool_values_scatter_reduce_amin_xpu_bool", # Align with CUDA dtypes - "scatter_gather_base_kernel_func" not implemented for 'Bool' #"test_non_standard_bool_values_scatter_reduce_prod_xpu_bool", # Align with CUDA dtypes - "scatter_gather_base_kernel_func" not implemented for 'Bool' # skipped by addeding argsort and sort to list #"test_non_standard_bool_values_argsort_xpu_bool", # The implementation aligns with CUDA, RuntimeError: "argsort" not implemented for 'Bool'. # skipped #"test_out_triangular_solve_xpu_float32", # add square in op list, this op is defined in aten, no need backend. #"test_python_ref_executor__refs_square_executor_aten_xpu_bool", # need to add native_layer_norm to list #"test_python_ref_executor__refs_native_layer_norm_executor_aten_xpu_float32", --------- Co-authored-by: Huaiyu, Zheng <[email protected]>
- Loading branch information