Skip to content

Delete cpp.group_arguments#49043

Closed
ezyang wants to merge 3 commits intogh/ezyang/888/basefrom
gh/ezyang/888/head
Closed

Delete cpp.group_arguments#49043
ezyang wants to merge 3 commits intogh/ezyang/888/basefrom
gh/ezyang/888/head

Conversation

@ezyang
Copy link
Copy Markdown
Contributor

@ezyang ezyang commented Dec 8, 2020

Stack from ghstack:

Previously, this function had nontrivial algorithmic content,
but after #48195, this was just a swiss army knife for pasting
together arguments while maintaining structure. I added some
more properties for Arguments for convenient access in this way,
and then inlined the implementation of group_arguments into all of its call
sites, simplifying whenever contextual. This might be controversial, but I
think the resulting code is easier to understand.

You may notice that there is some modest code duplication between
dispatcher.cpparguments_exprs and CppSignature.argument_packs.
This is a known problem and I will be attempting to fix it in
a follow up PR.

Confirmed to be byte-for-byte compatible.

Signed-off-by: Edward Z. Yang ezyang@fb.com

Differential Revision: D25455885

Previously, this function had nontrivial algorithmic content,
but after #48195, this was just a swiss army knife for pasting
together arguments while maintaining structure.  I added some
more properties for Arguments for convenient access in this way,
and then inlined the implementation of group_arguments into all of its call
sites, simplifying whenever contextual.  This might be controversial, but I
think the resulting code is easier to understand.

You may notice that there is some modest code duplication between
dispatcher.cpparguments_exprs and CppSignature.argument_packs.
This is a known problem and I will be attempting to fix it in
a follow up PR.

Confirmed to be byte-for-byte compatible.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Dec 8, 2020
Previously, this function had nontrivial algorithmic content,
but after #48195, this was just a swiss army knife for pasting
together arguments while maintaining structure.  I added some
more properties for Arguments for convenient access in this way,
and then inlined the implementation of group_arguments into all of its call
sites, simplifying whenever contextual.  This might be controversial, but I
think the resulting code is easier to understand.

You may notice that there is some modest code duplication between
dispatcher.cpparguments_exprs and CppSignature.argument_packs.
This is a known problem and I will be attempting to fix it in
a follow up PR.

Confirmed to be byte-for-byte compatible.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

ghstack-source-id: 7ff71ff
Pull Request resolved: #49043
@ezyang ezyang requested review from bhosmer and smessmer December 8, 2020 21:54
@dr-ci
Copy link
Copy Markdown

dr-ci bot commented Dec 8, 2020

💊 CI failures summary and remediations

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


  • 4/4 failures introduced in this PR

🕵️ 3 new failures recognized by patterns

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

See CircleCI build pytorch_linux_xenial_cuda9_2_cudnn7_py3_gcc5_4_build (1/3)

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

Dec 10 02:48:58 sccache: error: couldn't connect to server
Dec 10 02:48:58 +++ eval 'extract_trap_cmd ' 
Dec 10 02:48:58 ++++ extract_trap_cmd 
Dec 10 02:48:58 ++++ printf '%s\n' '' 
Dec 10 02:48:58 +++ printf '%s\n' cleanup 
Dec 10 02:48:58 ++ trap -- ' 
Dec 10 02:48:58 cleanup' EXIT 
Dec 10 02:48:58 ++ [[ pytorch-linux-xenial-cuda9.2-cudnn7-py3-gcc5.4-build != *pytorch-win-* ]] 
Dec 10 02:48:58 ++ which sccache 
Dec 10 02:48:58 ++ sccache --stop-server 
Dec 10 02:48:58 Stopping sccache server... 
Dec 10 02:48:58 sccache: error: couldn't connect to server 
Dec 10 02:48:58 sccache: caused by: Connection refused (os error 111) 
Dec 10 02:48:58 ++ true 
Dec 10 02:48:58 ++ rm /var/lib/jenkins/sccache_error.log 
Dec 10 02:48:58 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory 
Dec 10 02:48:58 ++ true 
Dec 10 02:48:58 ++ [[ pytorch-linux-xenial-cuda9.2-cudnn7-py3-gcc5.4-build == *rocm* ]] 
Dec 10 02:48:58 ++ SCCACHE_ERROR_LOG=/var/lib/jenkins/sccache_error.log 
Dec 10 02:48:58 ++ SCCACHE_IDLE_TIMEOUT=1200 
Dec 10 02:48:58 ++ RUST_LOG=sccache::server=error 
Dec 10 02:48:58 ++ sccache --start-server 

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_build (2/3)

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

