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
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_cat_0(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 384
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 6
    x0 = xindex % 16
    x2 = xindex // 96
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 2, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 32 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 6, tl.int64)
    tmp9 = tl.load(in_ptr1 + (x0 + 16 * (-2 + x1) + 64 * x2), tmp6 & xmask,
        other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tl.store(out_ptr0 + x3, tmp10, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_1(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 3072
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 16 % 48
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x3, tmp4, xmask)


@triton.jit
def triton_poi_fused_cat_2(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 1152
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 18
    x0 = xindex % 16
    x2 = xindex // 288
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 6, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 96 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 18, tl.int64)
    tmp9 = tl.load(in_ptr1 + (x0 + 16 * (-6 + x1) + 192 * x2), tmp6 & xmask,
        other=0.0)
    tmp10 = tl.load(in_ptr2 + (-6 + x1), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp11 = tmp9 + tmp10
    tmp12 = tl.full([1], 0, tl.int32)
    tmp13 = triton_helpers.maximum(tmp12, tmp11)
    tmp14 = tl.full(tmp13.shape, 0.0, tmp13.dtype)
    tmp15 = tl.where(tmp6, tmp13, tmp14)
    tmp16 = tl.where(tmp4, tmp5, tmp15)
    tl.store(out_ptr0 + x3, tmp16, xmask)


@triton.jit
def triton_poi_fused_cat_3(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1920
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 30
    x0 = xindex % 16
    x2 = xindex // 480
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 6, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 96 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 18, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + 16 * (-6 + x1) + 192 * x2), tmp9 &
        xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + (-6 + x1), tmp9 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = tl.full([1], 0, tl.int32)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp15 = tl.full(tmp14.shape, 0.0, tmp14.dtype)
    tmp16 = tl.where(tmp9, tmp14, tmp15)
    tmp17 = tmp0 >= tmp7
    tl.full([1], 30, tl.int64)
    tmp20 = tl.load(in_ptr3 + (x0 + 16 * (-18 + x1) + 192 * x2), tmp17 &
        xmask, other=0.0)
    tmp21 = tl.load(in_ptr4 + (-18 + x1), tmp17 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp22 = tmp20 + tmp21
    tmp23 = triton_helpers.maximum(tmp13, tmp22)
    tmp24 = tl.full(tmp23.shape, 0.0, tmp23.dtype)
    tmp25 = tl.where(tmp17, tmp23, tmp24)
    tmp26 = tl.where(tmp9, tmp16, tmp25)
    tmp27 = tl.where(tmp4, tmp5, tmp26)
    tl.store(out_ptr0 + x3, tmp27, xmask)


@triton.jit
def triton_poi_fused_cat_4(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 2688
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 42
    x0 = xindex % 16
    x2 = xindex // 672
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 6, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 96 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 18, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + 16 * (-6 + x1) + 192 * x2), tmp9 &
        xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + (-6 + x1), tmp9 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = tl.full([1], 0, tl.int32)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp15 = tl.full(tmp14.shape, 0.0, tmp14.dtype)
    tmp16 = tl.where(tmp9, tmp14, tmp15)
    tmp17 = tmp0 >= tmp7
    tmp18 = tl.full([1], 30, tl.int64)
    tmp19 = tmp0 < tmp18
    tmp20 = tmp17 & tmp19
    tmp21 = tl.load(in_ptr3 + (x0 + 16 * (-18 + x1) + 192 * x2), tmp20 &
        xmask, other=0.0)
    tmp22 = tl.load(in_ptr4 + (-18 + x1), tmp20 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp23 = tmp21 + tmp22
    tmp24 = triton_helpers.maximum(tmp13, tmp23)
    tmp25 = tl.full(tmp24.shape, 0.0, tmp24.dtype)
    tmp26 = tl.where(tmp20, tmp24, tmp25)
    tmp27 = tmp0 >= tmp18
    tl.full([1], 42, tl.int64)
    tmp30 = tl.load(in_ptr5 + (x0 + 16 * (-30 + x1) + 192 * x2), tmp27 &
        xmask, other=0.0)
    tmp31 = tl.load(in_ptr6 + (-30 + x1), tmp27 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp32 = tmp30 + tmp31
    tmp33 = triton_helpers.maximum(tmp13, tmp32)
    tmp34 = tl.full(tmp33.shape, 0.0, tmp33.dtype)
    tmp35 = tl.where(tmp27, tmp33, tmp34)
    tmp36 = tl.where(tmp20, tmp26, tmp35)
    tmp37 = tl.where(tmp9, tmp16, tmp36)
    tmp38 = tl.where(tmp4, tmp5, tmp37)
    tl.store(out_ptr0 + x3, tmp38, xmask)


@triton.jit
def triton_poi_fused_cat_5(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, in_ptr8, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 3456
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 54
    x0 = xindex % 16
    x2 = xindex // 864
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 6, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 96 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 18, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + 16 * (-6 + x1) + 192 * x2), tmp9 &
        xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + (-6 + x1), tmp9 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = tl.full([1], 0, tl.int32)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp15 = tl.full(tmp14.shape, 0.0, tmp14.dtype)
    tmp16 = tl.where(tmp9, tmp14, tmp15)
    tmp17 = tmp0 >= tmp7
    tmp18 = tl.full([1], 30, tl.int64)
    tmp19 = tmp0 < tmp18
    tmp20 = tmp17 & tmp19
    tmp21 = tl.load(in_ptr3 + (x0 + 16 * (-18 + x1) + 192 * x2), tmp20 &
        xmask, other=0.0)
    tmp22 = tl.load(in_ptr4 + (-18 + x1), tmp20 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp23 = tmp21 + tmp22
    tmp24 = triton_helpers.maximum(tmp13, tmp23)
    tmp25 = tl.full(tmp24.shape, 0.0, tmp24.dtype)
    tmp26 = tl.where(tmp20, tmp24, tmp25)
    tmp27 = tmp0 >= tmp18
    tmp28 = tl.full([1], 42, tl.int64)
    tmp29 = tmp0 < tmp28
    tmp30 = tmp27 & tmp29
    tmp31 = tl.load(in_ptr5 + (x0 + 16 * (-30 + x1) + 192 * x2), tmp30 &
        xmask, other=0.0)
    tmp32 = tl.load(in_ptr6 + (-30 + x1), tmp30 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp33 = tmp31 + tmp32
    tmp34 = triton_helpers.maximum(tmp13, tmp33)
    tmp35 = tl.full(tmp34.shape, 0.0, tmp34.dtype)
    tmp36 = tl.where(tmp30, tmp34, tmp35)
    tmp37 = tmp0 >= tmp28
    tl.full([1], 54, tl.int64)
    tmp40 = tl.load(in_ptr7 + (x0 + 16 * (-42 + x1) + 192 * x2), tmp37 &
        xmask, other=0.0)
    tmp41 = tl.load(in_ptr8 + (-42 + x1), tmp37 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp42 = tmp40 + tmp41
    tmp43 = triton_helpers.maximum(tmp13, tmp42)
    tmp44 = tl.full(tmp43.shape, 0.0, tmp43.dtype)
    tmp45 = tl.where(tmp37, tmp43, tmp44)
    tmp46 = tl.where(tmp30, tmp36, tmp45)
    tmp47 = tl.where(tmp20, tmp26, tmp46)
    tmp48 = tl.where(tmp9, tmp16, tmp47)
    tmp49 = tl.where(tmp4, tmp5, tmp48)
    tl.store(out_ptr0 + x3, tmp49, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_threshold_backward_6(in_out_ptr0,
    in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 16 % 12
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp5 = 0.0
    tmp6 = tmp4 <= tmp5
    tl.store(in_out_ptr0 + x3, tmp4, xmask)
    tl.store(out_ptr0 + x3, tmp6, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_threshold_backward_7(in_ptr0, in_ptr1,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 16 % 12
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr1 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp5 = 0.0
    tmp6 = tmp4 <= tmp5
    tl.store(out_ptr0 + x3, tmp6, xmask)


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) = args
    args.clear()
    assert_size_stride(primals_1, (4, 2, 4, 4), (32, 16, 4, 1))
    assert_size_stride(primals_2, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(primals_3, (48, 6, 1, 1), (6, 1, 1, 1))
    assert_size_stride(primals_4, (48,), (1,))
    assert_size_stride(primals_5, (12, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_6, (12,), (1,))
    assert_size_stride(primals_7, (48, 18, 1, 1), (18, 1, 1, 1))
    assert_size_stride(primals_8, (48,), (1,))
    assert_size_stride(primals_9, (12, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_10, (12,), (1,))
    assert_size_stride(primals_11, (48, 30, 1, 1), (30, 1, 1, 1))
    assert_size_stride(primals_12, (48,), (1,))
    assert_size_stride(primals_13, (12, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_14, (12,), (1,))
    assert_size_stride(primals_15, (48, 42, 1, 1), (42, 1, 1, 1))
    assert_size_stride(primals_16, (48,), (1,))
    assert_size_stride(primals_17, (12, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_18, (12,), (1,))
    assert_size_stride(primals_19, (48, 54, 1, 1), (54, 1, 1, 1))
    assert_size_stride(primals_20, (48,), (1,))
    assert_size_stride(primals_21, (12, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_22, (12,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 6, 4, 4), (96, 16, 4, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_cat_0[grid(384)](primals_1, primals_2, buf0, 384,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_1
        del primals_2
        buf1 = extern_kernels.convolution(buf0, primals_3, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 48, 4, 4), (768, 16, 4, 1))
        buf2 = buf1
        del buf1
        triton_poi_fused_convolution_relu_1[grid(3072)](buf2, primals_4, 
            3072, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_4
        buf3 = extern_kernels.convolution(buf2, primals_5, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (4, 12, 4, 4), (192, 16, 4, 1))
        buf4 = empty_strided_cuda((4, 18, 4, 4), (288, 16, 4, 1), torch.float32
            )
        triton_poi_fused_cat_2[grid(1152)](buf0, buf3, primals_6, buf4, 
            1152, XBLOCK=128, num_warps=4, num_stages=1)
        buf5 = extern_kernels.convolution(buf4, primals_7, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf5, (4, 48, 4, 4), (768, 16, 4, 1))
        buf6 = buf5
        del buf5
        triton_poi_fused_convolution_relu_1[grid(3072)](buf6, primals_8, 
            3072, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_8
        buf7 = extern_kernels.convolution(buf6, primals_9, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 12, 4, 4), (192, 16, 4, 1))
        buf8 = empty_strided_cuda((4, 30, 4, 4), (480, 16, 4, 1), torch.float32
            )
        triton_poi_fused_cat_3[grid(1920)](buf0, buf3, primals_6, buf7,
            primals_10, buf8, 1920, XBLOCK=256, num_warps=4, num_stages=1)
        buf9 = extern_kernels.convolution(buf8, primals_11, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf9, (4, 48, 4, 4), (768, 16, 4, 1))
        buf10 = buf9
        del buf9
        triton_poi_fused_convolution_relu_1[grid(3072)](buf10, primals_12, 
            3072, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_12
        buf11 = extern_kernels.convolution(buf10, primals_13, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf11, (4, 12, 4, 4), (192, 16, 4, 1))
        buf12 = empty_strided_cuda((4, 42, 4, 4), (672, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_4[grid(2688)](buf0, buf3, primals_6, buf7,
            primals_10, buf11, primals_14, buf12, 2688, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf13 = extern_kernels.convolution(buf12, primals_15, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf13, (4, 48, 4, 4), (768, 16, 4, 1))
        buf14 = buf13
        del buf13
        triton_poi_fused_convolution_relu_1[grid(3072)](buf14, primals_16, 
            3072, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_16
        buf15 = extern_kernels.convolution(buf14, primals_17, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf15, (4, 12, 4, 4), (192, 16, 4, 1))
        buf16 = empty_strided_cuda((4, 54, 4, 4), (864, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_5[grid(3456)](buf0, buf3, primals_6, buf7,
            primals_10, buf11, primals_14, buf15, primals_18, buf16, 3456,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf17 = extern_kernels.convolution(buf16, primals_19, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf17, (4, 48, 4, 4), (768, 16, 4, 1))
        buf18 = buf17
        del buf17
        triton_poi_fused_convolution_relu_1[grid(3072)](buf18, primals_20, 
            3072, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_20
        buf19 = extern_kernels.convolution(buf18, primals_21, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf19, (4, 12, 4, 4), (192, 16, 4, 1))
        buf20 = buf19
        del buf19
        buf21 = empty_strided_cuda((4, 12, 4, 4), (192, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_6[grid(768)](buf20
            , primals_22, buf21, 768, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_22
        buf22 = empty_strided_cuda((4, 12, 4, 4), (192, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_7[grid(768)](buf15
            , primals_18, buf22, 768, XBLOCK=128, num_warps=4, num_stages=1)
        del buf15
        del primals_18
        buf23 = empty_strided_cuda((4, 12, 4, 4), (192, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_7[grid(768)](buf11
            , primals_14, buf23, 768, XBLOCK=128, num_warps=4, num_stages=1)
        del buf11
        del primals_14
        buf24 = empty_strided_cuda((4, 12, 4, 4), (192, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_7[grid(768)](buf7,
            primals_10, buf24, 768, XBLOCK=128, num_warps=4, num_stages=1)
        del buf7
        del primals_10
        buf25 = empty_strided_cuda((4, 12, 4, 4), (192, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_7[grid(768)](buf3,
            primals_6, buf25, 768, XBLOCK=128, num_warps=4, num_stages=1)
        del buf3
        del primals_6
    return (buf20, primals_3, primals_5, primals_7, primals_9, primals_11,
        primals_13, primals_15, primals_17, primals_19, primals_21, buf0,
        buf2, buf4, buf6, buf8, buf10, buf12, buf14, buf16, buf18, buf21,
        buf22, buf23, buf24, buf25)


def xavier_init(module, gain=1, bias=0, distribution='normal'):
    assert distribution in ['uniform', 'normal']
    if distribution == 'uniform':
        nn.init.xavier_uniform_(module.weight, gain=gain)
    else:
        nn.init.xavier_normal_(module.weight, gain=gain)
    if hasattr(module, 'bias') and module.bias is not None:
        nn.init.constant_(module.bias, bias)


class DenseNet_convNew(nn.Module):
    """
    doc
    """

    def __init__(self, in_c, L=5, k=12, bn=False):
        """
        dense block
        :param in_c: input channel number
        :param L: layer number in dense block
        :param k: output channels of each layer in dense block
        :param bn: using bn or not
        """
        super(DenseNet_convNew, self).__init__()
        self.L = L
        self.k = k
        self.bn = bn
        self.conv1s = []
        self.conv2s = []
        self.bn1s = []
        self.bn2s = []
        for i in range(self.L):
            channel_in = i * self.k + in_c + 2
            conv1 = nn.Conv2d(channel_in, self.k * 4, kernel_size=1, stride=1)
            setattr(self, 'conv1_%i' % i, conv1)
            xavier_init(conv1)
            self.conv1s.append(conv1)
            if self.bn:
                bn1 = nn.BatchNorm2d(num_features=self.k * 4)
                setattr(self, 'bn1_%i' % i, bn1)
                self.bn1s.append(bn1)
            conv2 = nn.Conv2d(self.k * 4, self.k, kernel_size=3, stride=1,
                padding=1)
            setattr(self, 'conv2_%i' % i, conv2)
            xavier_init(conv2)
            self.conv2s.append(conv2)
            if self.bn:
                bn2 = nn.BatchNorm2d(num_features=self.k)
                setattr(self, 'bn2_%i' % i, bn2)
                self.bn2s.append(bn2)

    def forward(self, input_0, input_1):
        primals_3 = self.conv1_0.weight
        primals_4 = self.conv1_0.bias
        primals_5 = self.conv2_0.weight
        primals_6 = self.conv2_0.bias
        primals_7 = self.conv1_1.weight
        primals_8 = self.conv1_1.bias
        primals_9 = self.conv2_1.weight
        primals_10 = self.conv2_1.bias
        primals_11 = self.conv1_2.weight
        primals_12 = self.conv1_2.bias
        primals_13 = self.conv2_2.weight
        primals_14 = self.conv2_2.bias
        primals_15 = self.conv1_3.weight
        primals_16 = self.conv1_3.bias
        primals_17 = self.conv2_3.weight
        primals_18 = self.conv2_3.bias
        primals_19 = self.conv1_4.weight
        primals_20 = self.conv1_4.bias
        primals_21 = self.conv2_4.weight
        primals_22 = self.conv2_4.bias
        primals_1 = input_0
        primals_2 = input_1
        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])
        return output[0]


Measured latency_ms: 0.337629