question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Running GNNs on Specific GPU

See original GitHub issue

Hi DeepRobust Team,

I’ve encountered a problem when testing GNNs on devices other than cuda:0. To reproduce, simply modifying line 18 in test_gcn.py to

device = torch.device("cuda:2" if torch.cuda.is_available() else "cpu")

Then the error message is prompted as follows:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices

I found it’s caused by normalize_adj_tensor and degree_normalize_adj_tensor, where the device is set to be cuda:0 by default wherever adj is. Though many people run experiments on cuda:0 by default, it could be even better to support running GNNs in DeepRobust on other devices specified via the device variable.

Could you add this feature in the next update? Thank you. 😀

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ChandlerBangcommented, Aug 15, 2021

Sorry for the late reply. I have just fixed the issue. Thank you @LFhase and @EdisonLeeeee !

0reactions
LFhasecommented, Aug 5, 2021

Thank you @ChandlerBang and @EdisonLeeeee. I think @EdisonLeeeee 's solution would do the job if adj.device can be always accessed in each call of the two functions. Would you like to consider updating the two lines if it’s feasible? 😃

BTW, I don’t have further questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide for GPU Selection for GNSS Simulation - Orolia
This document is designed to assist you with GPU Selection for GNSS Simulation – especially as it pertains to your specific application.
Read more >
The transformational role of GPU computing and deep ...
Herein, we discuss the effects of GPU-supported parallelization and DL model development and application on the timescale and accuracy of ...
Read more >
Scaling graph-neural-network training with CPU-GPU clusters
In a paper we're presenting at this year's KDD, my colleagues and I describe a new approach to distributed training of GNNs that...
Read more >
TC-GNN: Accelerating Sparse Graph Neural Network ... - arXiv
Abstract. Recently, graph neural networks (GNNs), as the backbone of graph-based machine learning, demonstrate great success.
Read more >
Optimizing Fraud Detection in Financial Services with Graph ...
In recent years, graph neural networks (GNNs) have gained traction for ... We have added GPU support for unified virtual addressing (UVA), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found