Open kmilanovicTT opened 1 week ago
@nvukobratTT @dgolubovicTT compare_with_golden_pcc doesn't work for single values
Hi, as discussed on the meeting, PCC is Pearson Correlation Coefficient. It is not deffined for single values. There is the function that is called in case of single values. Use compare_with_golden
and it will call compare_with_golden_pcc
or torch.allclose
depending on the size of the tensor. This should be used throughout the forge testing since it enables single values. I will make the same change in forge/test/mlir/test_ops.py
. Thanks for the catch
Tnx @dgolubovicTT
Description
When testing binary ops with PyTorch models in inference mode tests are only failing when using shape: (1,1) for input tensor, regardless of used model(operand source). This is for all implemented binary ops (add, div, mul, true_divide, ge, sub).
Error message is: E AssertionError: PCC for single values doesn't work
Reproduce:
Run command pytest -svv forge/test/operators_pytorch/eltwise_binary/test_pytorch_binary.py::test_pytorch_eltwise_binary_ops_per_test_plan --runxfail