-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
🐛 Describe the bug
The cheatsheet says CuGraphRGCNConv supports static graphs, which the page says means it supports operations like GCNConv(...).forward(x, edge_index)
with x having shape [batch_size, num_nodes, in_channels]
. However, the following
from torch_geometric.nn import CuGraphRGCNConv
from torch_geometric import EdgeIndex
import torch
batch_size, num_nodes, embedding_dim = 16, 10, 32
rgcn = CuGraphRGCNConv(embedding_dim, embedding_dim, num_relations=12).to('cuda')
X = torch.randn(batch_size, num_nodes, embedding_dim, device='cuda', dtype=torch.float32)
edges = torch.randint(0, num_nodes, size=(2, 5), device='cuda')
edge_types = torch.randint(0, 12, size=(5, ), device='cuda')
print(rgcn(X, EdgeIndex(edges), edge_types))
This throws an error:
File "timing_comparison.py", line 99, in time_model
_ = model(*inputs)
^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/torch_geometric/nn/conv/cugraph/rgcn_conv.py", line 99, in forward
out = RGCNConvAgg(x, self.comp, graph, concat_own=self.root_weight,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/pylibcugraphops/pytorch/operators/agg_hg_basis.py", line 75, in agg_hg_basis_n2n_post
return _agg_hg_basis_n2n_post_autograd.apply(feat, weights_comb, graph, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/torch/autograd/function.py", line 575, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/pylibcugraphops/pytorch/operators/agg_hg_basis.py", line 102, in forward
agg_hg_basis_n2n_post_fwd(
ValueError: input_embedding expected 2 dimensions but got 3
Versions
PyTorch version: 2.7.1+cu126
Is debug build: False
CUDA used to build PyTorch: 12.6
ROCM used to build PyTorch: N/A
OS: Rocky Linux release 8.10 (Green Obsidian) (x86_64)
GCC version: (GCC) 8.5.0 20210514 (Red Hat 8.5.0-26)
Clang version: 19.1.7 (RESF 19.1.7-2.module+el8.10.0+1965+112b558b)
CMake version: Could not collect
Libc version: glibc-2.28
Python version: 3.12.11 (main, Jun 12 2025, 12:40:51) [Clang 20.1.4 ] (64-bit runtime)
Python platform: Linux-4.18.0-553.44.1.el8_10.x86_64-x86_64-with-glibc2.28
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A100-SXM4-40GB
MIG 3g.20gb Device 0:
Nvidia driver version: 575.57.08
cuDNN version: Could not collect
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
Thread(s) per core: 1
Core(s) per socket: 32
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 106
Model name: Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz
Stepping: 6
CPU MHz: 3400.000
CPU max MHz: 3400.0000
CPU min MHz: 800.0000
BogoMIPS: 5200.00
Virtualization: VT-x
L1d cache: 48K
L1i cache: 32K
L2 cache: 1280K
L3 cache: 49152K
NUMA node0 CPU(s): 0-31
NUMA node1 CPU(s): 32-63
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities
Versions of relevant libraries:
[pip3] Could not collect
[conda] Could not collect
"pylibcugraphops-cu12>=24.12.0",
"numpy==2.2.0",
"torch-geometric>=2.6.1"