import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import math
import torch.utils.data
from torch import nn
from torch.nn.modules.utils import _pair
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_per_fused__softmax_0(in_ptr0, out_ptr2, xnumel, rnumel, XBLOCK:
    tl.constexpr):
    xnumel = 64
    rnumel = 9
    RBLOCK: tl.constexpr = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    rmask = rindex < rnumel
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (16 * r1 + 144 * (x0 // 16) + x0 % 16), rmask &
        xmask, other=0.0)
    tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp3 = tl.where(rmask & xmask, tmp1, float('-inf'))
    tmp4 = triton_helpers.max2(tmp3, 1)[:, None]
    tmp5 = tmp0 - tmp4
    tmp6 = tl_math.exp(tmp5)
    tmp7 = tl.broadcast_to(tmp6, [XBLOCK, RBLOCK])
    tmp9 = tl.where(rmask & xmask, tmp7, 0)
    tmp10 = tl.sum(tmp9, 1)[:, None]
    tmp11 = tmp6 / tmp10
    tl.store(out_ptr2 + (r1 + 9 * x0), tmp11, rmask & xmask)


@triton.jit
def triton_poi_fused_clone_1(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 36
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex % 9
    y0 = yindex % 16
    x3 = xindex // 9
    y1 = yindex // 16
    x5 = xindex
    y4 = yindex
    tmp0 = -1 + x2 // 3 + y0 // 4
    tmp1 = tl.full([1, 1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1, 1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = -1 + x2 % 3 + y0 % 4
    tmp6 = tmp5 >= tmp1
    tmp7 = tmp5 < tmp3
    tmp8 = tmp2 & tmp4
    tmp9 = tmp8 & tmp6
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (-5 + y0 + 4 * (x2 // 3) + 16 * x3 + 64 * y1 +
        x2 % 3), tmp10 & xmask & ymask, eviction_policy='evict_last', other=0.0
        )
    tl.store(out_ptr0 + (x5 + 36 * y4), tmp11, xmask & ymask)


@triton.jit
def triton_poi_fused_clone_2(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 36
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex % 9
    y0 = yindex % 16
    x3 = xindex // 9
    y1 = yindex // 16
    x5 = xindex
    y4 = yindex
    tmp0 = -4 + 4 * (x2 // 3) + y0 // 4
    tmp1 = tl.full([1, 1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1, 1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = -4 + 4 * (x2 % 3) + y0 % 4
    tmp6 = tmp5 >= tmp1
    tmp7 = tmp5 < tmp3
    tmp8 = tmp2 & tmp4
    tmp9 = tmp8 & tmp6
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (-20 + y0 + 4 * (x2 % 3) + 16 * x3 + 16 * (x2 //
        3) + 64 * y1), tmp10 & xmask & ymask, eviction_policy='evict_last',
        other=0.0)
    tl.store(out_ptr0 + (x5 + 36 * y4), tmp11, xmask & ymask)


@triton.jit
def triton_poi_fused_clone_3(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 36
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex % 9
    y0 = yindex % 16
    x3 = xindex // 9
    y1 = yindex // 16
    x5 = xindex
    y4 = yindex
    tmp0 = -8 + 8 * (x2 // 3) + y0 // 4
    tmp1 = tl.full([1, 1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1, 1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = -8 + 8 * (x2 % 3) + y0 % 4
    tmp6 = tmp5 >= tmp1
    tmp7 = tmp5 < tmp3
    tmp8 = tmp2 & tmp4
    tmp9 = tmp8 & tmp6
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (-40 + y0 + 8 * (x2 % 3) + 16 * x3 + 32 * (x2 //
        3) + 64 * y1), tmp10 & xmask & ymask, eviction_policy='evict_last',
        other=0.0)
    tl.store(out_ptr0 + (x5 + 36 * y4), tmp11, xmask & ymask)


@triton.jit
def triton_poi_fused_clone_4(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 36
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex % 9
    y0 = yindex % 16
    x3 = xindex // 9
    y1 = yindex // 16
    x5 = xindex
    y4 = yindex
    tmp0 = -12 + 12 * (x2 // 3) + y0 // 4
    tmp1 = tl.full([1, 1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1, 1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = -12 + 12 * (x2 % 3) + y0 % 4
    tmp6 = tmp5 >= tmp1
    tmp7 = tmp5 < tmp3
    tmp8 = tmp2 & tmp4
    tmp9 = tmp8 & tmp6
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (-60 + y0 + 12 * (x2 % 3) + 16 * x3 + 48 * (
        x2 // 3) + 64 * y1), tmp10 & xmask & ymask, eviction_policy=
        'evict_last', other=0.0)
    tl.store(out_ptr0 + (x5 + 36 * y4), tmp11, xmask & ymask)


@triton.jit
def triton_poi_fused_add_mul_5(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, in_ptr8, out_ptr0, ynumel, xnumel, YBLOCK:
    tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 16
    y1 = yindex // 16
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 16 * x2 + 64 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, YBLOCK])
    tmp3 = tl.load(in_ptr2 + (x2 + 4 * y3), xmask & ymask, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr3 + 0)
    tmp7 = tl.broadcast_to(tmp6, [XBLOCK, YBLOCK])
    tmp8 = tl.load(in_ptr4 + (x2 + 4 * y3), xmask & ymask, eviction_policy=
        'evict_last')
    tmp11 = tl.load(in_ptr5 + 0)
    tmp12 = tl.broadcast_to(tmp11, [XBLOCK, YBLOCK])
    tmp13 = tl.load(in_ptr6 + (x2 + 4 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tmp16 = tl.load(in_ptr7 + 0)
    tmp17 = tl.broadcast_to(tmp16, [XBLOCK, YBLOCK])
    tmp18 = tl.load(in_ptr8 + (x2 + 4 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tmp4 = tmp2 * tmp3
    tmp5 = tmp0 + tmp4
    tmp9 = tmp7 * tmp8
    tmp10 = tmp5 + tmp9
    tmp14 = tmp12 * tmp13
    tmp15 = tmp10 + tmp14
    tmp19 = tmp17 * tmp18
    tmp20 = tmp15 + tmp19
    tl.store(out_ptr0 + (y0 + 16 * x2 + 64 * y1), tmp20, xmask & ymask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9) = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(primals_2, (9, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_3, (9, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_4, (9, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_5, (9, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_6, (1,), (1,))
    assert_size_stride(primals_7, (1,), (1,))
    assert_size_stride(primals_8, (1,), (1,))
    assert_size_stride(primals_9, (1,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = extern_kernels.convolution(primals_1, primals_2, stride=(1, 
            1), padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 9, 4, 4), (144, 16, 4, 1))
        buf1 = extern_kernels.convolution(primals_1, primals_3, stride=(1, 
            1), padding=(4, 4), dilation=(4, 4), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 9, 4, 4), (144, 16, 4, 1))
        buf2 = extern_kernels.convolution(primals_1, primals_4, stride=(1, 
            1), padding=(8, 8), dilation=(8, 8), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf2, (4, 9, 4, 4), (144, 16, 4, 1))
        buf3 = extern_kernels.convolution(primals_1, primals_5, stride=(1, 
            1), padding=(12, 12), dilation=(12, 12), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (4, 9, 4, 4), (144, 16, 4, 1))
        buf6 = empty_strided_cuda((64, 9), (9, 1), torch.float32)
        get_raw_stream(0)
        triton_per_fused__softmax_0[grid(64)](buf0, buf6, 64, 9, XBLOCK=1,
            num_warps=2, num_stages=1)
        buf9 = reinterpret_tensor(buf0, (64, 9), (9, 1), 0)
        del buf0
        triton_per_fused__softmax_0[grid(64)](buf1, buf9, 64, 9, XBLOCK=1,
            num_warps=2, num_stages=1)
        buf12 = reinterpret_tensor(buf1, (64, 9), (9, 1), 0)
        del buf1
        triton_per_fused__softmax_0[grid(64)](buf2, buf12, 64, 9, XBLOCK=1,
            num_warps=2, num_stages=1)
        buf15 = reinterpret_tensor(buf2, (64, 9), (9, 1), 0)
        del buf2
        triton_per_fused__softmax_0[grid(64)](buf3, buf15, 64, 9, XBLOCK=1,
            num_warps=2, num_stages=1)
        del buf3
        buf16 = empty_strided_cuda((4, 1, 16, 4, 9), (576, 1, 36, 9, 1),
            torch.float32)
        triton_poi_fused_clone_1[grid(64, 36)](primals_1, buf16, 64, 36,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        buf17 = empty_strided_cuda((64, 4, 1), (4, 1, 1), torch.float32)
        extern_kernels.bmm(reinterpret_tensor(buf16, (64, 4, 9), (36, 9, 1),
            0), reinterpret_tensor(buf6, (64, 9, 1), (9, 1, 1), 0), out=buf17)
        buf18 = empty_strided_cuda((4, 1, 16, 4, 9), (576, 1, 36, 9, 1),
            torch.float32)
        triton_poi_fused_clone_2[grid(64, 36)](primals_1, buf18, 64, 36,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        buf19 = empty_strided_cuda((64, 4, 1), (4, 1, 1), torch.float32)
        extern_kernels.bmm(reinterpret_tensor(buf18, (64, 4, 9), (36, 9, 1),
            0), reinterpret_tensor(buf9, (64, 9, 1), (9, 1, 1), 0), out=buf19)
        buf20 = empty_strided_cuda((4, 1, 16, 4, 9), (576, 1, 36, 9, 1),
            torch.float32)
        triton_poi_fused_clone_3[grid(64, 36)](primals_1, buf20, 64, 36,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        buf21 = empty_strided_cuda((64, 4, 1), (4, 1, 1), torch.float32)
        extern_kernels.bmm(reinterpret_tensor(buf20, (64, 4, 9), (36, 9, 1),
            0), reinterpret_tensor(buf12, (64, 9, 1), (9, 1, 1), 0), out=buf21)
        buf22 = empty_strided_cuda((4, 1, 16, 4, 9), (576, 1, 36, 9, 1),
            torch.float32)
        triton_poi_fused_clone_4[grid(64, 36)](primals_1, buf22, 64, 36,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        buf23 = empty_strided_cuda((64, 4, 1), (4, 1, 1), torch.float32)
        extern_kernels.bmm(reinterpret_tensor(buf22, (64, 4, 9), (36, 9, 1),
            0), reinterpret_tensor(buf15, (64, 9, 1), (9, 1, 1), 0), out=buf23)
        buf24 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_5[grid(64, 4)](primals_1, primals_6, buf17,
            primals_7, buf19, primals_8, buf21, primals_9, buf23, buf24, 64,
            4, XBLOCK=4, YBLOCK=64, num_warps=4, num_stages=1)
    return (buf24, primals_1, primals_2, primals_3, primals_4, primals_5,
        primals_6, primals_7, primals_8, primals_9, buf6, buf9, buf12,
        buf15, buf17, buf19, buf21, buf23, reinterpret_tensor(buf22, (64, 9,
        4), (36, 1, 9), 0), reinterpret_tensor(buf20, (64, 9, 4), (36, 1, 9
        ), 0), reinterpret_tensor(buf18, (64, 9, 4), (36, 1, 9), 0),
        reinterpret_tensor(buf16, (64, 9, 4), (36, 1, 9), 0))


class DeformConv(nn.Module):

    def __init__(self, in_channels, out_channels, kernel_size, stride=1,
        padding=0, dilation=1, groups=1, deformable_groups=1, bias=False):
        assert not bias
        super(DeformConv, self).__init__()
        self.with_bias = bias
        assert in_channels % groups == 0, 'in_channels {} cannot be divisible by groups {}'.format(
            in_channels, groups)
        assert out_channels % groups == 0, 'out_channels {} cannot be divisible by groups {}'.format(
            out_channels, groups)
        self.in_channels = in_channels
        self.out_channels = out_channels
        self.kernel_size = _pair(kernel_size)
        self.stride = _pair(stride)
        self.padding = _pair(padding)
        self.dilation = _pair(dilation)
        self.groups = groups
        self.deformable_groups = deformable_groups
        self.weight = nn.Parameter(torch.Tensor(out_channels, in_channels //
            self.groups, *self.kernel_size))
        self.reset_parameters()

    def reset_parameters(self):
        n = self.in_channels
        for k in self.kernel_size:
            n *= k
        stdv = 1.0 / math.sqrt(n)
        self.weight.data.uniform_(-stdv, stdv)

    def forward(self, input, offset):
        return deform_conv(input, offset, self.weight, self.stride, self.
            padding, self.dilation, self.groups, self.deformable_groups)

    def __repr__(self):
        return ''.join(['{}('.format(self.__class__.__name__),
            'in_channels={}, '.format(self.in_channels),
            'out_channels={}, '.format(self.out_channels),
            'kernel_size={}, '.format(self.kernel_size), 'stride={}, '.
            format(self.stride), 'dilation={}, '.format(self.dilation),
            'padding={}, '.format(self.padding), 'groups={}, '.format(self.
            groups), 'deformable_groups={}, '.format(self.deformable_groups
            ), 'bias={})'.format(self.with_bias)])


class DeformUnfold(nn.Module):

    def __init__(self, kernel_size, stride=1, padding=0, dilation=1,
        deformable_groups=1, bias=False):
        assert not bias
        super(DeformUnfold, self).__init__()
        self.kernel_size = _pair(kernel_size)
        self.stride = _pair(stride)
        self.padding = _pair(padding)
        self.dilation = _pair(dilation)
        self.deformable_groups = deformable_groups

    def forward(self, input, offset):
        return deform_unfold(input, offset, self.kernel_size, self.stride,
            self.padding, self.dilation, self.deformable_groups)

    def __repr__(self):
        return ''.join(['{}('.format(self.__class__.__name__),
            'kernel_size={}, '.format(self.kernel_size), 'stride={}, '.
            format(self.stride), 'dilation={}, '.format(self.dilation),
            'padding={}, '.format(self.padding), 'deformable_groups={}, '.
            format(self.deformable_groups)])


class ReDynamicWeightsCat33New(nn.Module):
    """' a rigrous implementation but slow

    """

    def __init__(self, channels, group=1, kernel=3, dilation=(1, 4, 8, 12),
        shuffle=False, deform=None):
        super(ReDynamicWeightsCat33New, self).__init__()
        in_channel = channels
        if deform == 'deformatt':
            self.off_conva = nn.Conv2d(in_channel, 18, 3, padding=dilation[
                0], dilation=dilation[0], bias=False)
            self.off_convb = nn.Conv2d(in_channel, 18, 3, padding=dilation[
                1], dilation=dilation[1], bias=False)
            self.off_convc = nn.Conv2d(in_channel, 18, 3, padding=dilation[
                2], dilation=dilation[2], bias=False)
            self.off_convd = nn.Conv2d(in_channel, 18, 3, padding=dilation[
                3], dilation=dilation[3], bias=False)
            self.kernel_conva = DeformConv(in_channel, group * kernel *
                kernel + 9, kernel_size=3, padding=dilation[0], dilation=
                dilation[0], bias=False)
            self.kernel_convb = DeformConv(in_channel, group * kernel *
                kernel + 9, kernel_size=3, padding=dilation[1], dilation=
                dilation[1], bias=False)
            self.kernel_convc = DeformConv(in_channel, group * kernel *
                kernel + 9, kernel_size=3, padding=dilation[2], dilation=
                dilation[2], bias=False)
            self.kernel_convd = DeformConv(in_channel, group * kernel *
                kernel + 9, kernel_size=3, padding=dilation[3], dilation=
                dilation[3], bias=False)
            self.unfold1 = DeformUnfold(kernel_size=(3, 3), padding=
                dilation[0], dilation=dilation[0])
            self.unfold2 = DeformUnfold(kernel_size=(3, 3), padding=
                dilation[1], dilation=dilation[1])
            self.unfold3 = DeformUnfold(kernel_size=(3, 3), padding=
                dilation[2], dilation=dilation[2])
            self.unfold4 = DeformUnfold(kernel_size=(3, 3), padding=
                dilation[3], dilation=dilation[3])
        elif deform == 'deform':
            self.off_conva = nn.Conv2d(in_channel, 18, 3, padding=dilation[
                0], dilation=dilation[0], bias=False)
            self.off_convb = nn.Conv2d(in_channel, 18, 3, padding=dilation[
                1], dilation=dilation[1], bias=False)
            self.off_convc = nn.Conv2d(in_channel, 18, 3, padding=dilation[
                2], dilation=dilation[2], bias=False)
            self.off_convd = nn.Conv2d(in_channel, 18, 3, padding=dilation[
                3], dilation=dilation[3], bias=False)
            self.kernel_conva = DeformConv(in_channel, group * kernel *
                kernel, kernel_size=3, padding=dilation[0], dilation=
                dilation[0], bias=False)
            self.kernel_convb = DeformConv(in_channel, group * kernel *
                kernel, kernel_size=3, padding=dilation[1], dilation=
                dilation[1], bias=False)
            self.kernel_convc = DeformConv(in_channel, group * kernel *
                kernel, kernel_size=3, padding=dilation[2], dilation=
                dilation[2], bias=False)
            self.kernel_convd = DeformConv(in_channel, group * kernel *
                kernel, kernel_size=3, padding=dilation[3], dilation=
                dilation[3], bias=False)
            self.unfold1 = DeformUnfold(kernel_size=(3, 3), padding=
                dilation[0], dilation=dilation[0])
            self.unfold2 = DeformUnfold(kernel_size=(3, 3), padding=
                dilation[1], dilation=dilation[1])
            self.unfold3 = DeformUnfold(kernel_size=(3, 3), padding=
                dilation[2], dilation=dilation[2])
            self.unfold4 = DeformUnfold(kernel_size=(3, 3), padding=
                dilation[3], dilation=dilation[3])
        else:
            self.cata = nn.Conv2d(in_channel, group * kernel * kernel, 3,
                padding=dilation[0], dilation=dilation[0], bias=False)
            self.catb = nn.Conv2d(in_channel, group * kernel * kernel, 3,
                padding=dilation[1], dilation=dilation[1], bias=False)
            self.catc = nn.Conv2d(in_channel, group * kernel * kernel, 3,
                padding=dilation[2], dilation=dilation[2], bias=False)
            self.catd = nn.Conv2d(in_channel, group * kernel * kernel, 3,
                padding=dilation[3], dilation=dilation[3], bias=False)
            self.unfold1 = nn.Unfold(kernel_size=(3, 3), padding=dilation[0
                ], dilation=dilation[0])
            self.unfold2 = nn.Unfold(kernel_size=(3, 3), padding=dilation[1
                ], dilation=dilation[1])
            self.unfold3 = nn.Unfold(kernel_size=(3, 3), padding=dilation[2
                ], dilation=dilation[2])
            self.unfold4 = nn.Unfold(kernel_size=(3, 3), padding=dilation[3
                ], dilation=dilation[3])
        self.softmax = nn.Softmax(dim=-1)
        self.shuffle = shuffle
        self.deform = deform
        self.group = group
        self.K = kernel * kernel
        self.gamma1 = nn.Parameter(torch.FloatTensor(1).fill_(1.0))
        self.gamma2 = nn.Parameter(torch.FloatTensor(1).fill_(1.0))
        self.gamma3 = nn.Parameter(torch.FloatTensor(1).fill_(1.0))
        self.gamma4 = nn.Parameter(torch.FloatTensor(1).fill_(1.0))

    def forward(self, input_0):
        primals_6 = self.gamma1
        primals_7 = self.gamma2
        primals_8 = self.gamma3
        primals_9 = self.gamma4
        primals_2 = self.cata.weight
        primals_3 = self.catb.weight
        primals_4 = self.catc.weight
        primals_5 = self.catd.weight
        primals_1 = input_0
        output = call([primals_1, primals_2, primals_3, primals_4,
            primals_5, primals_6, primals_7, primals_8, primals_9])
        return output[0]


Measured latency_ms: 0.140694