Dec 10 02:49:13 sccache: error: couldn't connect to server
Dec 10 02:49:13 +++ eval 'extract_trap_cmd ' 
Dec 10 02:49:13 ++++ extract_trap_cmd 
Dec 10 02:49:13 ++++ printf '%s\n' '' 
Dec 10 02:49:13 +++ printf '%s\n' cleanup 
Dec 10 02:49:13 ++ trap -- ' 
Dec 10 02:49:13 cleanup' EXIT 
Dec 10 02:49:13 ++ [[ pytorch-xla-linux-bionic-py3.6-clang9-build != *pytorch-win-* ]] 
Dec 10 02:49:13 ++ which sccache 
Dec 10 02:49:13 ++ sccache --stop-server 
Dec 10 02:49:13 Stopping sccache server... 
Dec 10 02:49:13 sccache: error: couldn't connect to server 
Dec 10 02:49:13 sccache: caused by: Connection refused (os error 111) 
Dec 10 02:49:13 ++ true 
Dec 10 02:49:13 ++ rm /var/lib/jenkins/sccache_error.log 
Dec 10 02:49:13 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory 
Dec 10 02:49:13 ++ true 
Dec 10 02:49:13 ++ [[ pytorch-xla-linux-bionic-py3.6-clang9-build == *rocm* ]] 
Dec 10 02:49:13 ++ SCCACHE_ERROR_LOG=/var/lib/jenkins/sccache_error.log 
Dec 10 02:49:13 ++ SCCACHE_IDLE_TIMEOUT=1200 
Dec 10 02:49:13 ++ RUST_LOG=sccache::server=error 
Dec 10 02:49:13 ++ sccache --start-server 

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (3/3)

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

Dec 10 02:47:20 sccache: error: couldn't connect to server
Dec 10 02:47:20 +++ eval 'extract_trap_cmd ' 
Dec 10 02:47:20 ++++ extract_trap_cmd 
Dec 10 02:47:20 ++++ printf '%s\n' '' 
Dec 10 02:47:20 +++ printf '%s\n' cleanup 
Dec 10 02:47:20 ++ trap -- ' 
Dec 10 02:47:20 cleanup' EXIT 
Dec 10 02:47:20 ++ [[ pytorch-linux-xenial-py3.6-gcc5.4-build != *pytorch-win-* ]] 
Dec 10 02:47:20 ++ which sccache 
Dec 10 02:47:20 ++ sccache --stop-server 
Dec 10 02:47:20 Stopping sccache server... 
Dec 10 02:47:20 sccache: error: couldn't connect to server 
Dec 10 02:47:20 sccache: caused by: Connection refused (os error 111) 
Dec 10 02:47:20 ++ true 
Dec 10 02:47:20 ++ rm /var/lib/jenkins/sccache_error.log 
Dec 10 02:47:20 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory 
Dec 10 02:47:20 ++ true 
Dec 10 02:47:20 ++ [[ pytorch-linux-xenial-py3.6-gcc5.4-build == *rocm* ]] 
Dec 10 02:47:20 ++ SCCACHE_ERROR_LOG=/var/lib/jenkins/sccache_error.log 
Dec 10 02:47:20 ++ SCCACHE_IDLE_TIMEOUT=1200 
Dec 10 02:47:20 ++ RUST_LOG=sccache::server=error 
Dec 10 02:47:20 ++ sccache --start-server 

1 failure not recognized by patterns:

Job Step Action
CircleCI pytorch_linux_xenial_py3_clang5_asan_test1 Download Docker image 🔁 rerun

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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 12 times.

Previously, this function had nontrivial algorithmic content,
but after #48195, this was just a swiss army knife for pasting
together arguments while maintaining structure.  I added some
more properties for Arguments for convenient access in this way,
and then inlined the implementation of group_arguments into all of its call
sites, simplifying whenever contextual.  This might be controversial, but I
think the resulting code is easier to understand.

You may notice that there is some modest code duplication between
dispatcher.cpparguments_exprs and CppSignature.argument_packs.
This is a known problem and I will be attempting to fix it in
a follow up PR.

Confirmed to be byte-for-byte compatible.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

[ghstack-poisoned]
Previously, this function had nontrivial algorithmic content,
but after #48195, this was just a swiss army knife for pasting
together arguments while maintaining structure.  I added some
more properties for Arguments for convenient access in this way,
and then inlined the implementation of group_arguments into all of its call
sites, simplifying whenever contextual.  This might be controversial, but I
think the resulting code is easier to understand.

You may notice that there is some modest code duplication between
dispatcher.cpparguments_exprs and CppSignature.argument_packs.
This is a known problem and I will be attempting to fix it in
a follow up PR.

Confirmed to be byte-for-byte compatible.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

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

@ezyang merged this pull request in 9b0ffb9.

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.

3 participants