pyg-nightly 2.7.0.dev20250223__py3-none-any.whl → 2.7.0.dev20250224__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyg_nightly-2.7.0.dev20250223.dist-info → pyg_nightly-2.7.0.dev20250224.dist-info}/METADATA +1 -1
- {pyg_nightly-2.7.0.dev20250223.dist-info → pyg_nightly-2.7.0.dev20250224.dist-info}/RECORD +6 -6
- torch_geometric/__init__.py +1 -1
- torch_geometric/hash_tensor.py +83 -3
- {pyg_nightly-2.7.0.dev20250223.dist-info → pyg_nightly-2.7.0.dev20250224.dist-info}/WHEEL +0 -0
- {pyg_nightly-2.7.0.dev20250223.dist-info → pyg_nightly-2.7.0.dev20250224.dist-info}/licenses/LICENSE +0 -0
{pyg_nightly-2.7.0.dev20250223.dist-info → pyg_nightly-2.7.0.dev20250224.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pyg-nightly
|
3
|
-
Version: 2.7.0.
|
3
|
+
Version: 2.7.0.dev20250224
|
4
4
|
Summary: Graph Neural Network Library for PyTorch
|
5
5
|
Keywords: deep-learning,pytorch,geometric-deep-learning,graph-neural-networks,graph-convolutional-networks
|
6
6
|
Author-email: Matthias Fey <matthias@pyg.org>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
torch_geometric/__init__.py,sha256=
|
1
|
+
torch_geometric/__init__.py,sha256=nc0R-kBpZZJ_9mHk-xQJhyukW9OMLPN9EmnGrJIwu1c,1978
|
2
2
|
torch_geometric/_compile.py,sha256=f-WQeH4VLi5Hn9lrgztFUCSrN_FImjhQa6BxFzcYC38,1338
|
3
3
|
torch_geometric/_onnx.py,sha256=V9ffrIKSqhDw6xUZ12lkuSfNs48cQp2EeJ6Z19GfnVw,349
|
4
4
|
torch_geometric/backend.py,sha256=lVaf7aLoVaB3M-UcByUJ1G4T4FOK6LXAg0CF4W3E8jo,1575
|
@@ -9,7 +9,7 @@ torch_geometric/deprecation.py,sha256=dWRymDIUkUVI2MeEmBG5WF4R6jObZeseSBV9G6FNfj
|
|
9
9
|
torch_geometric/device.py,sha256=tU5-_lBNVbVHl_kUmWPwiG5mQ1pyapwMF4JkmtNN3MM,1224
|
10
10
|
torch_geometric/edge_index.py,sha256=BsLh5tOZRjjSYDkjqOFAdBuvMaDg7EWaaLELYsUL0Z8,70048
|
11
11
|
torch_geometric/experimental.py,sha256=JbtNNEXjFGI8hZ9raM6-qrZURP6Z5nlDK8QicZUIbz0,4756
|
12
|
-
torch_geometric/hash_tensor.py,sha256=
|
12
|
+
torch_geometric/hash_tensor.py,sha256=koofBrEEo5oHCCt0gH6gCkiywyxSFSGdk-keg7MXGf4,19490
|
13
13
|
torch_geometric/home.py,sha256=EV54B4Dmiv61GDbkCwtCfWGWJ4eFGwZ8s3KOgGjwYgY,790
|
14
14
|
torch_geometric/index.py,sha256=9ChzWFCwj2slNcVBOgfV-wQn-KscJe_y7502w-Vf76w,24045
|
15
15
|
torch_geometric/inspector.py,sha256=nKi5o4Mn6xsG0Ex1GudTEQt_EqnF9mcMqGtp7Shh9sQ,19336
|
@@ -633,7 +633,7 @@ torch_geometric/utils/undirected.py,sha256=H_nfpI0_WluOG6VfjPyldvcjL4w5USAKWu2x5
|
|
633
633
|
torch_geometric/visualization/__init__.py,sha256=PyR_4K5SafsJrBr6qWrkjKr6GBL1b7FtZybyXCDEVwY,154
|
634
634
|
torch_geometric/visualization/graph.py,sha256=ZuLPL92yGRi7lxlqsUPwL_EVVXF7P2kMcveTtW79vpA,4784
|
635
635
|
torch_geometric/visualization/influence.py,sha256=CWMvuNA_Nf1sfbJmQgn58yS4OFpeKXeZPe7kEuvkUBw,477
|
636
|
-
pyg_nightly-2.7.0.
|
637
|
-
pyg_nightly-2.7.0.
|
638
|
-
pyg_nightly-2.7.0.
|
639
|
-
pyg_nightly-2.7.0.
|
636
|
+
pyg_nightly-2.7.0.dev20250224.dist-info/licenses/LICENSE,sha256=ic-27cMJc1kWoMEYncz3Ya3Ur2Bi3bNLWib2DT763-o,1067
|
637
|
+
pyg_nightly-2.7.0.dev20250224.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
|
638
|
+
pyg_nightly-2.7.0.dev20250224.dist-info/METADATA,sha256=OzM9N2hJ-COuEqz7HmEj8_wZkdLZDavaZfWDS5j08SA,63021
|
639
|
+
pyg_nightly-2.7.0.dev20250224.dist-info/RECORD,,
|
torch_geometric/__init__.py
CHANGED
@@ -31,7 +31,7 @@ from .lazy_loader import LazyLoader
|
|
31
31
|
contrib = LazyLoader('contrib', globals(), 'torch_geometric.contrib')
|
32
32
|
graphgym = LazyLoader('graphgym', globals(), 'torch_geometric.graphgym')
|
33
33
|
|
34
|
-
__version__ = '2.7.0.
|
34
|
+
__version__ = '2.7.0.dev20250224'
|
35
35
|
|
36
36
|
__all__ = [
|
37
37
|
'Index',
|
torch_geometric/hash_tensor.py
CHANGED
@@ -300,6 +300,7 @@ class HashTensor(Tensor):
|
|
300
300
|
return func(*args, **(kwargs or {}))
|
301
301
|
|
302
302
|
def tolist(self) -> List[Any]:
|
303
|
+
"""""" # noqa: D419
|
303
304
|
return self.as_tensor().tolist()
|
304
305
|
|
305
306
|
def index_select( # type: ignore
|
@@ -307,6 +308,7 @@ class HashTensor(Tensor):
|
|
307
308
|
dim: int,
|
308
309
|
index: Any,
|
309
310
|
) -> Union['HashTensor', Tensor]:
|
311
|
+
"""""" # noqa: D419
|
310
312
|
return torch.index_select(self, dim, index)
|
311
313
|
|
312
314
|
def select( # type: ignore
|
@@ -314,14 +316,72 @@ class HashTensor(Tensor):
|
|
314
316
|
dim: int,
|
315
317
|
index: Any,
|
316
318
|
) -> Union['HashTensor', Tensor]:
|
319
|
+
"""""" # noqa: D419
|
317
320
|
return torch.select(self, dim, index)
|
318
321
|
|
322
|
+
def share_memory_(self) -> 'HashTensor':
|
323
|
+
"""""" # noqa: D419
|
324
|
+
if isinstance(self._map, Tensor):
|
325
|
+
self._map.share_memory_()
|
326
|
+
if self._value is not None:
|
327
|
+
self._value.share_memory_()
|
328
|
+
self._min_key.share_memory_()
|
329
|
+
self._max_key.share_memory_()
|
330
|
+
return self
|
331
|
+
|
332
|
+
def is_shared(self) -> bool:
|
333
|
+
"""""" # noqa: D419
|
334
|
+
return self._min_key.is_shared()
|
335
|
+
|
336
|
+
def detach_(self) -> 'HashTensor': # type: ignore
|
337
|
+
"""""" # noqa: D419
|
338
|
+
if self._value is not None:
|
339
|
+
self._value.detach_()
|
340
|
+
return super().detach_() # type: ignore
|
341
|
+
|
319
342
|
|
320
343
|
@implements(aten.alias.default)
|
321
344
|
def _alias(tensor: HashTensor) -> HashTensor:
|
322
345
|
return tensor._shallow_copy()
|
323
346
|
|
324
347
|
|
348
|
+
@implements(aten.clone.default)
|
349
|
+
def _clone(
|
350
|
+
tensor: HashTensor,
|
351
|
+
*,
|
352
|
+
memory_format: torch.memory_format = torch.preserve_format,
|
353
|
+
) -> HashTensor:
|
354
|
+
|
355
|
+
value = tensor._value
|
356
|
+
if value is not None:
|
357
|
+
value = aten.clone.default(value, memory_format=memory_format)
|
358
|
+
|
359
|
+
return tensor._from_data(
|
360
|
+
tensor._map, # NOTE No reason to do clone since it is read-only.
|
361
|
+
value,
|
362
|
+
tensor._min_key, # NOTE No reason to do clone since it is read-only.
|
363
|
+
tensor._max_key, # NOTE No reason to do clone since it is read-only.
|
364
|
+
num_keys=tensor.size(0),
|
365
|
+
dtype=tensor.dtype,
|
366
|
+
)
|
367
|
+
|
368
|
+
|
369
|
+
@implements(aten.detach.default)
|
370
|
+
def _detach(tensor: HashTensor) -> HashTensor:
|
371
|
+
value = tensor._value
|
372
|
+
if value is not None:
|
373
|
+
value = aten.detach.default(value)
|
374
|
+
|
375
|
+
return tensor._from_data(
|
376
|
+
tensor._map,
|
377
|
+
value,
|
378
|
+
tensor._min_key,
|
379
|
+
tensor._max_key,
|
380
|
+
num_keys=tensor.size(0),
|
381
|
+
dtype=tensor.dtype,
|
382
|
+
)
|
383
|
+
|
384
|
+
|
325
385
|
@implements(aten._to_copy.default)
|
326
386
|
def _to_copy(
|
327
387
|
tensor: HashTensor,
|
@@ -354,8 +414,8 @@ def _to_copy(
|
|
354
414
|
_map = aten._to_copy.default(_map, device=device)
|
355
415
|
# Only convert `_map` in case `CUDAHashMap` exists - otherwise we use
|
356
416
|
# CPU-based mapping anyway and there is no need for a copy.
|
357
|
-
elif (torch_geometric.typing.WITH_CUDA_HASH_MAP and
|
358
|
-
and tensor.
|
417
|
+
elif (torch_geometric.typing.WITH_CUDA_HASH_MAP and tensor.is_cuda
|
418
|
+
and tensor.device != min_key.device):
|
359
419
|
key = _map.keys()
|
360
420
|
key = aten._to_copy.default(key, device=device)
|
361
421
|
_map = get_hash_map(key)
|
@@ -370,6 +430,26 @@ def _to_copy(
|
|
370
430
|
)
|
371
431
|
|
372
432
|
|
433
|
+
@implements(aten._pin_memory.default)
|
434
|
+
def _pin_memory(tensor: HashTensor) -> HashTensor:
|
435
|
+
_map = tensor._map
|
436
|
+
if isinstance(_map, Tensor):
|
437
|
+
_map = aten._pin_memory.default(_map)
|
438
|
+
|
439
|
+
value = tensor._value
|
440
|
+
if value is not None:
|
441
|
+
value = aten._pin_memory.default(value)
|
442
|
+
|
443
|
+
return tensor._from_data(
|
444
|
+
_map,
|
445
|
+
value,
|
446
|
+
aten._pin_memory.default(tensor._min_key),
|
447
|
+
aten._pin_memory.default(tensor._max_key),
|
448
|
+
num_keys=tensor.size(0),
|
449
|
+
dtype=tensor.dtype,
|
450
|
+
)
|
451
|
+
|
452
|
+
|
373
453
|
@implements(aten.unsqueeze.default)
|
374
454
|
def _unsqueeze(tensor: HashTensor, dim: int) -> HashTensor:
|
375
455
|
if dim == 0 or dim == -(tensor.dim() + 1):
|
@@ -553,7 +633,7 @@ def _select(
|
|
553
633
|
key = torch.tensor(
|
554
634
|
[index],
|
555
635
|
dtype=tensor._min_key.dtype,
|
556
|
-
device=tensor.
|
636
|
+
device=tensor.device,
|
557
637
|
)
|
558
638
|
return tensor._get(key).squeeze(0)
|
559
639
|
|
File without changes
|
{pyg_nightly-2.7.0.dev20250223.dist-info → pyg_nightly-2.7.0.dev20250224.dist-info}/licenses/LICENSE
RENAMED
File without changes
|