Skip to content

[release/1.10] TST Adds test for non-contiguous tensors (#64954)#69617

Merged
malfet merged 2 commits intorelease/1.10from
cherry_pick_64954
Dec 9, 2021
Merged

[release/1.10] TST Adds test for non-contiguous tensors (#64954)#69617
malfet merged 2 commits intorelease/1.10from
cherry_pick_64954

Conversation

@seemethere
Copy link
Copy Markdown
Member

Cherry pick of

Original commit message

Summary:
Follow up to #61935

This PR:

  1. Adds test for non-contiguous tensors
  2. Fixes bug in NLLLoss that was catch by the test.

The reason this was not catch in common_nn is because CriterionTest overrides test_cuda but does not call test_nonconfig.

cc albanD mruberry jbschlosser walterddr

Pull Request resolved: #64954

Reviewed By: zou3519

Differential Revision: D31174149

Pulled By: jbschlosser

fbshipit-source-id: a16073e59b40ccc01c82ede016b63a8db2e810f5
(cherry picked from commit 0d3bf97)
Signed-off-by: Eli Uriegas [email protected]

Fixes #{issue number}

Summary:
Follow up to #61935

This PR:

1. Adds test for non-contiguous tensors
2. Fixes bug in `NLLLoss` that was catch by the test.

The reason this was not catch in `common_nn` is because `CriterionTest` overrides `test_cuda` but does not call `test_nonconfig`.

cc albanD mruberry jbschlosser walterddr

Pull Request resolved: #64954

Reviewed By: zou3519

Differential Revision: D31174149

Pulled By: jbschlosser

fbshipit-source-id: a16073e59b40ccc01c82ede016b63a8db2e810f5
(cherry picked from commit 0d3bf97)
Signed-off-by: Eli Uriegas <[email protected]>
@pytorch-probot
Copy link
Copy Markdown

pytorch-probot bot commented Dec 8, 2021

CI Flow Status

⚛️ CI Flow

Ruleset - Version: v1
Ruleset - File: https://github.com/pytorch/pytorch/blob/d1e4cba3507b169e494ebe5d6e87ca639f857051/.github/generated-ciflow-ruleset.json
PR ciflow labels: ciflow/default

Workflows Labels (bold enabled) Status
Triggered Workflows
linux-bionic-py3.6-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/noarch, ciflow/xla ✅ triggered
linux-bionic-py3.8-gcc9-coverage ciflow/all, ciflow/coverage, ciflow/cpu, ciflow/default, ciflow/linux ✅ triggered
linux-xenial-cuda11.3-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/default, ciflow/linux ✅ triggered
linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux ✅ triggered
linux-xenial-py3.6-gcc7-bazel-test ciflow/all, ciflow/bazel, ciflow/cpu, ciflow/default, ciflow/linux ✅ triggered
win-vs2019-cpu-py3 ciflow/all, ciflow/cpu, ciflow/default, ciflow/win ✅ triggered
win-vs2019-cuda11.3-py3 ciflow/all, ciflow/cuda, ciflow/default, ciflow/win ✅ triggered
Skipped Workflows
libtorch-linux-xenial-cuda10.2-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux 🚫 skipped
libtorch-linux-xenial-cuda11.3-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux 🚫 skipped
linux-bionic-cuda10.2-py3.9-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow 🚫 skipped
linux-xenial-cuda10.2-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow 🚫 skipped
parallelnative-linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux 🚫 skipped
periodic-libtorch-linux-xenial-cuda11.1-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-xenial-cuda11.1-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-win-vs2019-cuda11.1-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
puretorch-linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux 🚫 skipped
win-vs2019-cuda10.2-py3 ciflow/all, ciflow/cuda, ciflow/win 🚫 skipped

You can add a comment to the PR and tag @pytorchbot with the following commands:
# ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun

# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow

For more information, please take a look at the CI Flow Wiki.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Dec 8, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit d1e4cba (more details on the Dr. CI page):


  • 4/4 failures introduced in this PR

🕵️ 4 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See GitHub Actions build linux-xenial-py3.6-gcc5.4 / test (backwards_compat, 1, 1, linux.2xlarge) (1/4)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2021-12-09T05:28:17.3367449Z RuntimeError:
2021-12-09T05:28:16.7271001Z Author: PyTorch Team
2021-12-09T05:28:16.7271497Z Author-email: [email protected]
2021-12-09T05:28:16.7272192Z License: BSD-3
2021-12-09T05:28:16.7272702Z Location: /opt/conda/lib/python3.6/site-packages
2021-12-09T05:28:16.7273349Z Requires: dataclasses, typing-extensions
2021-12-09T05:28:16.7273870Z Required-by: 
2021-12-09T05:28:16.7464603Z + python check_backward_compatibility.py --existing-schemas nightly_schemas.txt
2021-12-09T05:28:17.3365605Z Traceback (most recent call last):
2021-12-09T05:28:17.3366515Z   File "check_backward_compatibility.py", line 155, in <module>
2021-12-09T05:28:17.3367022Z     s = parse_schema(line.strip())
2021-12-09T05:28:17.3367449Z RuntimeError: 
2021-12-09T05:28:17.3367947Z Unknown custom class type cuda.Stream. Please ensure it is registered.:
2021-12-09T05:28:17.3369363Z cuda::default_stream.device(Device? device) -> (__torch__.torch.classes.cuda.Stream)
2021-12-09T05:28:17.3370090Z                                                                              ~~~~~~ <--- HERE
2021-12-09T05:28:17.3370325Z 
2021-12-09T05:28:17.4242313Z + cleanup
2021-12-09T05:28:17.4242711Z + retcode=1
2021-12-09T05:28:17.4243049Z + set +x
2021-12-09T05:28:17.4243422Z =================== sccache compilation log ===================
2021-12-09T05:28:17.4433700Z =========== If your build fails, please take a look at the log above for possible reasons ===========
2021-12-09T05:28:17.4453722Z Compile requests                      0

See CircleCI build pytorch_linux_xenial_py3_clang7_onnx_ort_test2 (2/4)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

Dec 09 05:57:09 ERROR: pip's dependency resolve... the source of the following dependency conflicts.
Dec 09 05:57:06 + PIP=/opt/conda/bin/pip
Dec 09 05:57:06 ++ stat --format %U /opt/conda/bin/pip
Dec 09 05:57:06 + PIP_USER=jenkins
Dec 09 05:57:06 ++ id -u -n
Dec 09 05:57:06 + CURRENT_USER=jenkins
Dec 09 05:57:06 + [[ jenkins = root ]]
Dec 09 05:57:06 + pip -q uninstall -y hypothesis
Dec 09 05:57:07 + pip -q uninstall -y coverage
Dec 09 05:57:07 + pip -q install attrs==18.1.0 -f https://s3.amazonaws.com/ossci-linux/wheels/attrs-18.1.0-py2.py3-none-any.whl
Dec 09 05:57:08 WARNING: Skipping page https://s3.amazonaws.com/ossci-linux/wheels/attrs-18.1.0-py2.py3-none-any.whl because the HEAD request got Content-Type: binary/octet-stream.The only supported Content-Type is text/html
Dec 09 05:57:09 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
Dec 09 05:57:09 pytest 6.2.5 requires attrs>=19.2.0, but you have attrs 18.1.0 which is incompatible.
Dec 09 05:57:09 + pip -q install coverage==4.5.1 -f https://s3.amazonaws.com/ossci-linux/wheels/coverage-4.5.1-cp36-cp36m-macosx_10_12_x86_64.whl
Dec 09 05:57:10 WARNING: Skipping page https://s3.amazonaws.com/ossci-linux/wheels/coverage-4.5.1-cp36-cp36m-macosx_10_12_x86_64.whl because the HEAD request got Content-Type: binary/octet-stream.The only supported Content-Type is text/html
Dec 09 05:57:11 + pip -q install hypothesis==3.44.6 -f https://s3.amazonaws.com/ossci-linux/wheels/hypothesis-3.44.6-py3-none-any.whl
Dec 09 05:57:12 WARNING: Skipping page https://s3.amazonaws.com/ossci-linux/wheels/hypothesis-3.44.6-py3-none-any.whl because the HEAD request got Content-Type: binary/octet-stream.The only supported Content-Type is text/html
Dec 09 05:57:13 + EXTRA_TESTS=()
Dec 09 05:57:13 + [[ pytorch-linux-xenial-py3-clang7-onnx-ort_test2 == *-cuda* ]]
Dec 09 05:57:13 + [[ pytorch-linux-xenial-py3-clang7-onnx-ort_test2 == *-rocm* ]]
Dec 09 05:57:13 + rocm_ignore_test=()
Dec 09 05:57:13 + [[ pytorch-linux-xenial-py3-clang7-onnx-ort_test2 == *-rocm* ]]

See CircleCI build pytorch_linux_xenial_py3_clang7_onnx_ort_test1 (3/4)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

Dec 09 05:47:43 ERROR: pip's dependency resolve... the source of the following dependency conflicts.
Dec 09 05:47:41 + PIP=/opt/conda/bin/pip
Dec 09 05:47:41 ++ stat --format %U /opt/conda/bin/pip
Dec 09 05:47:41 + PIP_USER=jenkins
Dec 09 05:47:41 ++ id -u -n
Dec 09 05:47:41 + CURRENT_USER=jenkins
Dec 09 05:47:41 + [[ jenkins = root ]]
Dec 09 05:47:41 + pip -q uninstall -y hypothesis
Dec 09 05:47:42 + pip -q uninstall -y coverage
Dec 09 05:47:42 + pip -q install attrs==18.1.0 -f https://s3.amazonaws.com/ossci-linux/wheels/attrs-18.1.0-py2.py3-none-any.whl
Dec 09 05:47:43 WARNING: Skipping page https://s3.amazonaws.com/ossci-linux/wheels/attrs-18.1.0-py2.py3-none-any.whl because the HEAD request got Content-Type: binary/octet-stream.The only supported Content-Type is text/html
Dec 09 05:47:43 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
Dec 09 05:47:43 pytest 6.2.5 requires attrs>=19.2.0, but you have attrs 18.1.0 which is incompatible.
Dec 09 05:47:43 + pip -q install coverage==4.5.1 -f https://s3.amazonaws.com/ossci-linux/wheels/coverage-4.5.1-cp36-cp36m-macosx_10_12_x86_64.whl
Dec 09 05:47:45 WARNING: Skipping page https://s3.amazonaws.com/ossci-linux/wheels/coverage-4.5.1-cp36-cp36m-macosx_10_12_x86_64.whl because the HEAD request got Content-Type: binary/octet-stream.The only supported Content-Type is text/html
Dec 09 05:47:45 + pip -q install hypothesis==3.44.6 -f https://s3.amazonaws.com/ossci-linux/wheels/hypothesis-3.44.6-py3-none-any.whl
Dec 09 05:47:47 WARNING: Skipping page https://s3.amazonaws.com/ossci-linux/wheels/hypothesis-3.44.6-py3-none-any.whl because the HEAD request got Content-Type: binary/octet-stream.The only supported Content-Type is text/html
Dec 09 05:47:48 + EXTRA_TESTS=()
Dec 09 05:47:48 + [[ pytorch-linux-xenial-py3-clang7-onnx-ort_test1 == *-cuda* ]]
Dec 09 05:47:48 + [[ pytorch-linux-xenial-py3-clang7-onnx-ort_test1 == *-rocm* ]]
Dec 09 05:47:48 + rocm_ignore_test=()
Dec 09 05:47:48 + [[ pytorch-linux-xenial-py3-clang7-onnx-ort_test1 == *-rocm* ]]

See CircleCI build pytorch_ios_12_5_1_arm64_custom_build (4/4)

Step: "Build" (full log | diagnosis details | 🔁 rerun)

Dec 09 05:21:36 TypeError: load() missing 1 required positional argument: 'Loader'
Dec 09 05:21:36 �[0mLoading yaml file:  /Users/distiller/project/ios/TestApp/custom_build/mobilenetv2.yaml
Dec 09 05:21:36 Traceback (most recent call last):
Dec 09 05:21:36   File "/Users/distiller/anaconda/lib/python3.9/runpy.py", line 197, in _run_module_as_main
Dec 09 05:21:36     return _run_code(code, main_globals, None,
Dec 09 05:21:36   File "/Users/distiller/anaconda/lib/python3.9/runpy.py", line 87, in _run_code
Dec 09 05:21:36     exec(code, run_globals)
Dec 09 05:21:36   File "/Users/distiller/project/tools/lite_interpreter/gen_selected_mobile_ops_header.py", line 134, in <module>
Dec 09 05:21:36     main()
Dec 09 05:21:36   File "/Users/distiller/project/tools/lite_interpreter/gen_selected_mobile_ops_header.py", line 124, in main
Dec 09 05:21:36     loaded_model = yaml.load(model_file)
Dec 09 05:21:36 TypeError: load() missing 1 required positional argument: 'Loader'
Dec 09 05:21:36 make[2]: *** [aten/src/ATen/selected_mobile_ops.h] Error 1
Dec 09 05:21:36 make[1]: *** [caffe2/CMakeFiles/__selected_mobile_ops_header_gen.dir/all] Error 2
Dec 09 05:21:36 make[1]: *** Waiting for unfinished jobs....
Dec 09 05:21:36 [  1%] Building CXX object c10/CMakeFiles/c10.dir/core/CPUAllocator.cpp.o
Dec 09 05:21:36 In file included from /Users/distiller/project/third_party/eigen/blas/single.cpp:15:
Dec 09 05:21:36 In file included from /Users/distiller/project/third_party/eigen/blas/level1_impl.h:10:
Dec 09 05:21:36 In file included from /Users/distiller/project/third_party/eigen/blas/common.h:21:
Dec 09 05:21:36 In file included from /Users/distiller/project/third_party/eigen/blas/../Eigen/Core:275:
Dec 09 05:21:36 �[1m/Users/distiller/project/third_party/eigen/blas/../Eigen/src/Core/Block.h:111:5: �[0m�[0;1;35mwarning: �[0m�[1mdefinition of implicit copy constructor for 'Block<Eigen::Map<Eigen::Matrix<float, -1, 1, 0>, 0>, -1, 1, true>' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]�[0m
Dec 09 05:21:36     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@seemethere
Copy link
Copy Markdown
Member Author

Appears as though test failures are legitimate for this particular PR.

This might make this PR miss the cut for 1.10.1 unless we can resolve the test failures

Namely, `make_weight` partial into `module_inputs_torch_nn_NLLLoss`
@malfet
Copy link
Copy Markdown
Contributor

malfet commented Dec 9, 2021

Cherry-picked missing changes in d1e4cba

@malfet malfet merged commit 0c91a70 into release/1.10 Dec 9, 2021
@malfet malfet deleted the cherry_pick_64954 branch December 9, 2021 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants