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.

InfoGraph example fails on GPU

See original GitHub issue

🐛 Bug

Running the InfoGraph example on GPU fails.

   return th.repeat_interleave(input, repeats, dim) # PyTorch 1.1
RuntimeError: repeats must have the same size as input along dim

All I did is run:

 python infograph/semisupervised.py --gpu 0 --target mu

To Reproduce

Steps to reproduce the behavior:

  1. Go to DGL/examples folder
  2. Run semisupervised eample

Traceback (most recent call last): File “semisupervised.py”, line 217, in <module> for sup_data, unsup_data in zip(train_loader, unsup_loader): File “/home/neo/wellth-wrk/env/lib/python3.8/site-packages/torch/utils/data/dataloader.py”, line 530, in next data = self._next_data() File “/home/neo/wellth-wrk/env/lib/python3.8/site-packages/torch/utils/data/dataloader.py”, line 570, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File “/home/neo/wellth-wrk/env/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py”, line 52, in fetch return self.collate_fn(data) File “semisupervised.py”, line 116, in collate graph_id = dgl.broadcast_nodes(batched_graph, graph_id) File “/home/neo/wellth-wrk/env/lib/python3.8/site-packages/dgl/readout.py”, line 418, in broadcast_nodes return F.repeat(graph_feat, graph.batch_num_nodes(ntype), dim=0) File “/home/neo/wellth-wrk/env/lib/python3.8/site-packages/dgl/backend/pytorch/tensor.py”, line 189, in repeat return th.repeat_interleave(input, repeats, dim) # PyTorch 1.1 RuntimeError: repeats must have the same size as input along dim

Expected behavior

Code runs and finishes training.

Environment

  • DGL Version (e.g., 1.0): 0.6.1
  • Backend Library & Version (e.g., PyTorch 0.4.1, MXNet/Gluon 1.3):1.11.0
  • OS (e.g., Linux): Ubuntu
  • How you installed DGL (conda, pip, source): PIP
  • Build command you used (if compiling from source):
  • Python version: 3.8
  • CUDA/cuDNN version (if applicable): 11.4
  • GPU models and configuration (e.g. V100): Titan RTX
  • Any other relevant information:

Additional context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
chang-lcommented, Jul 25, 2022

@chang-l Do you plan to work on this?

Sure. I will take a look.

0reactions
chang-lcommented, Jul 26, 2022

The root cause of the crash is due to this PR: https://github.com/dmlc/dgl/pull/3351/files

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot GPU performance in Illustrator - Adobe Support
Solution: Click View > GPU Preview; Save the document and then close and reopen it. Does the error persist? Send us the sample...
Read more >
The Brewing Problem with GPU Power Design | Transients
Support our in-depth testing, journalism, and analysis! Grab a Modmat, mouse mat, shirt, or more at https://store.gamersnexus.net/ (through ...
Read more >
Chapter 28. Graphics Pipeline Performance - NVIDIA Developer
Modern GPUs have flexible vertex- and fragment-processing pipelines that allow for branching inside the shader. For example, if two batches are separate because ......
Read more >
Updated GPU comparison Chart [Data Source: Tom's Hardware]
The only issues i see are the various flavor in wattage by similar named gpus. Example, my 2080S has 200w while others maybe...
Read more >
NetTrain TargetDevice GPU error - Wolfram Community
I have attached the second example as a Notebook. It works as designed without TargetDevice->"GPU", but fails if you specify that option. GW....
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