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

[Build] Add CMake changes from conda-forge build #6189

Merged
merged 10 commits into from
Sep 1, 2023

Conversation

hmacdope
Copy link
Contributor

Description

Related to #5718

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • 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

Changes

  • Re-works CMake to allow building from external dependencies if required.
  • changes libxsmm to header only mode, seeking feedback on this part, we can add some more conditional complexity here if preferred.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

1 similar comment
@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Commit ID: 48b4ce6

Build ID: 1

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Commit ID: 48b4ce6

Build ID: 2

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@hmacdope
Copy link
Contributor Author

@jermainewang @frozenbugs, this is the PR to upstream the conda-forge cmake changes, let me know what you think and I will incorporate as soon as I can.

@hmacdope
Copy link
Contributor Author

Also tagging @mikemhenry

@frozenbugs
Copy link
Collaborator

@dgl-bot

@frozenbugs frozenbugs self-requested a review August 22, 2023 03:29
@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Commit ID: 48b4ce6

Build ID: 3

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

Report path: link

Full logs path: link

@hmacdope
Copy link
Contributor Author

hmacdope commented Aug 22, 2023

libdgl.so: undefined reference to `dgemv_'
libdgl.so: undefined reference to `dgemm_'
libdgl.so: undefined reference to `sgemm_'
libdgl.so: undefined reference to `sgemv_'

Seems to be the issue in 3/75 of the builds. Are these symbols provided by complied libxsmm perhaps? Something else?

We also observed this making the recipie, resolved by making MKL a dependency for the recipe.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Commit ID: 6caf5f1

Build ID: 4

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Commit ID: 2fbcbd4

Build ID: 5

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 22, 2023

Commit ID: 2fbcbd4

Build ID: 6

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

Report path: link

Full logs path: link

@hmacdope
Copy link
Contributor Author

Possibly related to using / not using -D_BLAS=0 https://libxsmm.readthedocs.io/en/latest/#link-instructions

@frozenbugs
Copy link
Collaborator

Hi @hmacdope, are you still working on resolving this issue? Let us know if you need any help from us. Thanks!

@hmacdope
Copy link
Contributor Author

hmacdope commented Aug 31, 2023

@frozenbugs Yes please, I can't figure out exactly why some builds are missing the symbols. Any ideas?

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 31, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 31, 2023

Commit ID: eabb0ed

Build ID: 7

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@anko-intel
Copy link
Collaborator

Possibly related to using / not using -D_BLAS=0 https://libxsmm.readthedocs.io/en/latest/#link-instructions

You are right, according to https://github.com/libxsmm/libxsmm#header-only you have to define __BLAS=0
so, adding it to lines 217-221:

if(USE_LIBXSMM)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_LIBXSMM -DDGL_CPU_LLC_SIZE=40000000 -D__BLAS=0")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LIBXSMM -DDGL_CPU_LLC_SIZE=40000000 -D__BLAS=0")
  message(STATUS "Build with LIBXSMM optimization.")
endif(USE_LIBXSMM)

seems to be enough

@mikemhenry
Copy link

@hmacdope can you make that change when you get a chance? I don't have write permission on your fork

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 31, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 31, 2023

Commit ID: cfe3be4

Build ID: 8

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@hmacdope
Copy link
Contributor Author

@mikemhenry done.

@frozenbugs should be good to re-trigger CI :)

@hmacdope
Copy link
Contributor Author

Thanks so much for the fix @anko-intel, much appreciated. :)

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 1, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 1, 2023

Commit ID: d3797c0

Build ID: 10

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 1, 2023

Commit ID: d3797c0

Build ID: 9

Status: ⚪️ CI test cancelled due to overrun.

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 1, 2023

Commit ID: d3797c0

Build ID: 11

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 1, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 1, 2023

Commit ID: 2cf0766

Build ID: 12

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 1, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 1, 2023

Commit ID: 040e50e

Build ID: 13

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@frozenbugs frozenbugs merged commit 4a42027 into dmlc:master Sep 1, 2023
1 of 2 checks passed
@mikemhenry
Copy link

🎉 Awesome! I am really excited for the next dgl release

@hmacdope
Copy link
Contributor Author

hmacdope commented Sep 2, 2023

Thanks everyone!

@hmacdope hmacdope deleted the conda-forge-cmake-upstream branch September 2, 2023 07:35
peizhou001 pushed a commit to peizhou001/dgl that referenced this pull request Nov 27, 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>
This pull request was closed.
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