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
from torch import nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
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_poi_fused_cat_0(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 4096 % 64
    x0 = xindex % 4096
    x2 = xindex // 262144
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 16, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 4096 * x1 + 65536 * x2), tmp4, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 32, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + 4096 * (-16 + x1) + 65536 * x2), tmp9,
        other=0.0)
    tmp11 = tmp0 >= tmp7
    tmp12 = tl.full([1], 48, tl.int64)
    tmp13 = tmp0 < tmp12
    tmp14 = tmp11 & tmp13
    tmp15 = tl.load(in_ptr2 + (x0 + 4096 * (-32 + x1) + 65536 * x2), tmp14,
        other=0.0)
    tmp16 = tmp0 >= tmp12
    tl.full([1], 64, tl.int64)
    tmp19 = tl.load(in_ptr3 + (x0 + 4096 * (-48 + x1) + 65536 * x2), tmp16,
        other=0.0)
    tmp20 = tl.where(tmp14, tmp15, tmp19)
    tmp21 = tl.where(tmp9, tmp10, tmp20)
    tmp22 = tl.where(tmp4, tmp5, tmp21)
    tl.store(out_ptr0 + x3, tmp22, None)


@triton.jit
def triton_red_fused_mean_1(in_out_ptr0, in_ptr0, xnumel, rnumel, XBLOCK:
    tl.constexpr, RBLOCK: tl.constexpr):
    xnumel = 64
    rnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    _tmp2 = tl.full([XBLOCK, RBLOCK], 0, tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp0 = tl.load(in_ptr0 + (r1 + 4096 * x0), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
        tmp3 = _tmp2 + tmp1
        _tmp2 = tl.where(rmask & xmask, tmp3, _tmp2)
    tmp2 = tl.sum(_tmp2, 1)[:, None]
    tmp4 = 4096.0
    tmp5 = tmp2 / tmp4
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp5, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_2(in_out_ptr0, in_out_ptr1,
    in_out_ptr2, in_out_ptr3, in_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, xmask)
    tmp1 = tl.load(in_ptr0 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp6 = tl.load(in_out_ptr1 + x0, xmask)
    tmp9 = tl.load(in_out_ptr2 + x0, xmask)
    tmp12 = tl.load(in_out_ptr3 + x0, xmask)
    tmp3 = tmp0 + tmp2
    tmp4 = tl.full([1], 0, tl.int32)
    tmp5 = triton_helpers.maximum(tmp4, tmp3)
    tmp7 = tmp6 + tmp2
    tmp8 = triton_helpers.maximum(tmp4, tmp7)
    tmp10 = tmp9 + tmp2
    tmp11 = triton_helpers.maximum(tmp4, tmp10)
    tmp13 = tmp12 + tmp2
    tmp14 = triton_helpers.maximum(tmp4, tmp13)
    tl.store(in_out_ptr0 + x0, tmp5, xmask)
    tl.store(in_out_ptr1 + x0, tmp8, xmask)
    tl.store(in_out_ptr2 + x0, tmp11, xmask)
    tl.store(in_out_ptr3 + x0, tmp14, xmask)


@triton.jit
def triton_poi_fused_convolution_3(in_out_ptr0, in_out_ptr1, in_out_ptr2,
    in_out_ptr3, in_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 16
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_out_ptr1 + x2, xmask)
    tmp5 = tl.load(in_out_ptr2 + x2, xmask)
    tmp7 = tl.load(in_out_ptr3 + x2, xmask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp3 + tmp1
    tmp6 = tmp5 + tmp1
    tmp8 = tmp7 + tmp1
    tl.store(in_out_ptr0 + x2, tmp2, xmask)
    tl.store(in_out_ptr1 + x2, tmp4, xmask)
    tl.store(in_out_ptr2 + x2, tmp6, xmask)
    tl.store(in_out_ptr3 + x2, tmp8, xmask)


@triton.jit
def triton_poi_fused_cat_4(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 64
    x1 = xindex // 64
    x2 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 16, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (16 * x1 + x0), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tl.sigmoid(tmp5)
    tmp7 = tl.full(tmp6.shape, 0.0, tmp6.dtype)
    tmp8 = tl.where(tmp4, tmp6, tmp7)
    tmp9 = tmp0 >= tmp3
    tmp10 = tl.full([1], 32, tl.int64)
    tmp11 = tmp0 < tmp10
    tmp12 = tmp9 & tmp11
    tmp13 = tl.load(in_ptr1 + (16 * x1 + (-16 + x0)), tmp12 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp14 = tl.sigmoid(tmp13)
    tmp15 = tl.full(tmp14.shape, 0.0, tmp14.dtype)
    tmp16 = tl.where(tmp12, tmp14, tmp15)
    tmp17 = tmp0 >= tmp10
    tmp18 = tl.full([1], 48, tl.int64)
    tmp19 = tmp0 < tmp18
    tmp20 = tmp17 & tmp19
    tmp21 = tl.load(in_ptr2 + (16 * x1 + (-32 + x0)), tmp20 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp22 = tl.sigmoid(tmp21)
    tmp23 = tl.full(tmp22.shape, 0.0, tmp22.dtype)
    tmp24 = tl.where(tmp20, tmp22, tmp23)
    tmp25 = tmp0 >= tmp18
    tl.full([1], 64, tl.int64)
    tmp28 = tl.load(in_ptr3 + (16 * x1 + (-48 + x0)), tmp25 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp29 = tl.sigmoid(tmp28)
    tmp30 = tl.full(tmp29.shape, 0.0, tmp29.dtype)
    tmp31 = tl.where(tmp25, tmp29, tmp30)
    tmp32 = tl.where(tmp20, tmp24, tmp31)
    tmp33 = tl.where(tmp12, tmp16, tmp32)
    tmp34 = tl.where(tmp4, tmp8, tmp33)
    tl.store(out_ptr0 + x2, tmp34, xmask)


@triton.jit
def triton_poi_fused__softmax_5(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = xindex // 64
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp3 = triton_helpers.maximum(tmp1, tmp2)
    tmp5 = triton_helpers.maximum(tmp3, tmp4)
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp0 - tmp7
    tmp9 = tl_math.exp(tmp8)
    tl.store(out_ptr0 + x3, tmp9, xmask)


@triton.jit
def triton_poi_fused__softmax_6(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = xindex // 64
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp3 = tmp1 + tmp2
    tmp5 = tmp3 + tmp4
    tmp7 = tmp5 + tmp6
    tmp8 = tmp0 / tmp7
    tl.store(out_ptr0 + x3, tmp8, xmask)


@triton.jit
def triton_poi_fused_cat_7(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 4096 % 64
    x0 = xindex % 4096
    x2 = xindex // 262144
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 16, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (196608 + x0 + 4096 * x1 + 262144 * x2), tmp4,
        other=0.0)
    tmp6 = tl.load(in_ptr1 + (48 + 64 * x2 + x1), tmp4, eviction_policy=
        'evict_last', other=0.0)
    tmp7 = tmp5 * tmp6
    tmp8 = tl.full(tmp7.shape, 0.0, tmp7.dtype)
    tmp9 = tl.where(tmp4, tmp7, tmp8)
    tmp10 = tmp0 >= tmp3
    tl.full([1], 64, tl.int64)
    tmp13 = -16 + x1
    tmp15 = tmp13 < tmp3
    tmp16 = tmp15 & tmp10
    tmp17 = tl.load(in_ptr0 + (131072 + x0 + 4096 * (-16 + x1) + 262144 *
        x2), tmp16, other=0.0)
    tmp18 = tl.load(in_ptr1 + (32 + 64 * x2 + (-16 + x1)), tmp16,
        eviction_policy='evict_last', other=0.0)
    tmp19 = tmp17 * tmp18
    tmp20 = tl.full(tmp19.shape, 0.0, tmp19.dtype)
    tmp21 = tl.where(tmp16, tmp19, tmp20)
    tmp22 = tmp13 >= tmp3
    tl.full([1], 48, tl.int64)
    tmp25 = tmp22 & tmp10
    tmp26 = -16 + (-16 + x1)
    tmp28 = tmp26 < tmp3
    tmp29 = tmp28 & tmp25
    tmp30 = tl.load(in_ptr0 + (65536 + x0 + 4096 * (-16 + (-16 + x1)) + 
        262144 * x2), tmp29, other=0.0)
    tmp31 = tl.load(in_ptr1 + (16 + 64 * x2 + (-16 + (-16 + x1))), tmp29,
        eviction_policy='evict_last', other=0.0)
    tmp32 = tmp30 * tmp31
    tmp33 = tl.full(tmp32.shape, 0.0, tmp32.dtype)
    tmp34 = tl.where(tmp29, tmp32, tmp33)
    tmp35 = tmp26 >= tmp3
    tl.full([1], 32, tl.int64)
    tmp38 = tmp35 & tmp25
    tmp39 = tl.load(in_ptr0 + (x0 + 4096 * (-16 + (-16 + (-16 + x1))) + 
        262144 * x2), tmp38, other=0.0)
    tmp40 = tl.load(in_ptr1 + (64 * x2 + (-16 + (-16 + (-16 + x1)))), tmp38,
        eviction_policy='evict_last', other=0.0)
    tmp41 = tmp39 * tmp40
    tmp42 = tl.full(tmp41.shape, 0.0, tmp41.dtype)
    tmp43 = tl.where(tmp38, tmp41, tmp42)
    tmp44 = tl.where(tmp28, tmp34, tmp43)
    tmp45 = tl.full(tmp44.shape, 0.0, tmp44.dtype)
    tmp46 = tl.where(tmp25, tmp44, tmp45)
    tmp47 = tl.where(tmp15, tmp21, tmp46)
    tmp48 = tl.full(tmp47.shape, 0.0, tmp47.dtype)
    tmp49 = tl.where(tmp10, tmp47, tmp48)
    tmp50 = tl.where(tmp4, tmp9, tmp49)
    tl.store(out_ptr0 + x3, tmp50, None)


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, 64, 64, 64), (262144, 4096, 64, 1))
    assert_size_stride(primals_2, (16, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_3, (16, 16, 5, 5), (400, 25, 5, 1))
    assert_size_stride(primals_4, (16, 8, 7, 7), (392, 49, 7, 1))
    assert_size_stride(primals_5, (16, 4, 9, 9), (324, 81, 9, 1))
    assert_size_stride(primals_6, (1, 16, 1, 1), (16, 1, 1, 1))
    assert_size_stride(primals_7, (1,), (1,))
    assert_size_stride(primals_8, (16, 1, 1, 1), (1, 1, 1, 1))
    assert_size_stride(primals_9, (16,), (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, 16, 64, 64), (65536, 4096, 64, 1))
        buf1 = extern_kernels.convolution(primals_1, primals_3, stride=(1, 
            1), padding=(2, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=4, bias=None)
        assert_size_stride(buf1, (4, 16, 64, 64), (65536, 4096, 64, 1))
        buf2 = extern_kernels.convolution(primals_1, primals_4, stride=(1, 
            1), padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=8, bias=None)
        assert_size_stride(buf2, (4, 16, 64, 64), (65536, 4096, 64, 1))
        buf3 = extern_kernels.convolution(primals_1, primals_5, stride=(1, 
            1), padding=(4, 4), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=16, bias=None)
        assert_size_stride(buf3, (4, 16, 64, 64), (65536, 4096, 64, 1))
        buf4 = empty_strided_cuda((4, 64, 64, 64), (262144, 4096, 64, 1),
            torch.float32)
        get_raw_stream(0)
        triton_poi_fused_cat_0[grid(1048576)](buf0, buf1, buf2, buf3, buf4,
            1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        buf5 = empty_strided_cuda((4, 16, 1, 1), (16, 1, 64, 64), torch.float32
            )
        buf6 = reinterpret_tensor(buf5, (4, 16, 1, 1), (16, 1, 1, 1), 0)
        del buf5
        triton_red_fused_mean_1[grid(64)](buf6, buf0, 64, 4096, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del buf0
        buf7 = extern_kernels.convolution(buf6, primals_6, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 1, 1, 1), (1, 1, 1, 1))
        buf11 = empty_strided_cuda((4, 16, 1, 1), (16, 1, 64, 64), torch.
            float32)
        buf12 = reinterpret_tensor(buf11, (4, 16, 1, 1), (16, 1, 1, 1), 0)
        del buf11
        triton_red_fused_mean_1[grid(64)](buf12, buf1, 64, 4096, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del buf1
        buf13 = extern_kernels.convolution(buf12, primals_6, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf13, (4, 1, 1, 1), (1, 1, 1, 1))
        buf17 = empty_strided_cuda((4, 16, 1, 1), (16, 1, 64, 64), torch.
            float32)
        buf18 = reinterpret_tensor(buf17, (4, 16, 1, 1), (16, 1, 1, 1), 0)
        del buf17
        triton_red_fused_mean_1[grid(64)](buf18, buf2, 64, 4096, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del buf2
        buf19 = extern_kernels.convolution(buf18, primals_6, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf19, (4, 1, 1, 1), (1, 1, 1, 1))
        buf23 = empty_strided_cuda((4, 16, 1, 1), (16, 1, 64, 64), torch.
            float32)
        buf24 = reinterpret_tensor(buf23, (4, 16, 1, 1), (16, 1, 1, 1), 0)
        del buf23
        triton_red_fused_mean_1[grid(64)](buf24, buf3, 64, 4096, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del buf3
        buf25 = extern_kernels.convolution(buf24, primals_6, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf25, (4, 1, 1, 1), (1, 1, 1, 1))
        buf8 = buf7
        del buf7
        buf14 = buf13
        del buf13
        buf20 = buf19
        del buf19
        buf26 = buf25
        del buf25
        triton_poi_fused_convolution_relu_2[grid(4)](buf8, buf14, buf20,
            buf26, primals_7, 4, XBLOCK=4, num_warps=1, num_stages=1)
        del primals_7
        buf9 = extern_kernels.convolution(buf8, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf9, (4, 16, 1, 1), (16, 1, 1, 1))
        buf15 = extern_kernels.convolution(buf14, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf15, (4, 16, 1, 1), (16, 1, 1, 1))
        buf21 = extern_kernels.convolution(buf20, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf21, (4, 16, 1, 1), (16, 1, 1, 1))
        buf27 = extern_kernels.convolution(buf26, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf27, (4, 16, 1, 1), (16, 1, 1, 1))
        buf10 = buf9
        del buf9
        buf16 = buf15
        del buf15
        buf22 = buf21
        del buf21
        buf28 = buf27
        del buf27
        triton_poi_fused_convolution_3[grid(64)](buf10, buf16, buf22, buf28,
            primals_9, 64, XBLOCK=64, num_warps=1, num_stages=1)
        del primals_9
        buf29 = empty_strided_cuda((4, 64, 1, 1), (64, 1, 1, 1), torch.float32)
        triton_poi_fused_cat_4[grid(256)](buf10, buf16, buf22, buf28, buf29,
            256, XBLOCK=128, num_warps=4, num_stages=1)
        buf30 = empty_strided_cuda((4, 4, 16, 1, 1), (64, 16, 1, 256, 256),
            torch.float32)
        triton_poi_fused__softmax_5[grid(256)](buf29, buf30, 256, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf31 = empty_strided_cuda((4, 4, 16, 1, 1), (64, 16, 1, 256, 256),
            torch.float32)
        triton_poi_fused__softmax_6[grid(256)](buf30, buf31, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        del buf30
        buf32 = empty_strided_cuda((4, 64, 64, 64), (262144, 4096, 64, 1),
            torch.float32)
        triton_poi_fused_cat_7[grid(1048576)](buf4, buf31, buf32, 1048576,
            XBLOCK=1024, num_warps=4, num_stages=1)
        del buf31
    return (buf32, primals_1, primals_2, primals_3, primals_4, primals_5,
        primals_6, primals_8, buf4, buf6, buf8, buf10, buf12, buf14, buf16,
        buf18, buf20, buf22, buf24, buf26, buf28, buf29)


def conv(in_planes, out_planes, kernel_size=3, stride=1, padding=1,
    dilation=1, groups=1):
    """standard convolution with padding"""
    return nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride
        =stride, padding=padding, dilation=dilation, groups=groups, bias=False)


class SEWeightModule(nn.Module):

    def __init__(self, channels, reduction=16):
        super(SEWeightModule, self).__init__()
        self.avg_pool = nn.AdaptiveAvgPool2d(1)
        self.fc1 = nn.Conv2d(channels, channels // reduction, kernel_size=1,
            padding=0)
        self.relu = nn.ReLU(inplace=True)
        self.fc2 = nn.Conv2d(channels // reduction, channels, kernel_size=1,
            padding=0)
        self.sigmoid = nn.Sigmoid()

    def forward(self, x):
        out = self.avg_pool(x)
        out = self.fc1(out)
        out = self.relu(out)
        out = self.fc2(out)
        weight = self.sigmoid(out)
        return weight


class PSAModuleNew(nn.Module):

    def __init__(self, inplans, planes, conv_kernels=[3, 5, 7, 9], stride=1,
        conv_groups=[1, 4, 8, 16]):
        super(PSAModuleNew, self).__init__()
        self.conv_1 = conv(inplans, planes // 4, kernel_size=conv_kernels[0
            ], padding=conv_kernels[0] // 2, stride=stride, groups=
            conv_groups[0])
        self.conv_2 = conv(inplans, planes // 4, kernel_size=conv_kernels[1
            ], padding=conv_kernels[1] // 2, stride=stride, groups=
            conv_groups[1])
        self.conv_3 = conv(inplans, planes // 4, kernel_size=conv_kernels[2
            ], padding=conv_kernels[2] // 2, stride=stride, groups=
            conv_groups[2])
        self.conv_4 = conv(inplans, planes // 4, kernel_size=conv_kernels[3
            ], padding=conv_kernels[3] // 2, stride=stride, groups=
            conv_groups[3])
        self.se = SEWeightModule(planes // 4)
        self.split_channel = planes // 4
        self.softmax = nn.Softmax(dim=1)

    def forward(self, input_0):
        primals_2 = self.conv_1.weight
        primals_3 = self.conv_2.weight
        primals_4 = self.conv_3.weight
        primals_5 = self.conv_4.weight
        primals_6 = self.se.fc1.weight
        primals_7 = self.se.fc1.bias
        primals_8 = self.se.fc2.weight
        primals_9 = self.se.fc2.bias
        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.46922