0c156573a383620af5194c485bdfe642ea5b33e5,benchmarks/benchmarks/api/bench_batch.py,,track_time,#Any#,9
Before Change
// prepare graph
graphs = []
for i in range(batch_size):
u = torch.randint(20, (40,))
v = torch.randint(20, (40,))
graphs.append(dgl.graph((u, v)).to(device))
// dry run
for i in range(10):
g = dgl.batch(graphs)
// timing
After Change
@utils.parametrize("batch_size", [4, 32, 256, 1024])
def track_time(batch_size):
device = utils.get_bench_device()
ds = dgl.data.QM7bDataset()
// prepare graph
graphs = []
for graph in ds[0:batch_size][0]:
g = graph.to(device)
graphs.append(g)
// dry run
for i in range(10):
g = dgl.batch(graphs)
// timing
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: dmlc/dgl
Commit Name: 0c156573a383620af5194c485bdfe642ea5b33e5
Time: 2021-01-20
Author: VoVAllen@users.noreply.github.com
File Name: benchmarks/benchmarks/api/bench_batch.py
Class Name:
Method Name: track_time
Project Name: markovmodel/PyEMMA
Commit Name: 9023806a1dd7097c71aadf77d95020c6fe2c618c
Time: 2017-08-14
Author: m.scherer@fu-berlin.de
File Name: pyemma/coordinates/clustering/tests/test_kmeans.py
Class Name: TestKmeans
Method Name: test_3gaussian_1d_singletraj
Project Name: osmr/imgclsmob
Commit Name: 4ad1ebea7992d840e028ff513dc81e0073755d6e
Time: 2019-02-24
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/others/oth_fractalnet_cifar10_2.py
Class Name: FractalNet
Method Name: forward