57d602b4d889632a55aaf6f9cb13cc24d11ef10c,torch_geometric/nn/data_parallel.py,DataParallel,scatter,#DataParallel#Any#Any#,58

Before Change


        device_id = (device_id[:-1] + device_id[1:]) / 2.0
        device_id = device_id.to(torch.long)  // round.
        split = device_id.bincount().cumsum(0)
        split = torch.cat([split.new_zeros(1), split], dim=0).tolist()

        return [
            Batch.from_data_list(data_list[split[i]:split[i + 1]]).to(
                torch.device("cuda:{}".format(i))) for i in range(num_devices)

After Change


        device_id = device_id.to(torch.long)  // round.
        split = device_id.bincount().cumsum(0)
        split = torch.cat([split.new_zeros(1), split], dim=0)
        split = torch.unique(split, sorted=True)
        split = split.tolist()

        return [
            Batch.from_data_list(data_list[split[i]:split[i + 1]]).to(
                torch.device("cuda:{}".format(device_ids[i])))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: 57d602b4d889632a55aaf6f9cb13cc24d11ef10c
Time: 2019-03-27
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/data_parallel.py
Class Name: DataParallel
Method Name: scatter


Project Name: bokeh/bokeh
Commit Name: 1c0433bcd6928e55ee70e582fd538c3bc854d04e
Time: 2017-01-09
Author: bryanv@continuum.io
File Name: examples/models/population_server.py
Class Name:
Method Name: update_pyramid


Project Name: bokeh/bokeh
Commit Name: 1c0433bcd6928e55ee70e582fd538c3bc854d04e
Time: 2017-01-09
Author: bryanv@continuum.io
File Name: examples/embed/widget.py
Class Name:
Method Name: update_pyramid