Skip to content

Commit 4a0fdc5

Browse files
authored
Merge branch 'master' into master
2 parents 12387d0 + 97c50a0 commit 4a0fdc5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
66
## [2.0.5] - 2022-MM-DD
77
### Added
88
- Added a `normalize` parameter to `dense_diff_pool` ([#4847](https://github.com/pyg-team/pytorch_geometric/pull/4847))
9+
- Added `size=None` explanation to jittable `MessagePassing` modules in the documentation ([#4850](https://github.com/pyg-team/pytorch_geometric/pull/4850))
910
- Added documentation to the `DataLoaderIterator` class ([#4838](https://github.com/pyg-team/pytorch_geometric/pull/4838))
1011
- Added `GraphStore` support to `Data` and `HeteroData` ([#4816](https://github.com/pyg-team/pytorch_geometric/pull/4816))
1112
- Added `FeatureStore` support to `Data` and `HeteroData` ([#4807](https://github.com/pyg-team/pytorch_geometric/pull/4807))

docs/source/notes/jit.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ However, if you want your own GNN module to be jittable, you need to account for
9999
def forward(self, x: Tensor, edge_index: Tensor,
100100
edge_weight: Optional[Tensor]) -> Tensor:
101101
102-
return self.propagate(edge_index, x=x, edge_weight=edge_weight)
102+
return self.propagate(edge_index, x=x, edge_weight=edge_weight,
103+
size=None)
103104
104105
2. Declaring the type of propagation arguments as a comment anywhere inside your module:
105106

@@ -115,4 +116,10 @@ However, if you want your own GNN module to be jittable, you need to account for
115116
edge_weight: Optional[Tensor]) -> Tensor:
116117
117118
# propagate_type: (x: Tensor, edge_weight: Optional[Tensor])
118-
return self.propagate(edge_index, x=x, edge_weight=edge_weight)
119+
return self.propagate(edge_index, x=x, edge_weight=edge_weight,
120+
size=None)
121+
122+
.. warning::
123+
124+
Importantly, due to TorchScript limitations, one also has to pass in the :obj:`size` attribute to :meth:`~torch_geometric.nn.conv.message_passing.MessagePassing.propagate`.
125+
In most cases, this can be simply set to :obj:`None` in which case it will be automatically inferred.

0 commit comments

Comments
 (0)