Remainder算子在A2/A3上未默认走到低精度模式
A2/A3 cann-9.3.0 11月13日12时的pypto和pto-isa
执行pypto库上用例pypto/python/tests/st/operation/vector/test_remainder_onboard.py
pass
actual = [tensor([[ 5.7750e+01, 2.8125e+01, 8.7500e+00, ..., 1.6000e+01, 2.9375e+00, 1.0625e+01], [ 3.75...4.8250e+01, -1.3750e+00, ..., -1.2000e+01, -6.2500e+01, -3.5000e+00]], device='npu:2', dtype=torch.bfloat16)] expected = [tensor([[ -3.0000, -12.7500, -19.0000, ..., -32.5000, -42.2500, -50.0000], [ -4.5000, -8.5000, -15.0000, ...., -2.1250], [ -1.5000, -48.2500, -1.3750, ..., -12.0000, -62.5000, -3.5000]], dtype=torch.bfloat16)] def assert_outputs(actual: list[torch.Tensor], expected: list[torch.Tensor]) -> None: assert len(actual) == len(expected) for actual_tensor, expected_tensor in zip(actual, expected): actual_cpu = actual_tensor.cpu() expected_cpu = expected_tensor.to(actual_cpu.dtype).cpu() if not actual_cpu.is_floating_point(): assert torch.equal(actual_cpu, expected_cpu) continue tolerance = 1e-2 if actual_cpu.dtype in {torch.float16, torch.bfloat16} else 5e-3 > assert torch.allclose(actual_cpu, expected_cpu, rtol=tolerance, atol=tolerance, equal_nan=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AssertionError ../pypto/python/tests/st/operation/vector/vector_test_utils.py:60: AssertionError
/assign
已解决,可关闭
Describe the current behavior / 问题描述 (Mandatory / 必填)
Remainder算子在A2/A3上未默认走到低精度模式
Environment / 环境信息 (Mandatory / 必填)
A2/A3
cann-9.3.0
11月13日12时的pypto和pto-isa
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
执行pypto库上用例pypto/python/tests/st/operation/vector/test_remainder_onboard.py
Describe the expected behavior / 预期结果 (Mandatory / 必填)
pass
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
Special notes for this issue/备注 (Optional / 选填)