2d21747abdbf1968a9d565a4090d5d6297ade71a,encoding/functions/syncbn.py,_sum_square,forward,#Any#Any#,25

Before Change


    @staticmethod
    def forward(ctx, input):
        ctx.save_for_backward(input)
        C = input.size(1)
        with torch.cuda.device_of(input):
            xsum = input.new().resize_(C).zero_()
            xsquare = input.new().resize_(C).zero_()
        if isinstance(input, torch.cuda.FloatTensor):
            with torch.cuda.device_of(input):

After Change


    def forward(ctx, input):
        ctx.save_for_backward(input)
        if input.is_cuda:
            xsum, xsqusum = lib.gpu.sumsquare_forward(input)
        else:
            raise NotImplemented
        return xsum, xsqusum
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: zhanghang1989/PyTorch-Encoding
Commit Name: 2d21747abdbf1968a9d565a4090d5d6297ade71a
Time: 2018-06-04
Author: zhang.hang@rutgers.edu
File Name: encoding/functions/syncbn.py
Class Name: _sum_square
Method Name: forward


Project Name: elbayadm/attn2d
Commit Name: 07eed27d9fa6f1feaf2d09ba25ff26a643e70b3a
Time: 2020-02-26
Author: myleott@fb.com
File Name: fairseq/search.py
Class Name: DiverseBeamSearch
Method Name: step


Project Name: mapillary/inplace_abn
Commit Name: 4a53e30fafdd8c65c42d0cf978312e6333182db4
Time: 2018-05-21
Author: lorenzo@mapillary.com
File Name: modules/functions.py
Class Name: InPlaceABNSync
Method Name: forward