Skip to content

Transform output on Linux doesn't match its JIT-scripted version #4315

@datumbox

Description

@datumbox

🐛 Bug

The latest PyTorch nightly on Linux (1.10.0.dev20210825) broke the test_adjust_hue test of TorchVision. The test fails when we compare the output of the transform with its JIT scripted version:

assert out_fn_t.allclose(out_scripted, atol=atol)

The values are uint8 and as we can see from the output they are not the same. See #4313

Traceback (most recent call last):
  File "/root/project/test/test_functional_tensor.py", line 820, in test_adjust_hue
    agg_method="max"
  File "/root/project/test/test_functional_tensor.py", line 655, in check_functional_vs_PIL_vs_scripted
    assert out_fn_t.allclose(out_scripted, atol=atol)
AssertionError: assert False
 +  where False = <built-in method allclose of Tensor object at 0x7fd7c72f3b38>(tensor([[[**138**,   0, 115,  ..., 209,  40,  71],\n         [139, 245, 116,  ...,   7, 219,  89],\n         [142,  40, 146,...32],\n         [220, 137, 118,  ..., 255,  28,  68],\n         [140, 144,  41,  ..., 191,  38,  40]]], dtype=torch.uint8), atol=1e-06)
 +    where <built-in method allclose of Tensor object at 0x7fd7c72f3b38> = tensor([[[**137**,   0, 115,  ..., 209,  40,  71],\n         [139, 245, 116,  ...,   7, 219,  89],\n         [142,  40, 146,...32],\n         [220, 137, 118,  ..., 255,  28,  68],\n         [140, 144,  41,  ..., 191,  38,  40]]], dtype=torch.uint8).allclose

The test only fails on CPU not on GPU.

Possibly caused by one of these commits.

cc @vfdev-5 @datumbox

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions