torch-mlir icon indicating copy to clipboard operation
torch-mlir copied to clipboard

Investigate UpSampleNearest2dDynamicFactor failure after PyTorch version update

Open ashay opened this issue 2 years ago • 1 comments

The UpSampleNearest2dDynamicFactor_basic test fails on the refbackend and eager_mode backend after updating the PyTorch version to 1.14.0.dev20221010. To reproduce the error:

  1. Update the PyTorch version in pytorch-requirements.txt
  2. Update PyTorch: python3 -m pip install --user --upgrade -r requirements.txt
  3. Run the test on the reference backend: python -m e2e_testing.main --config=refbackend -s -v --filter=UpSampleNearest2dDynamicFactor_basic

Since the test fails after update the PyTorch version (and since the LLVM version is unchanged), it's likely that the oracle is incorrect, but if someone who is more knowledgeable of torch._C._nn.upsample_nearest2d() can confirm, then that would be very helpful.

ashay avatar Oct 11 '22 02:10 ashay

cc: @pashu123

ashay avatar Oct 11 '22 02:10 ashay

Not able to reproduce the issue, refbackend is not available -

python -m e2e_testing.main --config=refbackend -s -v --filter=UpSampleNearest2dDynamicFactor_basic      
usage: main.py [-h] [-c {native_torch,torchscript,linalg,mhlo,tosa,lazy_tensor_core,torchdynamo}] [-f FILTER] [-v] [-s] [--crashing_tests_to_not_attempt_to_run_and_a_bug_is_filed TEST [TEST ...]]
main.py: error: argument -c/--config: invalid choice: 'refbackend' (choose from 'native_torch', 'torchscript', 'linalg', 'mhlo', 'tosa', 'lazy_tensor_core', 'torchdynamo')

xgupta avatar Dec 21 '22 11:12 xgupta

Not able to reproduce the issue, refbackend is not available -

python -m e2e_testing.main --config=refbackend -s -v --filter=UpSampleNearest2dDynamicFactor_basic      
usage: main.py [-h] [-c {native_torch,torchscript,linalg,mhlo,tosa,lazy_tensor_core,torchdynamo}] [-f FILTER] [-v] [-s] [--crashing_tests_to_not_attempt_to_run_and_a_bug_is_filed TEST [TEST ...]]
main.py: error: argument -c/--config: invalid choice: 'refbackend' (choose from 'native_torch', 'torchscript', 'linalg', 'mhlo', 'tosa', 'lazy_tensor_core', 'torchdynamo')

There was a typo: I think it should be --config=linalg.

pashu123 avatar Dec 21 '22 12:12 pashu123

It is passing now-

python -m e2e_testing.main --config=linalg -s -v --filter=UpSampleNearest2dDynamicFactor_basic Compiling UpSampleNearest2dDynamicFactor_basic... Running UpSampleNearest2dDynamicFactor_basic... PASS - "UpSampleNearest2dDynamicFactor_basic"

Summary: Passed: 1

xgupta avatar Dec 21 '22 12:12 xgupta

Thanks @xgupta for trying it out! It looks like this test has been re-enabled and has been running for a while now. Closing the issue since the problem has been resolved.

ashay avatar Dec 21 '22 14:12 ashay