@@ -9418,16 +9418,21 @@ def generate_std_var_kwargs(t: torch.Tensor, **kwargs):
94189418 ),
94199419 UnaryUfuncInfo('conj',
94209420 ref=np.conj,
9421- dtypes=all_types_and_complex_and(torch.bool,
9422- torch.bfloat16 , torch.half ),
9421+ dtypes=all_types_and_complex_and(torch.bool, torch.bfloat16,
9422+ torch.half , torch.chalf ),
94239423 supports_sparse=True,
94249424 supports_forward_ad=True,
94259425 supports_fwgrad_bwgrad=True,
9426- supports_out=False),
9426+ supports_out=False,
9427+ skips=(
9428+ # numpy() raises TypeError: Got unsupported ScalarType ComplexHalf
9429+ DecorateInfo(unittest.expectedFailure, "TestUnaryUfuncs", "test_reference_numerics_normal",
9430+ dtypes=(torch.complex32,)),
9431+ )),
94279432 UnaryUfuncInfo('conj_physical',
94289433 ref=np.conj,
9429- dtypes=all_types_and_complex_and(torch.bool,
9430- torch.bfloat16 , torch.half ),
9434+ dtypes=all_types_and_complex_and(torch.bool, torch.bfloat16,
9435+ torch.half , torch.chalf ),
94319436 supports_forward_ad=True,
94329437 supports_fwgrad_bwgrad=True,
94339438 supports_sparse=True,
@@ -9439,6 +9444,22 @@ def generate_std_var_kwargs(t: torch.Tensor, **kwargs):
94399444 DecorateInfo(unittest.skip("Skipped!"), 'TestJit', 'test_variant_consistency_jit', dtypes=(torch.float32, )),
94409445 DecorateInfo(unittest.skip("Skipped! conj_physical_ not implemented for sparse"),
94419446 'TestSparseUnaryUfuncs', 'test_inplace'),
9447+ # numpy() raises TypeError: Got unsupported ScalarType ComplexHalf
9448+ DecorateInfo(unittest.expectedFailure, "TestUnaryUfuncs", "test_reference_numerics_normal",
9449+ dtypes=(torch.complex32,)),
9450+ # RuntimeError: "nonzero_count_cpu" not implemented for 'ComplexHalf'
9451+ DecorateInfo(unittest.expectedFailure, "TestSparseCSR", "test_sparse_csr_consistency",
9452+ dtypes=(torch.complex32,)),
9453+ # RuntimeError: "nonzero_count_cpu" not implemented for 'ComplexHalf'
9454+ DecorateInfo(unittest.expectedFailure, "TestSparseCSR", "test_sparse_csr_unary_inplace",
9455+ dtypes=(torch.complex32,)),
9456+ # RuntimeError: "nonzero_count_cpu" not implemented for 'ComplexHalf'
9457+ DecorateInfo(unittest.expectedFailure, "TestSparseCSR", "test_sparse_csr_unary_out",
9458+ dtypes=(torch.complex32,)),
9459+ # RuntimeError: "add_out_op2_sparse_csr" not implemented for 'ComplexHalf'
9460+ DecorateInfo(unittest.expectedFailure, "TestSparseCSR",
9461+ "test_zero_to_zero_correspondence_unary",
9462+ dtypes=(torch.complex32,)),
94429463 )),
94439464 OpInfo('resolve_conj',
94449465 dtypes=all_types_and_complex_and(torch.bool, torch.half, torch.bfloat16),
0 commit comments