Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

### Fixed

- Fixed `test_gat_conv_equality` to explicitly handle `edge_attr` argument in CuGraphGATConv.forward ([#10564](https://github.com/pyg-team/pytorch_geometric/pull/10564))
- Fixed `ogbn_train_cugraph` example for distributed cuGraph ([#10439](https://github.com/pyg-team/pytorch_geometric/pull/10439))
- Added `safe_onnx_export` function with workarounds for `onnx_ir.serde.SerdeError` issues in ONNX export ([#10422](https://github.com/pyg-team/pytorch_geometric/pull/10422))
- Fixed importing PyTorch Lightning in `torch_geometric.graphgym` and `torch_geometric.data.lightning` when using `lightning` instead of `pytorch-lightning` ([#10404](https://github.com/pyg-team/pytorch_geometric/pull/10404), [#10417](https://github.com/pyg-team/pytorch_geometric/pull/10417)))
Expand Down
22 changes: 9 additions & 13 deletions test/nn/conv/cugraph/test_cugraph_gat_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,23 @@ def test_gat_conv_equality(bias, bipartite, concat, edge_attr, heads,
conv2.lin.weight.data[:, :] = conv1.lin.weight.data
conv2.att.data[:heads * out_channels] = conv1.att_src.data.flatten()
conv2.att.data[heads * out_channels:] = conv1.att_dst.data.flatten()

if edge_attr and not bipartite:
e_attrs = torch.randn(size=(edge_index.size(1), 10))
e_attrs = torch.randn(edge_index.size(1), 0, device=x.device)
out1 = conv1(x, edge_index, edge_attr=e_attrs)

out2 = conv2(
x,
EdgeIndex(edge_index, sparse_size=size),
max_num_neighbors=max_num_neighbors,
edge_attr=e_attrs,
)
else:
e_attrs = None
if bipartite:
out1 = conv1((x, x[:size[1]]), edge_index)
else:
out1 = conv1(x, edge_index)

out2 = conv2(
x,
EdgeIndex(edge_index, sparse_size=size),
max_num_neighbors=max_num_neighbors,
)
out2 = conv2(
x,
EdgeIndex(edge_index, sparse_size=size),
max_num_neighbors=max_num_neighbors,
edge_attr=e_attrs,
)
assert torch.allclose(out1, out2, atol=1e-3)

grad_output = torch.rand_like(out1)
Expand Down
Loading