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

Include all mkldnn headers in CD builds #18355

Merged
merged 2 commits into from
May 19, 2020
Merged

Conversation

leezu
Copy link
Contributor

@leezu leezu commented May 18, 2020

Fixes #18120 specifically #18120 (comment)

@leezu leezu requested a review from szha as a code owner May 18, 2020 19:48
@mxnet-bot
Copy link

Hey @leezu , 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: [centos-gpu, windows-gpu, unix-cpu, miscellaneous, website, unix-gpu, sanity, centos-cpu, clang, windows-cpu, edge]


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.

@leezu leezu requested a review from TaoLv May 19, 2020 00:32
@leezu leezu added the pr-awaiting-review PR is waiting for code review label May 19, 2020
set(DNNL_ENABLE_CONCURRENT_EXEC ON CACHE INTERNAL "" FORCE)

if(NOT USE_OPENMP)
function(load_mkldnn)
Copy link
Member

Choose a reason for hiding this comment

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

Why need put them into a function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Functions have their own scope in cmake. We don't want to change any of the settings outside of this function (such as the install target name for the include files)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So it's really about setting the CMAKE_INSTALL_INCLUDEDIR differently for mkldnn which is introduced in this PR

include_directories(3rdparty/mkldnn/include)
include_directories(${PROJECT_BINARY_DIR}/3rdparty/mkldnn/include)
add_definitions(-DMXNET_USE_MKLDNN=1)
list(APPEND mxnet_LINKER_LIBS dnnl)
set(INSTALL_MKLDNN ON)
Copy link
Member

Choose a reason for hiding this comment

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

Why it's removed? @yzhliu FYI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This variable isn't used anywhere but in this line

@leezu leezu requested a review from TaoLv May 19, 2020 04:07
@leezu leezu merged commit 3140c55 into apache:master May 19, 2020
@leezu leezu deleted the cmakeinstall branch May 19, 2020 05:43
MoisesHer pushed a commit to MoisesHer/incubator-mxnet that referenced this pull request Jun 23, 2020
* Fix cmake mkldnn install target. Previously mkldnn headers are installed to CMAKE_INSTALL_INCLUDEDIR instead of CMAKE_INSTALL_INCLUDEDIR/mkldnn

* Fix pypi_package.sh pip/setup.py for mkldnn builds
AntiZpvoh pushed a commit to AntiZpvoh/incubator-mxnet that referenced this pull request Jul 6, 2020
* Fix cmake mkldnn install target. Previously mkldnn headers are installed to CMAKE_INSTALL_INCLUDEDIR instead of CMAKE_INSTALL_INCLUDEDIR/mkldnn

* Fix pypi_package.sh pip/setup.py for mkldnn builds
sandeep-krishnamurthy pushed a commit that referenced this pull request Jul 20, 2020
* cherry-pick: Fix missing MKLDNN headers (#18310)

* Include all mkldnn headers in CD builds (#18355)

* Fix cmake mkldnn install target. Previously mkldnn headers are installed to CMAKE_INSTALL_INCLUDEDIR instead of CMAKE_INSTALL_INCLUDEDIR/mkldnn

* Fix pypi_package.sh pip/setup.py for mkldnn builds

* Set CMAKE_CUDA_COMPILER in aarch64-linux-gnu-toolchain.cmake (#18713)

CMAKE_CUDA_HOST_COMPILER will be reset if CMAKE_CUDA_COMPILER is not set as of cmake 3.17.3

See https://gitlab.kitware.com/cmake/cmake/-/issues/20826

Co-authored-by: Leonard Lausen <[email protected]>
ChaiBapchya pushed a commit to ChaiBapchya/mxnet that referenced this pull request Jul 27, 2020
* cherry-pick: Fix missing MKLDNN headers (apache#18310)

* Include all mkldnn headers in CD builds (apache#18355)

* Fix cmake mkldnn install target. Previously mkldnn headers are installed to CMAKE_INSTALL_INCLUDEDIR instead of CMAKE_INSTALL_INCLUDEDIR/mkldnn

* Fix pypi_package.sh pip/setup.py for mkldnn builds

* Set CMAKE_CUDA_COMPILER in aarch64-linux-gnu-toolchain.cmake (apache#18713)

CMAKE_CUDA_HOST_COMPILER will be reset if CMAKE_CUDA_COMPILER is not set as of cmake 3.17.3

See https://gitlab.kitware.com/cmake/cmake/-/issues/20826

Co-authored-by: Leonard Lausen <[email protected]>
szha pushed a commit that referenced this pull request Aug 3, 2020
* Cherry-pick #18310 #18355 (#18608)

* cherry-pick: Fix missing MKLDNN headers (#18310)

* Include all mkldnn headers in CD builds (#18355)

* Fix cmake mkldnn install target. Previously mkldnn headers are installed to CMAKE_INSTALL_INCLUDEDIR instead of CMAKE_INSTALL_INCLUDEDIR/mkldnn

* Fix pypi_package.sh pip/setup.py for mkldnn builds

* Set CMAKE_CUDA_COMPILER in aarch64-linux-gnu-toolchain.cmake (#18713)

CMAKE_CUDA_HOST_COMPILER will be reset if CMAKE_CUDA_COMPILER is not set as of cmake 3.17.3

See https://gitlab.kitware.com/cmake/cmake/-/issues/20826

Co-authored-by: Leonard Lausen <[email protected]>

* remove linux-gputoolchain

Co-authored-by: MoisesHer <[email protected]>
Co-authored-by: Leonard Lausen <[email protected]>
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.

MKLDNN header missing in recent mxnet nightly static builds
3 participants