Skip to content

Conversation

@achalshah20
Copy link
Contributor

@achalshah20 achalshah20 commented Jul 31, 2018

When we directly use -std=c++11, it propagates to the downstream applications.

Problems:

  1. Gcc flags propagating to nvcc.
  2. nvcc flags propagating to nvcc. (Which throws an error like redeclaration of std flag)

This PR will fix these propagation issues!

Similar problem:
FloopCZ/tensorflow_cc#92
CGAL/cgal#2775

Requires: Cmake 3.12

@ezyang
Copy link
Contributor

ezyang commented Aug 1, 2018

Hi @achalshah20, we can't take this PR as is because we support more versions cmake than 3.12 or later. Do you know a way to apply this treatment in a way that's compatible with older versions of cmake?

@achalshah20
Copy link
Contributor Author

achalshah20 commented Aug 3, 2018

Hi @ezyang Which is the minimum cmake version required right now?

I just realized the pthread thing is a bug from cmake, we can't do anything about that but we can control std flags as it only requires cmake 3.3. How does it sound?

@achalshah20 achalshah20 force-pushed the nvcc_fix branch 2 times, most recently from 1e74a5d to 921cfce Compare August 3, 2018 01:17
@ezyang
Copy link
Contributor

ezyang commented Aug 3, 2018

The top level cmake seems to imply it's 3.5.

@ezyang
Copy link
Contributor

ezyang commented Aug 3, 2018

@pytorchbot retest this please

pthread bug is coming from cmake, so reverting

pthread issue is coming from cmake so reverting

Compile language doesnt support windows build, so adding condition
@achalshah20
Copy link
Contributor Author

Fixed the windows build as compile language does not support windows yet, so added condition!

TARGET Threads::Threads
PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread")
set_property(TARGET Threads::Threads
PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread")

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

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

ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Aug 6, 2018
Summary:
When we directly use -std=c++11, it propagates to the downstream applications.

Problems:
1. Gcc flags propagating to nvcc.
2. nvcc flags propagating to nvcc. (Which throws an error like redeclaration of std flag)

This PR will fix these propagation issues!

Similar problem:
FloopCZ/tensorflow_cc#92
CGAL/cgal#2775

Requires: Cmake 3.12
Pull Request resolved: pytorch/pytorch#10098

Differential Revision: D9187110

Pulled By: ezyang

fbshipit-source-id: 0e00e6aa3119c77a5b3ea56992ef3bbfecd71d80
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
When we directly use -std=c++11, it propagates to the downstream applications.

Problems:
1. Gcc flags propagating to nvcc.
2. nvcc flags propagating to nvcc. (Which throws an error like redeclaration of std flag)

This PR will fix these propagation issues!

Similar problem:
FloopCZ/tensorflow_cc#92
CGAL/cgal#2775

Requires: Cmake 3.12
Pull Request resolved: pytorch#10098

Differential Revision: D9187110

Pulled By: ezyang

fbshipit-source-id: 0e00e6aa3119c77a5b3ea56992ef3bbfecd71d80
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