def METHOD_NAME(self):
    # inplace conversion should not happen because sigmoid may
    # perform type conversion
    def test1():
        y = torch.ones([2, 2])
        z = torch.sigmoid(y)
        return z
    fn = torch.jit.script(test1)
    self.run_pass('functional_to_inplace_activation', fn.graph)
    FileCheck().check_not("aten::sigmoid_").run(fn.graph)
    # inplace conversion should not happen because y is alias
    # the input x
    def test2(x):
        y = x[0]
        z = torch.relu(y)
        return z
    fn = torch.jit.script(test2)
    self.run_pass('functional_to_inplace_activation', fn.graph)
    FileCheck().check_not("aten::relu_").run(fn.graph)
    # inplace conversion should not happen because self.x is
    # at the global scope
    class Test3(nn.Module):
        def __init__(self, x):
            super().__init__()
            self.x = x
        def forward(self):
            y = torch.relu(self.x)
            return y
    fn = torch.jit.script(Test3(torch.rand([2, 2])).eval())
    self.run_pass('functional_to_inplace_activation', fn.graph)
    FileCheck().check_not("aten::relu_").run(fn.graph)