Skip to content

Let users pass CMake-specific options starting with CMAKE_ to CMake. - #22776

Closed
xuhdev wants to merge 2 commits into
pytorch:masterfrom
xuhdev:build/pass-CMAKE_
Closed

xuhdev wants to merge 2 commits into
pytorch:masterfrom
xuhdev:build/pass-CMAKE_

Conversation

@xuhdev

@xuhdev xuhdev commented Jul 11, 2019 •

Copy link
Copy Markdown
Collaborator

This should make it more convenient to follow #8433's suggestion.

@pytorchbot pytorchbot added the module: build Build system issues label Jul 11, 2019
@xuhdev
xuhdev requested a review from ezyang July 11, 2019 22:51
@xuhdev

xuhdev commented Jul 11, 2019

Copy link
Copy Markdown
Collaborator Author

cc @pietern

@pietern

pietern commented Jul 12, 2019

Copy link
Copy Markdown
Contributor

LGTM. Deferring to @kostmo for final verdict.

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

Copy link
Copy Markdown
Contributor

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.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@ezyang merged this pull request in 612eed3.

@ezyang

ezyang commented Jul 12, 2019

Copy link
Copy Markdown
Contributor

Windows failure was real, unlanding...

@xuhdev xuhdev reopened this Jul 12, 2019
@xuhdev

xuhdev commented Jul 12, 2019

Copy link
Copy Markdown
Collaborator Author

@pytorchbot rebase this please

@xuhdev xuhdev removed the merged label Jul 12, 2019
@xuhdev
xuhdev requested a review from ezyang July 12, 2019 16:49
Comment thread tools/setup_helpers/cmake.py Resolved
@ezyang

ezyang commented Jul 15, 2019

Copy link
Copy Markdown
Contributor

The new error message is all well and good, but it doesn't fix the error (because, ostensibly, Windows is setting the envvar in question).

16:59:42 Installing collected packages: pyyaml
16:59:43 Successfully installed pyyaml-5.1.1
16:59:43 You are using pip version 10.0.1, however version 19.1.1 is available.
16:59:43 You should consider upgrading via the 'python -m pip install --upgrade pip' command.
16:59:43 CAFFE2_ROOT=C:\Jenkins\workspace\caffe2-builds\py2-cuda9.0-cudnn7-windows-build\scripts\..
16:59:43 CMAKE_GENERATOR=Visual Studio 15 2017
16:59:43 CMAKE_BUILD_TYPE=Release
16:59:43 CMAKE_BUILD_TYPE should not be specified in the environment variable. They are directly set by PyTorch build script.
16:59:43 "Caffe2 building failed"

Maybe we should just warn and ignore in this case? Not too sure; as my earlier comment wonders, maybe we shouldn't be setting these environment variables at all from Python.

@ezyang ezyang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Windows still broken

@zou3519 zou3519 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jul 16, 2019
xuhdev added a commit to xuhdev/pytorch that referenced this pull request Jul 22, 2019
…ol DEBUG variable.

Currently the build type is decided by the environment variable DEBUG
and REL_WITH_DEB_INFO. This commit also lets CMAKE_BUILD_TYPE be
effective. This makes the interface more consistent with CMake. This
also prepares pytorch#22776.
facebook-github-bot pushed a commit that referenced this pull request Jul 24, 2019
…ol DEBUG and REL_WITH_DEB_INFO variables. (#22875)

Summary:
Currently the build type is decided by the environment variable DEBUG
and REL_WITH_DEB_INFO. This commit also lets CMAKE_BUILD_TYPE be
effective. This makes the interface more consistent with CMake. This
also prepares #22776.
Pull Request resolved: #22875

Differential Revision: D16281663

Pulled By: ezyang

fbshipit-source-id: 952f92aad85ff59f1c7abe8256eca8a4a0936026
@xuhdev
xuhdev force-pushed the build/pass-CMAKE_ branch from 3664f94 to dfb617a Compare July 24, 2019 17:41
@xuhdev
xuhdev requested a review from ezyang July 24, 2019 17:59
@xuhdev

xuhdev commented Jul 24, 2019

Copy link
Copy Markdown
Collaborator Author

The windows test failed, but not is related to build

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

Copy link
Copy Markdown
Contributor

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.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@ezyang merged this pull request in 915261c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: build Build system issues open source 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.

7 participants