Skip to content

Remove unused variable from _get_simple_reduction_kernel template#2518

Closed
grlee77 wants to merge 1 commit intocupy:masterfrom
grlee77:reduction_tweak
Closed

Remove unused variable from _get_simple_reduction_kernel template#2518
grlee77 wants to merge 1 commit intocupy:masterfrom
grlee77:reduction_tweak

Conversation

@grlee77
Copy link
Copy Markdown
Member

@grlee77 grlee77 commented Oct 2, 2019

_J is defined and incremented, but doesn't appear to actually ever be used

@niboshi
Copy link
Copy Markdown
Member

niboshi commented Oct 3, 2019

Jenkins, test this please

@pfn-ci-bot
Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 653d6ea:

@niboshi niboshi added the cat:code-fix Code refactoring that do not change behavior label Oct 3, 2019
@niboshi niboshi changed the title remove unused variable from _get_simple_reduction_kernel template Remove unused variable from _get_simple_reduction_kernel template Oct 3, 2019
@niboshi niboshi self-assigned this Oct 3, 2019
@niboshi
Copy link
Copy Markdown
Member

niboshi commented Oct 3, 2019

It seems it's actually used in {nan,}arg{min,max}... 😥

@chainer-ci
Copy link
Copy Markdown
Member

Jenkins CI test (for commit 653d6ea, target branch master) failed with status FAILURE.

@grlee77
Copy link
Copy Markdown
Member Author

grlee77 commented Oct 3, 2019

Okay, my mistake. I will close this one. Thanks

@niboshi
Copy link
Copy Markdown
Member

niboshi commented Oct 3, 2019

Thank you any way for reporting.
I've made an issue to improve the code: #2522

@leofang
Copy link
Copy Markdown
Member

leofang commented Oct 3, 2019

Haha it happens. Like in #2449 I thought I caught two unused lines, but it turned out that they are needed to keep the objects alive. There're always surprises. But, it's nice to have additional pairs of eyes inspecting the codebase. One day we'll catch a real one!

@kmaehashi kmaehashi added this to the Closed issues and PRs milestone Oct 25, 2019
@grlee77 grlee77 deleted the reduction_tweak branch November 26, 2019 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:code-fix Code refactoring that do not change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants