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_convolution_relu_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 % 32
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, 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, None)


@triton.jit
def triton_poi_fused_cat_1(in_ptr0, in_ptr1, in_ptr2, 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 % 6
    x0 = xindex % 4096
    x2 = xindex // 24576
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 3, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 4096 * x1 + 12288 * x2), tmp4, other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 6, tl.int64)
    tmp9 = tl.load(in_ptr1 + (x0 + 4096 * (-3 + x1) + 12288 * x2), tmp6,
        other=0.0)
    tmp10 = tl.load(in_ptr2 + (-3 + x1), tmp6, 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, None)


@triton.jit
def triton_poi_fused_convolution_relu_2(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 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, 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, None)


@triton.jit
def triton_poi_fused_convolution_3(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 // 1024 % 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_convolution_4(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 // 1024 % 128
    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_convolution_relu_5(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 // 1024 % 128
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, 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, None)


@triton.jit
def triton_poi_fused_convolution_6(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 // 256 % 512
    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_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 // 256 % 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_convolution_relu_8(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 // 256 % 256
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, 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, None)


@triton.jit
def triton_poi_fused_convolution_relu_9(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 // 256 % 512
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, 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, None)


@triton.jit
def triton_poi_fused_add_10(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)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x0, tmp2, None)


@triton.jit
def triton_poi_fused_convolution_relu_11(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 // 1024 % 256
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, 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, None)


@triton.jit
def triton_poi_fused_add_12(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)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x0, tmp2, None)


@triton.jit
def triton_poi_fused_add_clamp_convolution_ge_le_logical_and_13(in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, out_ptr1, 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 % 3
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x3, None)
    tmp2 = tl.load(in_ptr2 + x1, None, eviction_policy='evict_last')
    tmp3 = tmp1 + tmp2
    tmp4 = tmp0 + tmp3
    tmp5 = 0.0
    tmp6 = triton_helpers.maximum(tmp4, tmp5)
    tmp7 = 1.0
    tmp8 = triton_helpers.minimum(tmp6, tmp7)
    tmp9 = tmp4 >= tmp5
    tmp10 = tmp4 <= tmp7
    tmp11 = tmp9 & tmp10
    tl.store(out_ptr0 + x3, tmp8, None)
    tl.store(out_ptr1 + x3, tmp11, None)


@triton.jit
def triton_poi_fused_convolution_relu_threshold_backward_14(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)
    x3 = xindex
    x1 = xindex // 4096 % 3
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x1, None, 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, 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, primals_31, primals_32,
        primals_33, primals_34, primals_35, primals_36, primals_37,
        primals_38, primals_39, primals_40, primals_41, primals_42,
        primals_43, primals_44, primals_45, primals_46, primals_47,
        primals_48, primals_49, primals_50, primals_51, primals_52,
        primals_53, primals_54, primals_55, primals_56, primals_57,
        primals_58, primals_59, primals_60, primals_61) = args
    args.clear()
    assert_size_stride(primals_1, (32, 3, 3, 3), (27, 9, 3, 1))
    assert_size_stride(primals_2, (32,), (1,))
    assert_size_stride(primals_3, (4, 3, 64, 64), (12288, 4096, 64, 1))
    assert_size_stride(primals_4, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_5, (32,), (1,))
    assert_size_stride(primals_6, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_7, (32,), (1,))
    assert_size_stride(primals_8, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_9, (32,), (1,))
    assert_size_stride(primals_10, (3, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_11, (3,), (1,))
    assert_size_stride(primals_12, (64, 6, 3, 3), (54, 9, 3, 1))
    assert_size_stride(primals_13, (64,), (1,))
    assert_size_stride(primals_14, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_15, (64,), (1,))
    assert_size_stride(primals_16, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_17, (64,), (1,))
    assert_size_stride(primals_18, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_19, (64,), (1,))
    assert_size_stride(primals_20, (256, 64, 2, 2), (256, 4, 2, 1))
    assert_size_stride(primals_21, (256,), (1,))
    assert_size_stride(primals_22, (128, 256, 1, 1), (256, 1, 1, 1))
    assert_size_stride(primals_23, (128,), (1,))
    assert_size_stride(primals_24, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_25, (128,), (1,))
    assert_size_stride(primals_26, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_27, (128,), (1,))
    assert_size_stride(primals_28, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_29, (128,), (1,))
    assert_size_stride(primals_30, (512, 128, 2, 2), (512, 4, 2, 1))
    assert_size_stride(primals_31, (512,), (1,))
    assert_size_stride(primals_32, (256, 512, 1, 1), (512, 1, 1, 1))
    assert_size_stride(primals_33, (256,), (1,))
    assert_size_stride(primals_34, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_35, (256,), (1,))
    assert_size_stride(primals_36, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_37, (256,), (1,))
    assert_size_stride(primals_38, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_39, (256,), (1,))
    assert_size_stride(primals_40, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_41, (256,), (1,))
    assert_size_stride(primals_42, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_43, (256,), (1,))
    assert_size_stride(primals_44, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_45, (256,), (1,))
    assert_size_stride(primals_46, (512, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_47, (512,), (1,))
    assert_size_stride(primals_48, (512, 128, 2, 2), (512, 4, 2, 1))
    assert_size_stride(primals_49, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_50, (128,), (1,))
    assert_size_stride(primals_51, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_52, (128,), (1,))
    assert_size_stride(primals_53, (256, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_54, (256,), (1,))
    assert_size_stride(primals_55, (256, 64, 2, 2), (256, 4, 2, 1))
    assert_size_stride(primals_56, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_57, (64,), (1,))
    assert_size_stride(primals_58, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_59, (64,), (1,))
    assert_size_stride(primals_60, (3, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_61, (3,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = extern_kernels.convolution(primals_3, primals_1, stride=(1, 
            1), padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 32, 64, 64), (131072, 4096, 64, 1))
        buf1 = buf0
        del buf0
        get_raw_stream(0)
        triton_poi_fused_convolution_relu_0[grid(524288)](buf1, primals_2, 
            524288, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_2
        buf2 = extern_kernels.convolution(buf1, primals_4, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf2, (4, 32, 64, 64), (131072, 4096, 64, 1))
        buf3 = buf2
        del buf2
        triton_poi_fused_convolution_relu_0[grid(524288)](buf3, primals_5, 
            524288, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_5
        buf4 = extern_kernels.convolution(buf3, primals_6, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf4, (4, 32, 64, 64), (131072, 4096, 64, 1))
        buf5 = buf4
        del buf4
        triton_poi_fused_convolution_relu_0[grid(524288)](buf5, primals_7, 
            524288, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_7
        buf6 = extern_kernels.convolution(buf5, primals_8, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf6, (4, 32, 64, 64), (131072, 4096, 64, 1))
        buf7 = buf6
        del buf6
        triton_poi_fused_convolution_relu_0[grid(524288)](buf7, primals_9, 
            524288, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_9
        buf8 = extern_kernels.convolution(buf7, primals_10, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 3, 64, 64), (12288, 4096, 64, 1))
        buf9 = empty_strided_cuda((4, 6, 64, 64), (24576, 4096, 64, 1),
            torch.float32)
        triton_poi_fused_cat_1[grid(98304)](primals_3, buf8, primals_11,
            buf9, 98304, XBLOCK=512, num_warps=8, num_stages=1)
        buf10 = extern_kernels.convolution(buf9, primals_12, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf11 = buf10
        del buf10
        triton_poi_fused_convolution_relu_2[grid(1048576)](buf11,
            primals_13, 1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_13
        buf12 = extern_kernels.convolution(buf11, primals_14, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf12, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf13 = buf12
        del buf12
        triton_poi_fused_convolution_relu_2[grid(1048576)](buf13,
            primals_15, 1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_15
        buf14 = extern_kernels.convolution(buf13, primals_16, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf15 = buf14
        del buf14
        triton_poi_fused_convolution_relu_2[grid(1048576)](buf15,
            primals_17, 1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_17
        buf16 = extern_kernels.convolution(buf15, primals_18, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf17 = buf16
        del buf16
        triton_poi_fused_convolution_relu_2[grid(1048576)](buf17,
            primals_19, 1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_19
        buf18 = extern_kernels.convolution(buf17, primals_20, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 256, 32, 32), (262144, 1024, 32, 1))
        buf19 = buf18
        del buf18
        triton_poi_fused_convolution_3[grid(1048576)](buf19, primals_21, 
            1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_21
        buf20 = extern_kernels.convolution(buf19, primals_22, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 128, 32, 32), (131072, 1024, 32, 1))
        buf21 = buf20
        del buf20
        triton_poi_fused_convolution_4[grid(524288)](buf21, primals_23, 
            524288, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_23
        buf22 = extern_kernels.convolution(buf21, primals_24, 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, 32, 32), (131072, 1024, 32, 1))
        buf23 = buf22
        del buf22
        triton_poi_fused_convolution_relu_5[grid(524288)](buf23, primals_25,
            524288, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_25
        buf24 = extern_kernels.convolution(buf23, primals_26, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf24, (4, 128, 32, 32), (131072, 1024, 32, 1))
        buf25 = buf24
        del buf24
        triton_poi_fused_convolution_relu_5[grid(524288)](buf25, primals_27,
            524288, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_27
        buf26 = extern_kernels.convolution(buf25, primals_28, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf26, (4, 128, 32, 32), (131072, 1024, 32, 1))
        buf27 = buf26
        del buf26
        triton_poi_fused_convolution_relu_5[grid(524288)](buf27, primals_29,
            524288, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_29
        buf28 = extern_kernels.convolution(buf27, primals_30, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf28, (4, 512, 16, 16), (131072, 256, 16, 1))
        buf29 = buf28
        del buf28
        triton_poi_fused_convolution_6[grid(524288)](buf29, primals_31, 
            524288, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_31
        buf30 = extern_kernels.convolution(buf29, primals_32, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf30, (4, 256, 16, 16), (65536, 256, 16, 1))
        buf31 = buf30
        del buf30
        triton_poi_fused_convolution_7[grid(262144)](buf31, primals_33, 
            262144, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_33
        buf32 = extern_kernels.convolution(buf31, primals_34, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf32, (4, 256, 16, 16), (65536, 256, 16, 1))
        buf33 = buf32
        del buf32
        triton_poi_fused_convolution_relu_8[grid(262144)](buf33, primals_35,
            262144, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_35
        buf34 = extern_kernels.convolution(buf33, primals_36, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf34, (4, 256, 16, 16), (65536, 256, 16, 1))
        buf35 = buf34
        del buf34
        triton_poi_fused_convolution_relu_8[grid(262144)](buf35, primals_37,
            262144, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_37
        buf36 = extern_kernels.convolution(buf35, primals_38, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf36, (4, 256, 16, 16), (65536, 256, 16, 1))
        buf37 = buf36
        del buf36
        triton_poi_fused_convolution_relu_8[grid(262144)](buf37, primals_39,
            262144, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_39
        buf38 = extern_kernels.convolution(buf37, primals_40, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf38, (4, 256, 16, 16), (65536, 256, 16, 1))
        buf39 = buf38
        del buf38
        triton_poi_fused_convolution_relu_8[grid(262144)](buf39, primals_41,
            262144, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_41
        buf40 = extern_kernels.convolution(buf39, primals_42, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf40, (4, 256, 16, 16), (65536, 256, 16, 1))
        buf41 = buf40
        del buf40
        triton_poi_fused_convolution_relu_8[grid(262144)](buf41, primals_43,
            262144, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_43
        buf42 = extern_kernels.convolution(buf41, primals_44, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf42, (4, 256, 16, 16), (65536, 256, 16, 1))
        buf43 = buf42
        del buf42
        triton_poi_fused_convolution_relu_8[grid(262144)](buf43, primals_45,
            262144, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_45
        buf44 = extern_kernels.convolution(buf43, primals_46, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf44, (4, 512, 16, 16), (131072, 256, 16, 1))
        buf45 = buf44
        del buf44
        triton_poi_fused_convolution_relu_9[grid(524288)](buf45, primals_47,
            524288, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_47
        buf46 = extern_kernels.convolution(buf45, primals_48, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf46, (4, 128, 32, 32), (131072, 1024, 32, 1))
        buf47 = buf46
        del buf46
        triton_poi_fused_add_10[grid(524288)](buf47, buf27, 524288, XBLOCK=
            512, num_warps=8, num_stages=1)
        buf48 = extern_kernels.convolution(buf47, primals_49, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf48, (4, 128, 32, 32), (131072, 1024, 32, 1))
        buf49 = buf48
        del buf48
        triton_poi_fused_convolution_relu_5[grid(524288)](buf49, primals_50,
            524288, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_50
        buf50 = extern_kernels.convolution(buf49, primals_51, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf50, (4, 128, 32, 32), (131072, 1024, 32, 1))
        buf51 = buf50
        del buf50
        triton_poi_fused_convolution_relu_5[grid(524288)](buf51, primals_52,
            524288, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_52
        buf52 = extern_kernels.convolution(buf51, primals_53, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf52, (4, 256, 32, 32), (262144, 1024, 32, 1))
        buf53 = buf52
        del buf52
        triton_poi_fused_convolution_relu_11[grid(1048576)](buf53,
            primals_54, 1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_54
        buf54 = extern_kernels.convolution(buf53, primals_55, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf54, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf55 = buf54
        del buf54
        triton_poi_fused_add_12[grid(1048576)](buf55, buf17, 1048576,
            XBLOCK=1024, num_warps=4, num_stages=1)
        buf56 = extern_kernels.convolution(buf55, primals_56, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf56, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf57 = buf56
        del buf56
        triton_poi_fused_convolution_relu_2[grid(1048576)](buf57,
            primals_57, 1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_57
        buf58 = extern_kernels.convolution(buf57, primals_58, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf58, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf59 = buf58
        del buf58
        triton_poi_fused_convolution_relu_2[grid(1048576)](buf59,
            primals_59, 1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_59
        buf60 = extern_kernels.convolution(buf59, primals_60, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf60, (4, 3, 64, 64), (12288, 4096, 64, 1))
        buf61 = empty_strided_cuda((4, 3, 64, 64), (12288, 4096, 64, 1),
            torch.float32)
        buf62 = empty_strided_cuda((4, 3, 64, 64), (12288, 4096, 64, 1),
            torch.bool)
        triton_poi_fused_add_clamp_convolution_ge_le_logical_and_13[grid(49152)
            ](primals_3, buf60, primals_61, buf61, buf62, 49152, XBLOCK=256,
            num_warps=4, num_stages=1)
        del buf60
        del primals_61
        buf63 = empty_strided_cuda((4, 3, 64, 64), (12288, 4096, 64, 1),
            torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_14[grid(49152)](
            buf8, primals_11, buf63, 49152, XBLOCK=256, num_warps=4,
            num_stages=1)
        del buf8
        del primals_11
    return (buf61, primals_1, primals_3, primals_4, primals_6, primals_8,
        primals_10, primals_12, primals_14, primals_16, primals_18,
        primals_20, primals_22, primals_24, primals_26, primals_28,
        primals_30, primals_32, primals_34, primals_36, primals_38,
        primals_40, primals_42, primals_44, primals_46, primals_48,
        primals_49, primals_51, primals_53, primals_55, primals_56,
        primals_58, primals_60, buf1, buf3, buf5, buf7, buf9, buf11, buf13,
        buf15, buf17, buf19, buf21, buf23, buf25, buf27, buf29, buf31,
        buf33, buf35, buf37, buf39, buf41, buf43, buf45, buf47, buf49,
        buf51, buf53, buf55, buf57, buf59, buf62, buf63)


class ImageCleanModelNew(nn.Module):
    """ImageClean Model."""

    def __init__(self):
        """Init model."""
        super(ImageCleanModelNew, self).__init__()
        self.relu = nn.ReLU(inplace=True)
        self.E01 = nn.Conv2d(3, 32, kernel_size=[3, 3], stride=(1, 1),
            padding=(1, 1))
        self.E02 = nn.Conv2d(32, 32, kernel_size=[3, 3], stride=(1, 1),
            padding=(1, 1))
        self.E03 = nn.Conv2d(32, 32, kernel_size=[3, 3], stride=(1, 1),
            padding=(1, 1))
        self.E04 = nn.Conv2d(32, 32, kernel_size=[3, 3], stride=(1, 1),
            padding=(1, 1))
        self.E05 = nn.Conv2d(32, 3, kernel_size=[3, 3], stride=(1, 1),
            padding=(1, 1))
        self.DS01_layer00 = nn.Conv2d(6, 64, kernel_size=[3, 3], stride=(1,
            1), padding=(1, 1))
        self.DS01_layer01 = nn.Conv2d(64, 64, kernel_size=[3, 3], stride=(1,
            1), padding=(1, 1))
        self.DS01_layer02 = nn.Conv2d(64, 64, kernel_size=[3, 3], stride=(1,
            1), padding=(1, 1))
        self.DS01_layer03 = nn.Conv2d(64, 64, kernel_size=[3, 3], stride=(1,
            1), padding=(1, 1))
        self.DS02 = nn.Conv2d(64, 256, kernel_size=[2, 2], stride=(2, 2))
        self.DS02_layer00_cf = nn.Conv2d(256, 128, kernel_size=[1, 1],
            stride=(1, 1))
        self.DS02_layer00 = nn.Conv2d(128, 128, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.DS02_layer01 = nn.Conv2d(128, 128, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.DS02_layer02 = nn.Conv2d(128, 128, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.DS03 = nn.Conv2d(128, 512, kernel_size=[2, 2], stride=(2, 2))
        self.DS03_layer00_cf = nn.Conv2d(512, 256, kernel_size=[1, 1],
            stride=(1, 1))
        self.DS03_layer00 = nn.Conv2d(256, 256, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.DS03_layer01 = nn.Conv2d(256, 256, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.DS03_layer02 = nn.Conv2d(256, 256, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.UPS03_layer00 = nn.Conv2d(256, 256, kernel_size=[3, 3], stride
            =(1, 1), padding=(1, 1))
        self.UPS03_layer01 = nn.Conv2d(256, 256, kernel_size=[3, 3], stride
            =(1, 1), padding=(1, 1))
        self.UPS03_layer02 = nn.Conv2d(256, 256, kernel_size=[3, 3], stride
            =(1, 1), padding=(1, 1))
        self.UPS03_layer03 = nn.Conv2d(256, 512, kernel_size=[3, 3], stride
            =(1, 1), padding=(1, 1))
        self.USP02 = nn.ConvTranspose2d(512, 128, kernel_size=[2, 2],
            stride=(2, 2), bias=False)
        self.US02_layer00 = nn.Conv2d(128, 128, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.US02_layer01 = nn.Conv2d(128, 128, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.US02_layer02 = nn.Conv2d(128, 256, kernel_size=[3, 3], stride=
            (1, 1), padding=(1, 1))
        self.USP01 = nn.ConvTranspose2d(256, 64, kernel_size=[2, 2], stride
            =(2, 2), bias=False)
        self.US01_layer00 = nn.Conv2d(64, 64, kernel_size=[3, 3], stride=(1,
            1), padding=(1, 1))
        self.US01_layer01 = nn.Conv2d(64, 64, kernel_size=[3, 3], stride=(1,
            1), padding=(1, 1))
        self.US01_layer02 = nn.Conv2d(64, 3, kernel_size=[3, 3], stride=(1,
            1), padding=(1, 1))

    def forward(self, input_0):
        primals_1 = self.E01.weight
        primals_2 = self.E01.bias
        primals_4 = self.E02.weight
        primals_5 = self.E02.bias
        primals_6 = self.E03.weight
        primals_7 = self.E03.bias
        primals_8 = self.E04.weight
        primals_9 = self.E04.bias
        primals_10 = self.E05.weight
        primals_11 = self.E05.bias
        primals_12 = self.DS01_layer00.weight
        primals_13 = self.DS01_layer00.bias
        primals_14 = self.DS01_layer01.weight
        primals_15 = self.DS01_layer01.bias
        primals_16 = self.DS01_layer02.weight
        primals_17 = self.DS01_layer02.bias
        primals_18 = self.DS01_layer03.weight
        primals_19 = self.DS01_layer03.bias
        primals_20 = self.DS02.weight
        primals_21 = self.DS02.bias
        primals_22 = self.DS02_layer00_cf.weight
        primals_23 = self.DS02_layer00_cf.bias
        primals_24 = self.DS02_layer00.weight
        primals_25 = self.DS02_layer00.bias
        primals_26 = self.DS02_layer01.weight
        primals_27 = self.DS02_layer01.bias
        primals_28 = self.DS02_layer02.weight
        primals_29 = self.DS02_layer02.bias
        primals_30 = self.DS03.weight
        primals_31 = self.DS03.bias
        primals_32 = self.DS03_layer00_cf.weight
        primals_33 = self.DS03_layer00_cf.bias
        primals_34 = self.DS03_layer00.weight
        primals_35 = self.DS03_layer00.bias
        primals_36 = self.DS03_layer01.weight
        primals_37 = self.DS03_layer01.bias
        primals_38 = self.DS03_layer02.weight
        primals_39 = self.DS03_layer02.bias
        primals_40 = self.UPS03_layer00.weight
        primals_41 = self.UPS03_layer00.bias
        primals_42 = self.UPS03_layer01.weight
        primals_43 = self.UPS03_layer01.bias
        primals_44 = self.UPS03_layer02.weight
        primals_45 = self.UPS03_layer02.bias
        primals_46 = self.UPS03_layer03.weight
        primals_47 = self.UPS03_layer03.bias
        primals_48 = self.USP02.weight
        primals_49 = self.US02_layer00.weight
        primals_50 = self.US02_layer00.bias
        primals_51 = self.US02_layer01.weight
        primals_52 = self.US02_layer01.bias
        primals_53 = self.US02_layer02.weight
        primals_54 = self.US02_layer02.bias
        primals_55 = self.USP01.weight
        primals_56 = self.US01_layer00.weight
        primals_57 = self.US01_layer00.bias
        primals_58 = self.US01_layer01.weight
        primals_59 = self.US01_layer01.bias
        primals_60 = self.US01_layer02.weight
        primals_61 = self.US01_layer02.bias
        primals_3 = input_0
        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, primals_31, primals_32, primals_33, primals_34,
            primals_35, primals_36, primals_37, primals_38, primals_39,
            primals_40, primals_41, primals_42, primals_43, primals_44,
            primals_45, primals_46, primals_47, primals_48, primals_49,
            primals_50, primals_51, primals_52, primals_53, primals_54,
            primals_55, primals_56, primals_57, primals_58, primals_59,
            primals_60, primals_61])
        return output[0]


Measured latency_ms: 0.043222