8000 Add -Wno-error=nonnull for test/cpp/api/ by JackTemaki · Pull Request #99468 · pytorch/pytorch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add -Wno-error=nonnull for test/cpp/api/ #99468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

JackTemaki
Copy link

On some platforms the build might fail due to the nonnull error being triggered by different compiler behavior.

Fixes #99278.

On some platforms the build might fail due to the nonnull error
being triggered by different compiler behavior.

Fix for pytorch#99278.
@pytorch-bot
Copy link
pytorch-bot bot commented Apr 18, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/99468

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 367387b:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Apr 18, 2023
@linux-foundation-easycla
Copy link
linux-foundation-easycla bot commented Apr 18, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: JackTemaki / name: Nick Rossenbach (367387b)

@fractal-fumbler
Copy link

this PR solved my issue and let pytorch to compile.
thanks a lot!

@mikaylagawarecki mikaylagawarecki requested a review from malfet April 25, 2023 15:10
@mikaylagawarecki mikaylagawarecki added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 25, 2023
@kit1980
Copy link
Contributor
kit1980 commented May 3, 2023

Can we add this only for riscv?

Copy link
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.

Please restrict those error suppressions only to the specific architectures (i.e. we should not add new suppression for x86/arm targets if those can be avoided)

@jgong5
Copy link
Collaborator
jgong5 commented Jun 25, 2023

Please restrict those error suppressions only to the specific architectures (i.e. we should not add new suppression for x86/arm targets if those can be avoided)

It seems the problem is not arch specific. I got similar problem on x86 cpu with gcc-12.3.0 installed from conda-forge and confirmed that this PR fixes the problem. I think it makes sense to apply this regardless of archs.

# the nonnull check might trigger for some build configurations,
# probably happening due to different code optimization
# (see e.g. https://rkoucha.fr/tech_corner/nonnull_gcc_attribute.html)
# this happened for a riscv build: https://github.com/pytorch/pytorch/issues/99278
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might make sense to mention that it is not riscv build specific.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@JackTemaki Are you going to continue work on it?

Copy link
Author

Choose a reason for hiding this comment

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

Yes I can, it was just not clear for me what changes are needed. Just an altered message, referencing also the issues unrelated to riscv?

@github-actions
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@Xia-Weiwen
Copy link
Collaborator

I am also seeing the problem on X86 with gcc/gxx installed by Conda. And this patch works. Is it possible to reopen this PR and land it for all archs? Thanks. @JackTemaki @malfet

8000

@snadampal
Copy link
Collaborator

I'm seeing this problem on aarch64 linux with gcc12 compilation. can this be merge?
cc: @malfet , @atalman

@code2595015127
Copy link
code2595015127 commented Jul 1, 2024

solved my problem too :)
target_compile_options_if_supported(test_api "-Wno-error=nonnull")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open source Stale topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build error on libstc++ header stl_alogbase.h on riscv
10 participants
0