4bcf6fdd93291a1bfba3c7038fe30a7338870968,onmt/models/SRU.py,,,#,72
Before Change
from pynvrtc.compiler import Program
// This sets up device to use.
device = torch.device("cuda")
tmp_ = torch.rand(1, 1).to(device)
sru_prog = Program(SRU_CODE.encode("utf-8"),
"sru_prog.cu".encode("utf-8"))
sru_ptx = sru_prog.compile()
sru_mod = function.Module()
sru_mod.load(bytes(sru_ptx.encode()))
SRU_FWD_FUNC = sru_mod.get_function("sru_fwd")
SRU_BWD_FUNC = sru_mod.get_function("sru_bwd")
SRU_BiFWD_FUNC = sru_mod.get_function("sru_bi_fwd")
SRU_BiBWD_FUNC = sru_mod.get_function("sru_bi_bwd")
stream = namedtuple("Stream", ["ptr"])
SRU_STREAM = stream(ptr=torch.cuda.current_stream().cuda_stream)
class SRU_Compute(Function):
After Change
}
SRU_FWD_FUNC, SRU_BWD_FUNC = None, None
SRU_BiFWD_FUNC, SRU_BiBWD_FUNC = None, None
SRU_STREAM = None
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: OpenNMT/OpenNMT-py
Commit Name: 4bcf6fdd93291a1bfba3c7038fe30a7338870968
Time: 2018-05-22
Author: pltrdy@gmail.com
File Name: onmt/models/SRU.py
Class Name:
Method Name:
Project Name: pytorch/tutorials
Commit Name: 3128e13109c8766eafb413f2428bba976701e929
Time: 2020-12-02
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: beginner_source/transformer_tutorial.py
Class Name:
Method Name:
Project Name: pytorch/tutorials
Commit Name: 133e5b6a84e126cbcfbc5c11eeb6286185dbec2f
Time: 2020-12-02
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: beginner_source/torchtext_translation_tutorial.py
Class Name:
Method Name:
Project Name: OpenNMT/OpenNMT-py
Commit Name: 4bcf6fdd93291a1bfba3c7038fe30a7338870968
Time: 2018-05-22
Author: pltrdy@gmail.com
File Name: onmt/models/SRU.py
Class Name:
Method Name:
Project Name: victoresque/pytorch-template
Commit Name: 1517f6e321aee8e78aac0133e9d05cfcef0b42b0
Time: 2018-10-16
Author: sunq0313@gmail.com
File Name: base/base_trainer.py
Class Name: BaseTrainer
Method Name: __init__