Skip to content

add missing return statement to inlined vec_signed#51116

Closed
dncliss wants to merge 1 commit intopytorch:masterfrom
dncliss:vec_signed_return
Closed

add missing return statement to inlined vec_signed#51116
dncliss wants to merge 1 commit intopytorch:masterfrom
dncliss:vec_signed_return

Conversation

@dncliss
Copy link
Copy Markdown
Contributor

@dncliss dncliss commented Jan 26, 2021

Fixes #{issue number}
This is not really a new issue, just a proposed minor fix to a recent previous issue (now closed) #50640 which was a fix for #50439.

That fix added inlining for vec_signed (and others) but in one case the return was accidentally omitted. This results in a build error:

                 from �[01m�[Katen/src/ATen/native/cpu/FillKernel.cpp.VSX.cpp:3�[m�[K:
�[01m�[K../aten/src/ATen/cpu/vec256/vsx/vsx_helpers.h:�[m�[K In function ‘�[01m�[Kvint32 vec_signed(const vfloat32&)�[m�[K’:
�[01m�[K../aten/src/ATen/cpu/vec256/vsx/vsx_helpers.h:33:1:�[m�[K �[01;31m�[Kerror: �[m�[Kno return statement in function returning non-void [�[01;31m�[K-Werror=return-type�[m�[K]

I've confirmed that the error disappears after this one-line fix. (Note: There is another issue encountered later in the build unrelated to this particular fix, as I noted in a separate comment in the original issue. I'm trying to make some sense of that one, but in any event it would be a subject for another issue/PR).

@facebook-github-bot
Copy link
Copy Markdown
Contributor

Hi @dncliss!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

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
Copy Markdown
Contributor

facebook-github-bot commented Jan 26, 2021

💊 CI failures summary and remediations

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


💚 💚 Looks good so far! There are no failures yet. 💚 💚


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.

@dncliss
Copy link
Copy Markdown
Contributor Author

dncliss commented Jan 26, 2021

@malfet -- I've taken the liberty of trying to correct the small error in the referenced PR myself, here via this new PR.
Let me know if there are any problems with me submitting it in this way, or if I should do something differently.
(I've now handled the CLA as per the bot message).

@malfet malfet self-requested a review January 26, 2021 18:11
Copy link
Copy Markdown
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

Thank you for the fix!

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 26, 2021

Codecov Report

Merging #51116 (57ff7cd) into master (5f297cc) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #51116      +/-   ##
==========================================
- Coverage   80.89%   80.89%   -0.01%     
==========================================
  Files        1928     1928              
  Lines      210486   210486              
==========================================
- Hits       170267   170263       -4     
- Misses      40219    40223       +4     

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@malfet merged this pull request in 42929e5.

@dncliss dncliss deleted the vec_signed_return branch January 28, 2021 00:18
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Fixes #{issue number}
This is not really a new issue, just a proposed minor fix to a recent previous issue (now closed) pytorch#50640 which was a fix for pytorch#50439.

That fix added inlining for vec_signed (and others) but in one case the return was accidentally omitted.  This results in a build error:
```                 from �[01m�[K../aten/src/ATen/cpu/vec256/vec256.h:19�[m�[K,
                 from �[01m�[Katen/src/ATen/native/cpu/FillKernel.cpp.VSX.cpp:3�[m�[K:
�[01m�[K../aten/src/ATen/cpu/vec256/vsx/vsx_helpers.h:�[m�[K In function ‘�[01m�[Kvint32 vec_signed(const vfloat32&)�[m�[K’:
�[01m�[K../aten/src/ATen/cpu/vec256/vsx/vsx_helpers.h:33:1:�[m�[K �[01;31m�[Kerror: �[m�[Kno return statement in function returning non-void [�[01;31m�[K-Werror=return-type�[m�[K]
```

I've confirmed that the error disappears after this one-line fix.  (Note: There is another issue encountered later in the build unrelated to this particular fix, as I noted in a separate comment in the original issue.  I'm trying to make some sense of that one, but in any event it would be a subject for another issue/PR).

Pull Request resolved: pytorch#51116

Reviewed By: heitorschueroff

Differential Revision: D26078213

Pulled By: malfet

fbshipit-source-id: 59b2ee19138fa1b8d8ec1d35ca4a5ef0a67bc123
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