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
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda


@triton.jit
def triton_poi_fused_convolution_0(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = xindex // 4096 % 256
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x3, tmp2, None)


@triton.jit
def triton_poi_fused__to_copy_1(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = 1.0
    tmp5 = tmp3 * tmp4
    tmp6 = tmp5 - tmp2
    tmp7 = 0.0
    tmp8 = triton_helpers.maximum(tmp6, tmp7)
    tmp9 = tmp8.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp9, xmask)


@triton.jit
def triton_poi_fused_add_clamp_2(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = 1.0
    tmp5 = tmp3 * tmp4
    tmp6 = tmp5 - tmp2
    tmp7 = 0.0
    tmp8 = triton_helpers.maximum(tmp6, tmp7)
    tmp9 = tmp8.to(tl.int32)
    tmp10 = tl.full([1], 1, tl.int64)
    tmp11 = tmp9 + tmp10
    tmp12 = tl.full([1], 63, tl.int64)
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_arange_clamp_mul_sub_3(out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = 1.0
    tmp5 = tmp3 * tmp4
    tmp6 = tmp5 - tmp2
    tmp7 = 0.0
    tmp8 = triton_helpers.maximum(tmp6, tmp7)
    tmp9 = tmp8.to(tl.int32)
    tmp10 = tmp9.to(tl.float32)
    tmp11 = tmp8 - tmp10
    tmp12 = triton_helpers.maximum(tmp11, tmp7)
    tmp13 = triton_helpers.minimum(tmp12, tmp4)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused__unsafe_index_add_convolution_mul_sub_4(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7,
    xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 64 % 64
    x0 = xindex % 64
    x2 = xindex // 4096
    x6 = xindex
    x3 = xindex // 4096 % 256
    tmp0 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr3 + x0, None, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr4 + x0, None, eviction_policy='evict_last')
    tmp19 = tl.load(in_ptr5 + x1, None, eviction_policy='evict_last')
    tmp29 = tl.load(in_ptr6 + x1, None, eviction_policy='evict_last')
    tmp32 = tl.load(in_out_ptr0 + x6, None)
    tmp33 = tl.load(in_ptr7 + x3, None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 64, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + 64 * tmp4 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp11 = tmp10 + tmp1
    tmp12 = tmp10 < 0
    tmp13 = tl.where(tmp12, tmp11, tmp10)
    tmp14 = tl.load(in_ptr2 + (tmp13 + 64 * tmp4 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp15 = tmp14 - tmp9
    tmp17 = tmp15 * tmp16
    tmp18 = tmp9 + tmp17
    tmp20 = tmp19 + tmp1
    tmp21 = tmp19 < 0
    tmp22 = tl.where(tmp21, tmp20, tmp19)
    tmp23 = tl.load(in_ptr2 + (tmp8 + 64 * tmp22 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp24 = tl.load(in_ptr2 + (tmp13 + 64 * tmp22 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp25 = tmp24 - tmp23
    tmp26 = tmp25 * tmp16
    tmp27 = tmp23 + tmp26
    tmp28 = tmp27 - tmp18
    tmp30 = tmp28 * tmp29
    tmp31 = tmp18 + tmp30
    tmp34 = tmp32 + tmp33
    tmp35 = tmp31 + tmp34
    tl.store(in_out_ptr0 + x6, tmp35, None)


@triton.jit
def triton_poi_fused__unsafe_index_add_convolution_mul_sub_5(in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8,
    in_ptr9, in_ptr10, in_ptr11, out_ptr0, out_ptr1, out_ptr2, out_ptr3,
    out_ptr4, out_ptr5, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 64 % 64
    x0 = xindex % 64
    x5 = xindex // 4096
    x2 = xindex // 4096 % 128
    x6 = xindex
    tmp0 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr3 + x2, None, eviction_policy='evict_last')
    tmp12 = tl.load(in_ptr4 + x0, None, eviction_policy='evict_last')
    tmp19 = tl.load(in_ptr5 + x0, None, eviction_policy='evict_last')
    tmp22 = tl.load(in_ptr6 + x1, None, eviction_policy='evict_last')
    tmp34 = tl.load(in_ptr7 + x1, None, eviction_policy='evict_last')
    tmp37 = tl.load(in_ptr9 + x2, None, eviction_policy='evict_last')
    tmp54 = tl.load(in_ptr11 + x2, None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 64, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + 64 * tmp4 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp11 = tmp9 + tmp10
    tmp13 = tmp12 + tmp1
    tmp14 = tmp12 < 0
    tmp15 = tl.where(tmp14, tmp13, tmp12)
    tmp16 = tl.load(in_ptr2 + (tmp15 + 64 * tmp4 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp17 = tmp16 + tmp10
    tmp18 = tmp17 - tmp11
    tmp20 = tmp18 * tmp19
    tmp21 = tmp11 + tmp20
    tmp23 = tmp22 + tmp1
    tmp24 = tmp22 < 0
    tmp25 = tl.where(tmp24, tmp23, tmp22)
    tmp26 = tl.load(in_ptr2 + (tmp8 + 64 * tmp25 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp27 = tmp26 + tmp10
    tmp28 = tl.load(in_ptr2 + (tmp15 + 64 * tmp25 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp29 = tmp28 + tmp10
    tmp30 = tmp29 - tmp27
    tmp31 = tmp30 * tmp19
    tmp32 = tmp27 + tmp31
    tmp33 = tmp32 - tmp21
    tmp35 = tmp33 * tmp34
    tmp36 = tl.load(in_ptr8 + (tmp8 + 64 * tmp4 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp38 = tmp36 + tmp37
    tmp39 = tl.load(in_ptr8 + (tmp15 + 64 * tmp4 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp40 = tmp39 + tmp37
    tmp41 = tmp40 - tmp38
    tmp42 = tmp41 * tmp19
    tmp43 = tmp38 + tmp42
    tmp44 = tl.load(in_ptr8 + (tmp8 + 64 * tmp25 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp45 = tmp44 + tmp37
    tmp46 = tl.load(in_ptr8 + (tmp15 + 64 * tmp25 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp47 = tmp46 + tmp37
    tmp48 = tmp47 - tmp45
    tmp49 = tmp48 * tmp19
    tmp50 = tmp45 + tmp49
    tmp51 = tmp50 - tmp43
    tmp52 = tmp51 * tmp34
    tmp53 = tl.load(in_ptr10 + (tmp8 + 64 * tmp4 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp55 = tmp53 + tmp54
    tmp56 = tl.load(in_ptr10 + (tmp15 + 64 * tmp4 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp57 = tmp56 + tmp54
    tmp58 = tmp57 - tmp55
    tmp59 = tmp58 * tmp19
    tmp60 = tmp55 + tmp59
    tmp61 = tl.load(in_ptr10 + (tmp8 + 64 * tmp25 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp62 = tmp61 + tmp54
    tmp63 = tl.load(in_ptr10 + (tmp15 + 64 * tmp25 + 4096 * x5), None,
        eviction_policy='evict_last')
    tmp64 = tmp63 + tmp54
    tmp65 = tmp64 - tmp62
    tmp66 = tmp65 * tmp19
    tmp67 = tmp62 + tmp66
    tmp68 = tmp67 - tmp60
    tmp69 = tmp68 * tmp34
    tl.store(out_ptr0 + x6, tmp21, None)
    tl.store(out_ptr1 + x6, tmp35, None)
    tl.store(out_ptr2 + x6, tmp43, None)
    tl.store(out_ptr3 + x6, tmp52, None)
    tl.store(out_ptr4 + x6, tmp60, None)
    tl.store(out_ptr5 + x6, tmp69, None)


@triton.jit
def triton_poi_fused_cat_6(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, 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 % 512
    x0 = xindex % 4096
    x2 = xindex // 2097152
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 128, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 4096 * x1 + 524288 * x2), tmp4, other=0.0)
    tmp6 = tl.load(in_ptr1 + (x0 + 4096 * x1 + 524288 * x2), tmp4, other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.full(tmp7.shape, 0.0, tmp7.dtype)
    tmp9 = tl.where(tmp4, tmp7, tmp8)
    tmp10 = tmp0 >= tmp3
    tmp11 = tl.full([1], 256, tl.int64)
    tmp12 = tmp0 < tmp11
    tmp13 = tmp10 & tmp12
    tmp14 = tl.load(in_ptr2 + (x0 + 4096 * (-128 + x1) + 524288 * x2),
        tmp13, other=0.0)
    tmp15 = tl.load(in_ptr3 + (x0 + 4096 * (-128 + x1) + 524288 * x2),
        tmp13, other=0.0)
    tmp16 = tmp14 + tmp15
    tmp17 = tl.full(tmp16.shape, 0.0, tmp16.dtype)
    tmp18 = tl.where(tmp13, tmp16, tmp17)
    tmp19 = tmp0 >= tmp11
    tmp20 = tl.full([1], 384, tl.int64)
    tmp21 = tmp0 < tmp20
    tmp22 = tmp19 & tmp21
    tmp23 = tl.load(in_ptr4 + (x0 + 4096 * (-256 + x1) + 524288 * x2),
        tmp22, other=0.0)
    tmp24 = tl.load(in_ptr5 + (x0 + 4096 * (-256 + x1) + 524288 * x2),
        tmp22, other=0.0)
    tmp25 = tmp23 + tmp24
    tmp26 = tl.full(tmp25.shape, 0.0, tmp25.dtype)
    tmp27 = tl.where(tmp22, tmp25, tmp26)
    tmp28 = tmp0 >= tmp20
    tl.full([1], 512, tl.int64)
    tmp31 = tl.load(in_ptr6 + (x0 + 4096 * (-384 + x1) + 524288 * x2),
        tmp28, other=0.0)
    tmp32 = tl.load(in_ptr7 + (-384 + x1), tmp28, eviction_policy=
        'evict_last', other=0.0)
    tmp33 = tmp31 + tmp32
    tmp34 = tl.full(tmp33.shape, 0.0, tmp33.dtype)
    tmp35 = tl.where(tmp28, tmp33, tmp34)
    tmp36 = tl.where(tmp22, tmp27, tmp35)
    tmp37 = tl.where(tmp13, tmp18, tmp36)
    tmp38 = tl.where(tmp4, tmp9, tmp37)
    tl.store(out_ptr0 + x3, tmp38, None)


@triton.jit
def triton_poi_fused_convolution_7(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = xindex // 4096 % 4
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x3, tmp2, None)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_23, primals_24, primals_25, primals_26, primals_27,
        primals_28, primals_29, primals_30) = args
    args.clear()
    assert_size_stride(primals_1, (256, 2048, 1, 1), (2048, 1, 1, 1))
    assert_size_stride(primals_2, (256,), (1,))
    assert_size_stride(primals_3, (4, 2048, 64, 64), (8388608, 4096, 64, 1))
    assert_size_stride(primals_4, (256, 1024, 1, 1), (1024, 1, 1, 1))
    assert_size_stride(primals_5, (256,), (1,))
    assert_size_stride(primals_6, (4, 1024, 64, 64), (4194304, 4096, 64, 1))
    assert_size_stride(primals_7, (256, 512, 1, 1), (512, 1, 1, 1))
    assert_size_stride(primals_8, (256,), (1,))
    assert_size_stride(primals_9, (4, 512, 64, 64), (2097152, 4096, 64, 1))
    assert_size_stride(primals_10, (256, 256, 1, 1), (256, 1, 1, 1))
    assert_size_stride(primals_11, (256,), (1,))
    assert_size_stride(primals_12, (4, 256, 64, 64), (1048576, 4096, 64, 1))
    assert_size_stride(primals_13, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_14, (256,), (1,))
    assert_size_stride(primals_15, (128, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_16, (128,), (1,))
    assert_size_stride(primals_17, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_18, (256,), (1,))
    assert_size_stride(primals_19, (128, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_20, (128,), (1,))
    assert_size_stride(primals_21, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_22, (256,), (1,))
    assert_size_stride(primals_23, (128, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_24, (128,), (1,))
    assert_size_stride(primals_25, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_26, (256,), (1,))
    assert_size_stride(primals_27, (128, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_28, (128,), (1,))
    assert_size_stride(primals_29, (4, 512, 3, 3), (4608, 9, 3, 1))
    assert_size_stride(primals_30, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = extern_kernels.convolution(primals_3, primals_1, stride=(1, 
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 256, 64, 64), (1048576, 4096, 64, 1))
        buf1 = buf0
        del buf0
        get_raw_stream(0)
        triton_poi_fused_convolution_0[grid(4194304)](buf1, primals_2, 
            4194304, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_2
        buf2 = extern_kernels.convolution(primals_6, primals_4, stride=(1, 
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf2, (4, 256, 64, 64), (1048576, 4096, 64, 1))
        buf3 = empty_strided_cuda((64, 1), (1, 1), torch.int64)
        triton_poi_fused__to_copy_1[grid(64)](buf3, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf4 = empty_strided_cuda((64, 1), (1, 1), torch.int64)
        triton_poi_fused_add_clamp_2[grid(64)](buf4, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf5 = empty_strided_cuda((64,), (1,), torch.int64)
        triton_poi_fused__to_copy_1[grid(64)](buf5, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf6 = empty_strided_cuda((64,), (1,), torch.int64)
        triton_poi_fused_add_clamp_2[grid(64)](buf6, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf7 = empty_strided_cuda((64,), (1,), torch.float32)
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_3[grid(64)](buf7,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf9 = empty_strided_cuda((64, 1), (1, 1), torch.float32)
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_3[grid(64)](buf9,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf10 = buf2
        del buf2
        triton_poi_fused__unsafe_index_add_convolution_mul_sub_4[grid(4194304)
            ](buf10, buf3, buf5, buf1, buf6, buf7, buf4, buf9, primals_5, 
            4194304, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_5
        buf11 = extern_kernels.convolution(primals_9, primals_7, stride=(1,
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf11, (4, 256, 64, 64), (1048576, 4096, 64, 1))
        buf13 = buf11
        del buf11
        triton_poi_fused__unsafe_index_add_convolution_mul_sub_4[grid(4194304)
            ](buf13, buf3, buf5, buf10, buf6, buf7, buf4, buf9, primals_8, 
            4194304, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_8
        buf14 = extern_kernels.convolution(primals_12, primals_10, stride=(
            1, 1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 256, 64, 64), (1048576, 4096, 64, 1))
        buf16 = buf14
        del buf14
        triton_poi_fused__unsafe_index_add_convolution_mul_sub_4[grid(4194304)
            ](buf16, buf3, buf5, buf13, buf6, buf7, buf4, buf9, primals_11,
            4194304, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_11
        buf17 = extern_kernels.convolution(buf1, primals_13, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf17, (4, 256, 64, 64), (1048576, 4096, 64, 1))
        buf18 = buf17
        del buf17
        triton_poi_fused_convolution_0[grid(4194304)](buf18, primals_14, 
            4194304, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_14
        buf19 = extern_kernels.convolution(buf18, primals_15, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf19, (4, 128, 64, 64), (524288, 4096, 64, 1))
        buf20 = extern_kernels.convolution(buf10, primals_17, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 256, 64, 64), (1048576, 4096, 64, 1))
        buf21 = buf20
        del buf20
        triton_poi_fused_convolution_0[grid(4194304)](buf21, primals_18, 
            4194304, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_18
        buf22 = extern_kernels.convolution(buf21, primals_19, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 128, 64, 64), (524288, 4096, 64, 1))
        buf23 = extern_kernels.convolution(buf13, primals_21, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 256, 64, 64), (1048576, 4096, 64, 1))
        buf24 = buf23
        del buf23
        triton_poi_fused_convolution_0[grid(4194304)](buf24, primals_22, 
            4194304, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_22
        buf25 = extern_kernels.convolution(buf24, primals_23, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf25, (4, 128, 64, 64), (524288, 4096, 64, 1))
        buf26 = extern_kernels.convolution(buf16, primals_25, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf26, (4, 256, 64, 64), (1048576, 4096, 64, 1))
        buf27 = buf26
        del buf26
        triton_poi_fused_convolution_0[grid(4194304)](buf27, primals_26, 
            4194304, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_26
        buf28 = extern_kernels.convolution(buf27, primals_27, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf28, (4, 128, 64, 64), (524288, 4096, 64, 1))
        buf29 = empty_strided_cuda((4, 128, 64, 64), (524288, 4096, 64, 1),
            torch.float32)
        buf30 = empty_strided_cuda((4, 128, 64, 64), (524288, 4096, 64, 1),
            torch.float32)
        buf31 = empty_strided_cuda((4, 128, 64, 64), (524288, 4096, 64, 1),
            torch.float32)
        buf32 = empty_strided_cuda((4, 128, 64, 64), (524288, 4096, 64, 1),
            torch.float32)
        buf33 = empty_strided_cuda((4, 128, 64, 64), (524288, 4096, 64, 1),
            torch.float32)
        buf34 = empty_strided_cuda((4, 128, 64, 64), (524288, 4096, 64, 1),
            torch.float32)
        triton_poi_fused__unsafe_index_add_convolution_mul_sub_5[grid(2097152)
            ](buf3, buf5, buf19, primals_16, buf6, buf7, buf4, buf9, buf22,
            primals_20, buf25, primals_24, buf29, buf30, buf31, buf32,
            buf33, buf34, 2097152, XBLOCK=1024, num_warps=4, num_stages=1)
        del buf19
        del buf22
        del buf25
        del primals_16
        del primals_20
        del primals_24
        buf35 = empty_strided_cuda((4, 512, 64, 64), (2097152, 4096, 64, 1),
            torch.float32)
        triton_poi_fused_cat_6[grid(8388608)](buf29, buf30, buf31, buf32,
            buf33, buf34, buf28, primals_28, buf35, 8388608, XBLOCK=1024,
            num_warps=4, num_stages=1)
        del buf28
        del buf29
        del buf30
        del buf31
        del buf32
        del buf33
        del buf34
        del primals_28
        buf36 = extern_kernels.convolution(buf35, primals_29, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf36, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf37 = buf36
        del buf36
        triton_poi_fused_convolution_7[grid(65536)](buf37, primals_30, 
            65536, XBLOCK=512, num_warps=4, num_stages=1)
        del primals_30
    return (buf37, primals_1, primals_3, primals_4, primals_6, primals_7,
        primals_9, primals_10, primals_12, primals_13, primals_15,
        primals_17, primals_19, primals_21, primals_23, primals_25,
        primals_27, primals_29, buf1, buf3, buf4, buf5, buf6, buf7, buf9,
        buf10, buf13, buf16, buf18, buf21, buf24, buf27, buf35)


class fpn_moduleNew(nn.Module):

    def __init__(self, numClass):
        super(fpn_moduleNew, self).__init__()
        self.toplayer = nn.Conv2d(2048, 256, kernel_size=1, stride=1, padding=0
            )
        self.smooth1_1 = nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1
            )
        self.smooth2_1 = nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1
            )
        self.smooth3_1 = nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1
            )
        self.smooth4_1 = nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1
            )
        self.smooth1_2 = nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1
            )
        self.smooth2_2 = nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1
            )
        self.smooth3_2 = nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1
            )
        self.smooth4_2 = nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1
            )
        self.latlayer1 = nn.Conv2d(1024, 256, kernel_size=1, stride=1,
            padding=0)
        self.latlayer2 = nn.Conv2d(512, 256, kernel_size=1, stride=1, padding=0
            )
        self.latlayer3 = nn.Conv2d(256, 256, kernel_size=1, stride=1, padding=0
            )
        self.classify = nn.Conv2d(128 * 4, numClass, kernel_size=3, stride=
            1, padding=1)

    def _concatenate(self, p5, p4, p3, p2):
        _, _, H, W = p2.size()
        p5 = F.interpolate(p5, size=(H, W), mode='bilinear')
        p4 = F.interpolate(p4, size=(H, W), mode='bilinear')
        p3 = F.interpolate(p3, size=(H, W), mode='bilinear')
        return torch.cat([p5, p4, p3, p2], dim=1)

    def _upsample_add(self, x, y):
        """Upsample and add two feature maps.
        Args:
          x: (Variable) top feature map to be upsampled.
          y: (Variable) lateral feature map.
        Returns:
          (Variable) added feature map.
        Note in PyTorch, when input size is odd, the upsampled feature map
        with `F.upsample(..., scale_factor=2, mode='nearest')`
        maybe not equal to the lateral feature map size.
        e.g.
        original input size: [N,_,15,15] ->
        conv2d feature map size: [N,_,8,8] ->
        upsampled feature map size: [N,_,16,16]
        So we choose bilinear upsample which supports arbitrary output sizes.
        """
        _, _, H, W = y.size()
        return F.interpolate(x, size=(H, W), mode='bilinear') + y

    def forward(self, input_0, input_1, input_2, input_3):
        primals_1 = self.toplayer.weight
        primals_2 = self.toplayer.bias
        primals_13 = self.smooth1_1.weight
        primals_5 = self.smooth1_1.bias
        primals_17 = self.smooth2_1.weight
        primals_8 = self.smooth2_1.bias
        primals_21 = self.smooth3_1.weight
        primals_11 = self.smooth3_1.bias
        primals_25 = self.smooth4_1.weight
        primals_14 = self.smooth4_1.bias
        primals_15 = self.smooth1_2.weight
        primals_16 = self.smooth1_2.bias
        primals_19 = self.smooth2_2.weight
        primals_20 = self.smooth2_2.bias
        primals_23 = self.smooth3_2.weight
        primals_24 = self.smooth3_2.bias
        primals_27 = self.smooth4_2.weight
        primals_28 = self.smooth4_2.bias
        primals_4 = self.latlayer1.weight
        primals_18 = self.latlayer1.bias
        primals_7 = self.latlayer2.weight
        primals_22 = self.latlayer2.bias
        primals_10 = self.latlayer3.weight
        primals_26 = self.latlayer3.bias
        primals_29 = self.classify.weight
        primals_30 = self.classify.bias
        primals_12 = input_0
        primals_9 = input_1
        primals_6 = input_2
        primals_3 = input_3
        output = call([primals_1, primals_2, primals_3, primals_4,
            primals_5, primals_6, primals_7, primals_8, primals_9,
            primals_10, primals_11, primals_12, primals_13, primals_14,
            primals_15, primals_16, primals_17, primals_18, primals_19,
            primals_20, primals_21, primals_22, primals_23, primals_24,
            primals_25, primals_26, primals_27, primals_28, primals_29,
            primals_30])
        return output[0]


Measured latency_ms: 0.015974