In dgl/node_classification.py at master · dmlc/dgl · GitHub
I have some problem about the code, if we use
train_idx = dataset.train_idx.to(device)
val_idx = dataset.val_idx.to(device)
before trainig (device is GPU) . If that means the GPU can accommodate all of the dataset. so I think it is unnecessary for us to use minibatch later
for it, (input_nodes, output_nodes, blocks) in enumerate(train_dataloader):
becuase our GPU is large enough
I have this problem because I read the passage in
https://docs.dgl.ai/guide_cn/minibatch-node.html#guide-cn-minibatch-node-classification-sampler
and find there is a line of code
blocks = [b.to(torch.device(‘cuda’)) for b in blocks]
in the loop body of minibatch
so I wonder which one is correct
because I want to find an example that cater to the process of
- take a mini-batch of training nodes and sample a subgraph from these nodes
- gather node / edge features used by the subgraph from CPU memory and
copy into GPU - GNN model forward & backward & weight updates
also If anyone gan give me an example of a totally large dataset that A100 can not accommodate, thanks a lot