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

Fix an issue occurring in the cuGraph-DGL example for "mixed" mode. #3927

Merged
merged 8 commits into from
Oct 30, 2023

Conversation

drivanov
Copy link
Contributor

Fixing the following bug:

Training in mixed mode.
Loading data
Traceback (most recent call last):
  File "/opt/rapids/cugraph/python/cugraph-dgl/examples/graphsage/node-classification.py", line 249, in <module>
    g.get_node_storage(key="feat", ntype="_N")
  File "/usr/local/lib/python3.10/dist-packages/dgl/frame.py", line 530, in fetch
    return super().fetch(indices, device, pin_memory=pin_memory, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/dgl/storages/pytorch_tensor.py", line 40, in fetch
    raise ValueError(
ValueError: Got indices on device cuda:0 whereas the feature tensor is on cpu. Please either (1) move the graph to GPU with to() method, or (2) pin the graph with pin_memory_() method.

which appears in mixed mode.

NOTE: the option (1) move the graph to GPU with to() is not available because in mixed mode the graph must be on the CPU.

@drivanov drivanov requested a review from a team as a code owner October 11, 2023 17:28
@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 11, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@BradReesWork BradReesWork added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Oct 11, 2023
@BradReesWork
Copy link
Member

/ok to test

@BradReesWork BradReesWork added this to the 23.12 milestone Oct 11, 2023
@BradReesWork
Copy link
Member

/ok to test

Copy link
Member

@alexbarghi-nv alexbarghi-nv left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@VibhuJawa VibhuJawa left a comment

Choose a reason for hiding this comment

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

LGTM

@BradReesWork BradReesWork removed the request for review from rlratzel October 24, 2023 17:13
@BradReesWork
Copy link
Member

/ok to test

@BradReesWork
Copy link
Member

/ok to test

@BradReesWork
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit e0c3a93 into rapidsai:branch-23.12 Oct 30, 2023
70 checks passed
@drivanov drivanov deleted the cugraph_dgl branch October 30, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants