Skip to content

Move set_version_counter out of DifferentiableViewMeta constructor.#55653

Closed
ailzhang wants to merge 1 commit intogh/ailzhang/61/basefrom
gh/ailzhang/61/head
Closed

Move set_version_counter out of DifferentiableViewMeta constructor.#55653
ailzhang wants to merge 1 commit intogh/ailzhang/61/basefrom
gh/ailzhang/61/head

Conversation

@ailzhang
Copy link
Contributor

@ailzhang ailzhang commented Apr 9, 2021

Stack from ghstack:

It's hard for me to understand that when we call
impl->set_autograd_meta(std::make_unique<DifferentiableViewMeta> it
has a side effect changing impl->set_version_counter() as well.
I'd prefer this setter is called explicitly and it's easier for the
followup refactor.

Differential Revision: D27669075

It's hard for me to understand that when we call
`impl->set_autograd_meta(std::make_unique<DifferentiableViewMeta>` it
has a side effect changing `impl->set_version_counter()` as well.
I'd prefer this setter is called explicitly and it's easier for the
followup refactor.

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Apr 9, 2021

💊 CI failures summary and remediations

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


  • 4/4 failures possibly* introduced in this PR
    • 2/4 non-scanned failure(s)

🕵️ 2 new failures recognized by patterns

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

See CircleCI build pytorch_linux_bionic_rocm3_9_py3_6_build (1/2)

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

Apr 09 02:40:57 Error generating file
Apr 09 02:40:57         AT_CUDA_CHECK(cub::DeviceSegmentedReduce::Reduce(
Apr 09 02:40:57                       ^
Apr 09 02:40:57 /var/lib/jenkins/workspace/aten/src/ATen/native/hip/SegmentReduce.hip:90:23: error: use of undeclared identifier 'cub'
Apr 09 02:40:57         AT_CUDA_CHECK(cub::DeviceSegmentedReduce::Reduce(
Apr 09 02:40:57                       ^
Apr 09 02:40:57 /var/lib/jenkins/workspace/aten/src/ATen/native/hip/SegmentReduce.hip:105:23: error: use of undeclared identifier 'cub'
Apr 09 02:40:57         AT_CUDA_CHECK(cub::DeviceSegmentedReduce::Reduce(
Apr 09 02:40:57                       ^
Apr 09 02:40:57 18 errors generated when compiling for gfx900.
Apr 09 02:40:57 CMake Error at torch_hip_generated_SegmentReduce.hip.o.cmake:192 (message):
Apr 09 02:40:57   Error generating file
Apr 09 02:40:57   /var/lib/jenkins/workspace/build/caffe2/CMakeFiles/torch_hip.dir/__/aten/src/ATen/native/hip/./torch_hip_generated_SegmentReduce.hip.o
Apr 09 02:40:57 
Apr 09 02:40:57 
Apr 09 02:40:57 caffe2/CMakeFiles/torch_hip.dir/build.make:1195: recipe for target 'caffe2/CMakeFiles/torch_hip.dir/__/aten/src/ATen/native/hip/torch_hip_generated_SegmentReduce.hip.o' failed
Apr 09 02:40:57 make[2]: *** [caffe2/CMakeFiles/torch_hip.dir/__/aten/src/ATen/native/hip/torch_hip_generated_SegmentReduce.hip.o] Error 1
Apr 09 02:40:57 make[2]: *** Waiting for unfinished jobs....
Apr 09 02:41:02 In file included from /var/lib/jenkins/workspace/aten/src/ATen/native/hip/ScatterGatherKernel.hip:13:
Apr 09 02:41:02 In file included from /var/lib/jenkins/workspace/aten/src/ATen/native/hip/Loops.cuh:18:
Apr 09 02:41:02 /var/lib/jenkins/workspace/aten/src/ATen/native/hip/MemoryAccess.cuh:38:26: warning: template template parameter using 'typename' is a C++17 extension [-Wc++17-extensions]
Apr 09 02:41:02 template<template<int i> typename func, int end, int current=0>

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_test (2/2)

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

Apr 09 04:14:20 ERROR [0.006s]: TestViewOpsXLA (unittest.loader._FailedTest)
Apr 09 04:14:17 + XLA_EXPERIMENTAL=nonzero:masked_select
Apr 09 04:14:17 + run_test python3 /var/lib/jenkins/workspace/xla/test/../../test/test_view_ops.py -v TestViewOpsXLA
Apr 09 04:14:17 + python3 /var/lib/jenkins/workspace/xla/test/../../test/test_view_ops.py -v TestViewOpsXLA
Apr 09 04:14:20 Test results will be stored in test-reports/python-unittest/.var.lib.jenkins.workspace.xla.test.......test.test_view_ops
Apr 09 04:14:20 
Apr 09 04:14:20 Running tests...
Apr 09 04:14:20 ----------------------------------------------------------------------
Apr 09 04:14:20   TestViewOpsXLA (unittest.loader._FailedTest) ... ERROR (0.006s)
Apr 09 04:14:20 
Apr 09 04:14:20 ======================================================================
Apr 09 04:14:20 ERROR [0.006s]: TestViewOpsXLA (unittest.loader._FailedTest)
Apr 09 04:14:20 ----------------------------------------------------------------------
Apr 09 04:14:20 AttributeError: module '__main__' has no attribute 'TestViewOpsXLA'
Apr 09 04:14:20 
Apr 09 04:14:20 ----------------------------------------------------------------------
Apr 09 04:14:20 Ran 1 test in 0.007s
Apr 09 04:14:20 
Apr 09 04:14:20 FAILED (errors=1)
Apr 09 04:14:20 
Apr 09 04:14:20 Generating XML reports...
Apr 09 04:14:20 Generated XML report: test-reports/python-unittest/.var.lib.jenkins.workspace.xla.test.......test.test_view_ops/TEST-unittest.loader._FailedTest-20210409041420.xml

ci.pytorch.org: 2 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

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

Click here to manually regenerate this comment.

ailzhang pushed a commit that referenced this pull request Apr 9, 2021
It's hard for me to understand that when we call
`impl->set_autograd_meta(std::make_unique<DifferentiableViewMeta>` it
has a side effect changing `impl->set_version_counter()` as well.
I'd prefer this setter is called explicitly and it's easier for the
followup refactor.

ghstack-source-id: 217bb61
Pull Request resolved: #55653
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Do we have a document that explains the new version counter logic and who is expected to set it and where?

@ailzhang
Copy link
Contributor Author

@albanD This change is not necessary :P I just feel the side effect was a bit hard to understand during refactoring relevant code. Will send a few more PRs to show how the refactor looks like in the end state and then we can discuss whether we want this change or not :D.

@ailzhang
Copy link
Contributor Author

@pytorchbot retest this please

@facebook-github-bot
Copy link
Contributor

Hi @ailzhang!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ailzhang ailzhang closed this Oct 8, 2021
@facebook-github-bot facebook-github-bot deleted the gh/ailzhang/61/head branch November 7, 2021 15:16
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