@@ -9418,16 +9418,21 @@ def generate_std_var_kwargs(t: torch.Tensor, **kwargs):
9418
9418
),
9419
9419
UnaryUfuncInfo('conj',
9420
9420
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 ),
9423
9423
supports_sparse=True,
9424
9424
supports_forward_ad=True,
9425
9425
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
+ )),
9427
9432
UnaryUfuncInfo('conj_physical',
9428
9433
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 ),
9431
9436
supports_forward_ad=True,
9432
9437
supports_fwgrad_bwgrad=True,
9433
9438
supports_sparse=True,
@@ -9439,6 +9444,22 @@ def generate_std_var_kwargs(t: torch.Tensor, **kwargs):
9439
9444
DecorateInfo(unittest.skip("Skipped!"), 'TestJit', 'test_variant_consistency_jit', dtypes=(torch.float32, )),
9440
9445
DecorateInfo(unittest.skip("Skipped! conj_physical_ not implemented for sparse"),
9441
9446
'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,)),
9442
9463
)),
9443
9464
OpInfo('resolve_conj',
9444
9465
dtypes=all_types_and_complex_and(torch.bool, torch.half, torch.bfloat16),
0 commit comments