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.] Avoid calling IsPinned in the coo/csr constructor from every sampling process #6568

Merged
merged 4 commits into from
Nov 22, 2023

Conversation

chang-l
Copy link
Collaborator

@chang-l chang-l commented Nov 15, 2023

Description

This PR addresses #6561.
It moves the IsPinned checking block out of the coo/csr constructor, to avoid initialize cuda instances at sampling(child) processes and align with PyTorch dataloader convention.

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.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Nov 15, 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 Nov 15, 2023

Commit ID: e426f32187e1a54e77e3d5a250e8d52938488c36

Build ID: 1

Status: ❌ CI test failed in Stage [Lint Check].

Report path: link

Full logs path: link

@chang-l chang-l changed the title [CPU-sampling] Avoid calling IsPinned in the coo/csr constructor from every sampling process [Misc.] Avoid calling IsPinned in the coo/csr constructor from every sampling process Nov 15, 2023
@dgl-bot
Copy link
Collaborator

dgl-bot commented Nov 15, 2023

Commit ID: c465aef057f3927398a4cdd14ba2f450a0acd9fb

Build ID: 2

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

Copy link
Collaborator

@nv-dlasalle nv-dlasalle left a comment

Choose a reason for hiding this comment

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

I think in general it looks good, but as I noted I think the IsPinned() function should be changed.

include/dgl/aten/coo.h Outdated Show resolved Hide resolved
include/dgl/aten/csr.h Outdated Show resolved Hide resolved
@dgl-bot
Copy link
Collaborator

dgl-bot commented Nov 22, 2023

Commit ID: 6ad16003d7c4e7ce0bbb1346d4c0e922ce516d5d

Build ID: 3

Status: ⚪️ CI test cancelled due to overrun.

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Nov 22, 2023

Commit ID: c02d3f3d161243bdb5cbc544c76b1850d1899f4b

Build ID: 4

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@chang-l chang-l merged commit 1b3f14b into dmlc:master Nov 22, 2023
2 checks passed
peizhou001 pushed a commit to peizhou001/dgl that referenced this pull request Nov 27, 2023
DominikaJedynak pushed a commit to DominikaJedynak/dgl that referenced this pull request Mar 12, 2024
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.

4 participants