Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

[BUGFIX] Fix Windows GPU VS 2019 build (#20206)#20207

Merged
szha merged 1 commit into
apache:masterfrom
sjiagc:bugfix/fix-windows-gpu-build
Apr 30, 2021
Merged

[BUGFIX] Fix Windows GPU VS 2019 build (#20206)#20207
szha merged 1 commit into
apache:masterfrom
sjiagc:bugfix/fix-windows-gpu-build

Conversation

@sjiagc

@sjiagc sjiagc commented Apr 23, 2021

Copy link
Copy Markdown
Contributor

Description

To fix Windows GPU VS 2019 build, make CPU only EvalRandom functions' GPU version to call their CPU version. When compiling the C++ standard header file random provided by MSVC 14.28.29910 with __CUDACC__ (nvcc drives), the _Float_upper_bound fails to compile due to _CONSTEXPR_IF is defined to nothing, if _Ty_digits < _Flt_digits.

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Changes

  • Fix Windows GPU build with latest VS 2019

Comments

  • I tried building with the ci/build_windows.py script.
  • I don't know why CI or others haven't encountered this problem, but with my newly downloaded VS 2019 (MSVC 14.28.29910), it keeps failing.
  • My point is as less of CPU code should be compiled with __CUDACC__ flag as possible.

@mxnet-bot

Copy link
Copy Markdown

Hey @sjiagc , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [sanity, website, edge, windows-cpu, miscellaneous, clang, unix-cpu, centos-gpu, centos-cpu, windows-gpu, unix-gpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 23, 2021
@sjiagc
sjiagc force-pushed the bugfix/fix-windows-gpu-build branch from aeec2a4 to b387d9b Compare April 23, 2021 17:47
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 23, 2021
@sjiagc
sjiagc force-pushed the bugfix/fix-windows-gpu-build branch from b387d9b to 9a05b6e Compare April 24, 2021 02:13
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 24, 2021
@sjiagc

sjiagc commented Apr 24, 2021

Copy link
Copy Markdown
Contributor Author

@mxnet-bot run ci [unix-gpu]

@mxnet-bot

Copy link
Copy Markdown

Jenkins CI successfully triggered : [unix-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 24, 2021
@sjiagc

sjiagc commented Apr 24, 2021

Copy link
Copy Markdown
Contributor Author

@mxnet-bot run ci [unix-cpu]

@mxnet-bot

Copy link
Copy Markdown

Jenkins CI successfully triggered : [unix-cpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 24, 2021
@sjiagc

sjiagc commented Apr 24, 2021

Copy link
Copy Markdown
Contributor Author

@mxnet-bot run ci [unix-cpu]

@mxnet-bot

Copy link
Copy Markdown

Jenkins CI successfully triggered : [unix-cpu]

@mseth10 mseth10 removed the pr-work-in-progress PR is still work in progress label Apr 24, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review labels Apr 24, 2021
@sjiagc

sjiagc commented Apr 27, 2021

Copy link
Copy Markdown
Contributor Author

My point is as less of CPU code should be compiled with __CUDACC__ flag as possible.

@mseth10 mseth10 added pr-awaiting-review PR is waiting for code review pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review labels Apr 27, 2021
@sjiagc

sjiagc commented Apr 28, 2021

Copy link
Copy Markdown
Contributor Author

@mxnet-bot run ci [unix-cpu, unix-gpu, windows-cpu]

@mxnet-bot

Copy link
Copy Markdown

Jenkins CI successfully triggered : [unix-cpu, unix-gpu, windows-cpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 28, 2021
@sjiagc

sjiagc commented Apr 29, 2021

Copy link
Copy Markdown
Contributor Author

@mxnet-bot run ci [unix-cpu, windows-cpu]

@mxnet-bot

Copy link
Copy Markdown

Jenkins CI successfully triggered : [unix-cpu, windows-cpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 29, 2021

@szha szha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@szha
szha merged commit 2aa2453 into apache:master Apr 30, 2021
@szha

szha commented Apr 30, 2021

Copy link
Copy Markdown
Member

@sjiagc thanks for the fix!

pull Bot pushed a commit to vishalbelsare/incubator-mxnet that referenced this pull request Apr 30, 2021
Co-authored-by: Tom Shen <jun.shen@advance.ai>
chinakook pushed a commit to chinakook/mxnet that referenced this pull request May 2, 2021
Co-authored-by: Tom Shen <jun.shen@advance.ai>
@sjiagc
sjiagc deleted the bugfix/fix-windows-gpu-build branch May 3, 2021 08:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr-awaiting-review PR is waiting for code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants