Segmentation fault when using GPUCachedFeature's sample code
- Dominant language
- Python
- Stars
- 14.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
(Link to the sample code)
```
https://www.dgl.ai/dgl_docs/_modules/dgl/graphbolt/impl/gpu_cached_feature.html#GPUCachedFeature
```
I made sure my installed dgl and pytorch versions are all 2.4.0+cu124.
The program is run in a container.
```
import torch
from dgl import graphbolt as gb
torch_feat = torch.arange(10).reshape(2, -1).to("cuda")
cache_size = 5
fallback_feature = gb.TorchBasedFeature(torch_feat)
feature = gb.gpu_cached_feature(fallback_feature, cache_size)
# Segmentation fault occurs here.
feature.read()
feature.read(torch.tensor([0]).to("cuda"))
feature.update(
torch.tensor([[1 for _ in range(5)]]).to("cuda"), torch.tensor([1]).to("cuda")
)
feature.read(torch.tensor([0, 1]).to("cuda"))
feature.size()
```
The program always prompts segmentation fault when calling "graphbolt.feature_store.wrap_with_cached_feature(...)".
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.