Skip to content
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

[Misc] Add MKL library path for standalone installation #5510

Merged
merged 3 commits into from
Apr 4, 2023

Conversation

itaraban
Copy link
Collaborator

@itaraban itaraban commented Mar 29, 2023

Description

Fix sparse library link issue, caused by wrong Torch MKL CMake settings
Resolves issue: #5474

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • I've leverage the tools to beautify the python and c++ code.
  • The PR is complete and small, read the Google eng practice (CL equals to PR) to understand more about small PR. In DGL, we consider PRs with less than 200 lines of core code change are small (example, test and documentation could be exempted).
  • All changes have test coverage
  • Code is well-documented
  • To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
  • Related issue is referred in this PR
  • If the PR is for a new model/paper, I've updated the example index here.

Changes

@dgl-bot
Copy link
Collaborator

dgl-bot commented Mar 29, 2023

To trigger regression tests:

  • @dgl-bot run [instance-type] [which tests] [compare-with-branch];
    For example: @dgl-bot run g4dn.4xlarge all dmlc/master or @dgl-bot run c5.9xlarge kernel,api dmlc/master

@dgl-bot
Copy link
Collaborator

dgl-bot commented Mar 29, 2023

Commit ID: ce56a7c

Build ID: 1

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Mar 29, 2023

Commit ID: 9a76f4a

Build ID: 2

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@@ -50,5 +50,12 @@ target_include_directories(${LIB_DGL_SPARSE_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/t
message(STATUS "DGL include directories: ${DGL_INCLUDE_DIRS}")
target_include_directories(${LIB_DGL_SPARSE_NAME} PRIVATE ${DGL_INCLUDE_DIRS})
target_link_directories(${LIB_DGL_SPARSE_NAME} PRIVATE ${DGL_BUILD_DIR} "${DGL_BUILD_DIR}/third_party/dmlc-core")

# Torch CMake sets up MKL library path only for conda distribution
# WA for standalone MKL installation
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's WA?.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Workaround, I changed it to be more readable

@@ -50,5 +50,12 @@ target_include_directories(${LIB_DGL_SPARSE_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/t
message(STATUS "DGL include directories: ${DGL_INCLUDE_DIRS}")
target_include_directories(${LIB_DGL_SPARSE_NAME} PRIVATE ${DGL_INCLUDE_DIRS})
target_link_directories(${LIB_DGL_SPARSE_NAME} PRIVATE ${DGL_BUILD_DIR} "${DGL_BUILD_DIR}/third_party/dmlc-core")

# Torch CMake sets up MKL library path only for conda distribution
# WA for standalone MKL installation
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit, end the sentence with dot.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed

@dgl-bot
Copy link
Collaborator

dgl-bot commented Mar 30, 2023

Commit ID: 0df796c

Build ID: 3

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

FYI @czkkkkkk

Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
@dgl-bot
Copy link
Collaborator

dgl-bot commented Mar 31, 2023

Commit ID: edb6cb03e36c1c5909ad03cb8106346ad93142cd

Build ID: 4

Status: ❌ CI test failed in Stage [Torch CPU Example test].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Apr 3, 2023

Commit ID: 8535ef6

Build ID: 5

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@czkkkkkk
Copy link
Collaborator

czkkkkkk commented Apr 3, 2023

Why does this PR fix #5474 ? In the issue, you mentioned that "libxsmm can use different compiler from what was used in cmake". How does this PR fix the problem of libxsmm?

@itaraban
Copy link
Collaborator Author

itaraban commented Apr 3, 2023

@czkkkkkk , Fix for "different compiler issue" was already in #5497.
This PR fixes original problem - cannot find -lmkl_core: No such file or directory, which shouldn't require running source /opt/intel/oneapi/setvars.sh.

@frozenbugs frozenbugs merged commit e8579d8 into dmlc:master Apr 4, 2023
czkkkkkk pushed a commit that referenced this pull request Apr 19, 2023
Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
DominikaJedynak pushed a commit to DominikaJedynak/dgl that referenced this pull request Mar 12, 2024
Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants