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_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_max_pool2d_with_indices_1(in_ptr0, 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)
    x0 = xindex % 32
    x1 = xindex // 32
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x0 + 128 * x1), None, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 2 * x0 + 128 * x1), None, eviction_policy
        ='evict_last')
    tmp3 = tl.load(in_ptr0 + (64 + 2 * x0 + 128 * x1), None,
        eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (65 + 2 * x0 + 128 * x1), None,
        eviction_policy='evict_last')
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp7 = tmp1 > tmp0
    tmp8 = tl.full([1], 1, tl.int8)
    tmp9 = tl.full([1], 0, tl.int8)
    tmp10 = tl.where(tmp7, tmp8, tmp9)
    tmp11 = tmp3 > tmp2
    tmp12 = tl.full([1], 2, tl.int8)
    tmp13 = tl.where(tmp11, tmp12, tmp10)
    tmp14 = tmp5 > tmp4
    tmp15 = tl.full([1], 3, tl.int8)
    tmp16 = tl.where(tmp14, tmp15, tmp13)
    tl.store(out_ptr0 + x2, tmp6, None)
    tl.store(out_ptr1 + x2, 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 // 1024 % 48
    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_max_pool2d_with_indices_3(in_ptr0, 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)
    x0 = xindex % 16
    x1 = xindex // 16
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x0 + 64 * x1), None, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 2 * x0 + 64 * x1), None, eviction_policy=
        'evict_last')
    tmp3 = tl.load(in_ptr0 + (32 + 2 * x0 + 64 * x1), None, eviction_policy
        ='evict_last')
    tmp5 = tl.load(in_ptr0 + (33 + 2 * x0 + 64 * x1), None, eviction_policy
        ='evict_last')
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp7 = tmp1 > tmp0
    tmp8 = tl.full([1], 1, tl.int8)
    tmp9 = tl.full([1], 0, tl.int8)
    tmp10 = tl.where(tmp7, tmp8, tmp9)
    tmp11 = tmp3 > tmp2
    tmp12 = tl.full([1], 2, tl.int8)
    tmp13 = tl.where(tmp11, tmp12, tmp10)
    tmp14 = tmp5 > tmp4
    tmp15 = tl.full([1], 3, tl.int8)
    tmp16 = tl.where(tmp14, tmp15, tmp13)
    tl.store(out_ptr0 + x2, tmp6, None)
    tl.store(out_ptr1 + x2, tmp16, None)


@triton.jit
def triton_poi_fused_convolution_relu_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 // 256 % 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_max_pool2d_with_indices_5(in_ptr0, 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)
    x0 = xindex % 8
    x1 = xindex // 8
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x0 + 32 * x1), None, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 2 * x0 + 32 * x1), None, eviction_policy=
        'evict_last')
    tmp3 = tl.load(in_ptr0 + (16 + 2 * x0 + 32 * x1), None, eviction_policy
        ='evict_last')
    tmp5 = tl.load(in_ptr0 + (17 + 2 * x0 + 32 * x1), None, eviction_policy
        ='evict_last')
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp7 = tmp1 > tmp0
    tmp8 = tl.full([1], 1, tl.int8)
    tmp9 = tl.full([1], 0, tl.int8)
    tmp10 = tl.where(tmp7, tmp8, tmp9)
    tmp11 = tmp3 > tmp2
    tmp12 = tl.full([1], 2, tl.int8)
    tmp13 = tl.where(tmp11, tmp12, tmp10)
    tmp14 = tmp5 > tmp4
    tmp15 = tl.full([1], 3, tl.int8)
    tmp16 = tl.where(tmp14, tmp15, tmp13)
    tl.store(out_ptr0 + x2, tmp6, None)
    tl.store(out_ptr1 + x2, tmp16, None)


@triton.jit
def triton_poi_fused_convolution_relu_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 // 64 % 80
    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_max_pool2d_with_indices_7(in_ptr0, out_ptr0, out_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 5120
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = xindex // 4
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 2 * x0 + 16 * x1), xmask, eviction_policy
        ='evict_last')
    tmp3 = tl.load(in_ptr0 + (8 + 2 * x0 + 16 * x1), xmask, eviction_policy
        ='evict_last')
    tmp5 = tl.load(in_ptr0 + (9 + 2 * x0 + 16 * x1), xmask, eviction_policy
        ='evict_last')
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp7 = tmp1 > tmp0
    tmp8 = tl.full([1], 1, tl.int8)
    tmp9 = tl.full([1], 0, tl.int8)
    tmp10 = tl.where(tmp7, tmp8, tmp9)
    tmp11 = tmp3 > tmp2
    tmp12 = tl.full([1], 2, tl.int8)
    tmp13 = tl.where(tmp11, tmp12, tmp10)
    tmp14 = tmp5 > tmp4
    tmp15 = tl.full([1], 3, tl.int8)
    tmp16 = tl.where(tmp14, tmp15, tmp13)
    tl.store(out_ptr0 + x2, tmp6, xmask)
    tl.store(out_ptr1 + x2, tmp16, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_8(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 7168
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 16 % 112
    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_max_pool2d_with_indices_9(in_ptr0, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 1792
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x1 = xindex // 2
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x0 + 8 * x1), xmask, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 2 * x0 + 8 * x1), xmask, eviction_policy=
        'evict_last')
    tmp7 = tl.load(in_ptr0 + (4 + 2 * x0 + 8 * x1), xmask, eviction_policy=
        'evict_last')
    tmp12 = tl.load(in_ptr0 + (5 + 2 * x0 + 8 * x1), xmask, eviction_policy
        ='evict_last')
    tmp2 = tmp1 > tmp0
    tmp3 = tl.full([1], 1, tl.int8)
    tmp4 = tl.full([1], 0, tl.int8)
    tmp5 = tl.where(tmp2, tmp3, tmp4)
    tmp6 = triton_helpers.maximum(tmp1, tmp0)
    tmp8 = tmp7 > tmp6
    tmp9 = tl.full([1], 2, tl.int8)
    tmp10 = tl.where(tmp8, tmp9, tmp5)
    tmp11 = triton_helpers.maximum(tmp7, tmp6)
    tmp13 = tmp12 > tmp11
    tmp14 = tl.full([1], 3, tl.int8)
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    triton_helpers.maximum(tmp12, tmp11)
    tl.store(out_ptr0 + x2, tmp15, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_arange_mul_10(out_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 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 * tmp2
    tmp4 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp4, xmask)


@triton.jit
def triton_poi_fused_cat_11(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)
    x2 = xindex // 16 % 192
    x1 = xindex // 4 % 4
    x0 = xindex % 4
    x3 = xindex // 3072
    x4 = xindex % 16
    x5 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 112, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x1, tmp4, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.full([XBLOCK], 2, tl.int32)
    tmp7 = tmp5 + tmp6
    tmp8 = tmp5 < 0
    tmp9 = tl.where(tmp8, tmp7, tmp5)
    tmp10 = tl.load(in_ptr0 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp11 = tmp10 + tmp6
    tmp12 = tmp10 < 0
    tmp13 = tl.where(tmp12, tmp11, tmp10)
    tmp14 = tl.load(in_ptr1 + (2 * tmp13 + 8 * tmp9 + 16 * x2 + 1792 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp15 = tl.load(in_ptr1 + (1 + 2 * tmp13 + 8 * tmp9 + 16 * x2 + 1792 *
        x3), tmp4, eviction_policy='evict_last', other=0.0)
    tmp16 = triton_helpers.maximum(tmp15, tmp14)
    tmp17 = tl.load(in_ptr1 + (4 + 2 * tmp13 + 8 * tmp9 + 16 * x2 + 1792 *
        x3), tmp4, eviction_policy='evict_last', other=0.0)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp19 = tl.load(in_ptr1 + (5 + 2 * tmp13 + 8 * tmp9 + 16 * x2 + 1792 *
        x3), tmp4, eviction_policy='evict_last', other=0.0)
    tmp20 = triton_helpers.maximum(tmp19, tmp18)
    tmp21 = tl.full(tmp20.shape, 0.0, tmp20.dtype)
    tmp22 = tl.where(tmp4, tmp20, tmp21)
    tmp23 = tmp0 >= tmp3
    tl.full([1], 192, tl.int64)
    tmp26 = tl.load(in_ptr2 + (x4 + 16 * (-112 + x2) + 1280 * x3), tmp23,
        other=0.0)
    tmp27 = tl.where(tmp4, tmp22, tmp26)
    tl.store(out_ptr0 + x5, tmp27, None)


@triton.jit
def triton_poi_fused_convolution_relu_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)
    x3 = xindex
    x1 = xindex // 16 % 160
    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__to_copy_add_arange_mul_13(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 8
    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 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp4, xmask)


@triton.jit
def triton_poi_fused_cat_14(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)
    x2 = xindex // 64 % 224
    x1 = xindex // 8 % 8
    x0 = xindex % 8
    x3 = xindex // 14336
    x4 = xindex % 64
    x5 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 160, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x1, tmp4, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.full([XBLOCK], 4, tl.int32)
    tmp7 = tmp5 + tmp6
    tmp8 = tmp5 < 0
    tmp9 = tl.where(tmp8, tmp7, tmp5)
    tmp10 = tl.load(in_ptr0 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp11 = tmp10 + tmp6
    tmp12 = tmp10 < 0
    tmp13 = tl.where(tmp12, tmp11, tmp10)
    tmp14 = tl.load(in_ptr1 + (tmp13 + 4 * tmp9 + 16 * x2 + 2560 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp15 = tl.load(in_ptr2 + x2, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp16 = tmp14 + tmp15
    tmp17 = tl.full([1], 0, tl.int32)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp19 = tl.full(tmp18.shape, 0.0, tmp18.dtype)
    tmp20 = tl.where(tmp4, tmp18, tmp19)
    tmp21 = tmp0 >= tmp3
    tl.full([1], 224, tl.int64)
    tmp24 = tl.load(in_ptr3 + (x4 + 64 * (-160 + x2) + 4096 * x3), tmp21,
        other=0.0)
    tmp25 = tl.where(tmp4, tmp20, tmp24)
    tl.store(out_ptr0 + x5, tmp25, None)


@triton.jit
def triton_poi_fused_convolution_relu_15(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 // 64 % 112
    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__to_copy_add_arange_mul_16(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 16
    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 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp4, xmask)


@triton.jit
def triton_poi_fused_cat_17(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)
    x2 = xindex // 256 % 160
    x1 = xindex // 16 % 16
    x0 = xindex % 16
    x3 = xindex // 40960
    x4 = xindex % 256
    x5 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 112, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x1, tmp4, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.full([XBLOCK], 8, tl.int32)
    tmp7 = tmp5 + tmp6
    tmp8 = tmp5 < 0
    tmp9 = tl.where(tmp8, tmp7, tmp5)
    tmp10 = tl.load(in_ptr0 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp11 = tmp10 + tmp6
    tmp12 = tmp10 < 0
    tmp13 = tl.where(tmp12, tmp11, tmp10)
    tmp14 = tl.load(in_ptr1 + (tmp13 + 8 * tmp9 + 64 * x2 + 7168 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp15 = tl.load(in_ptr2 + x2, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp16 = tmp14 + tmp15
    tmp17 = tl.full([1], 0, tl.int32)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp19 = tl.full(tmp18.shape, 0.0, tmp18.dtype)
    tmp20 = tl.where(tmp4, tmp18, tmp19)
    tmp21 = tmp0 >= tmp3
    tl.full([1], 160, tl.int64)
    tmp24 = tl.load(in_ptr3 + (x4 + 256 * (-112 + x2) + 12288 * x3), tmp21,
        other=0.0)
    tmp25 = tl.where(tmp4, tmp20, tmp24)
    tl.store(out_ptr0 + x5, tmp25, None)


@triton.jit
def triton_poi_fused_convolution_relu_18(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 % 96
    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__to_copy_add_arange_mul_19(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 32
    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 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp4, xmask)


@triton.jit
def triton_poi_fused_cat_20(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)
    x2 = xindex // 1024 % 128
    x1 = xindex // 32 % 32
    x0 = xindex % 32
    x3 = xindex // 131072
    x4 = xindex % 1024
    x5 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 96, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x1, tmp4, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.full([XBLOCK], 16, tl.int32)
    tmp7 = tmp5 + tmp6
    tmp8 = tmp5 < 0
    tmp9 = tl.where(tmp8, tmp7, tmp5)
    tmp10 = tl.load(in_ptr0 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp11 = tmp10 + tmp6
    tmp12 = tmp10 < 0
    tmp13 = tl.where(tmp12, tmp11, tmp10)
    tmp14 = tl.load(in_ptr1 + (tmp13 + 16 * tmp9 + 256 * x2 + 24576 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp15 = tl.load(in_ptr2 + x2, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp16 = tmp14 + tmp15
    tmp17 = tl.full([1], 0, tl.int32)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp19 = tl.full(tmp18.shape, 0.0, tmp18.dtype)
    tmp20 = tl.where(tmp4, tmp18, tmp19)
    tmp21 = tmp0 >= tmp3
    tl.full([1], 128, tl.int64)
    tmp24 = tl.load(in_ptr3 + (x4 + 1024 * (-96 + x2) + 32768 * x3), tmp21,
        other=0.0)
    tmp25 = tl.where(tmp4, tmp20, tmp24)
    tl.store(out_ptr0 + x5, tmp25, None)


@triton.jit
def triton_poi_fused_convolution_relu_21(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 % 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__to_copy_add_arange_mul_22(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 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp4, xmask)


@triton.jit
def triton_poi_fused_cat_23(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)
    x2 = xindex // 4096 % 67
    x1 = xindex // 64 % 64
    x0 = xindex % 64
    x3 = xindex // 274432
    x4 = xindex % 4096
    x5 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 64, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x1, tmp4, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.full([XBLOCK], 32, tl.int32)
    tmp7 = tmp5 + tmp6
    tmp8 = tmp5 < 0
    tmp9 = tl.where(tmp8, tmp7, tmp5)
    tmp10 = tl.load(in_ptr0 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp11 = tmp10 + tmp6
    tmp12 = tmp10 < 0
    tmp13 = tl.where(tmp12, tmp11, tmp10)
    tmp14 = tl.load(in_ptr1 + (tmp13 + 32 * tmp9 + 1024 * x2 + 65536 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp15 = tl.load(in_ptr2 + x2, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp16 = tmp14 + tmp15
    tmp17 = tl.full([1], 0, tl.int32)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp19 = tl.full(tmp18.shape, 0.0, tmp18.dtype)
    tmp20 = tl.where(tmp4, tmp18, tmp19)
    tmp21 = tmp0 >= tmp3
    tl.full([1], 67, tl.int64)
    tmp24 = tl.load(in_ptr3 + (x4 + 4096 * (-64 + x2) + 12288 * x3), tmp21,
        other=0.0)
    tmp25 = tl.where(tmp4, tmp20, tmp24)
    tl.store(out_ptr0 + x5, tmp25, None)


@triton.jit
def triton_poi_fused_convolution_relu_24(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_25(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 % 3
    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_threshold_backward_26(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 // 1024 % 64
    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)


@triton.jit
def triton_poi_fused_convolution_relu_threshold_backward_27(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 // 256 % 96
    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)


@triton.jit
def triton_poi_fused_convolution_relu_threshold_backward_28(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 // 64 % 112
    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)


@triton.jit
def triton_poi_fused_convolution_relu_threshold_backward_29(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 // 16 % 160
    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) = 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, (48, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_7, (48,), (1,))
    assert_size_stride(primals_8, (64, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_9, (64,), (1,))
    assert_size_stride(primals_10, (80, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_11, (80,), (1,))
    assert_size_stride(primals_12, (112, 80, 3, 3), (720, 9, 3, 1))
    assert_size_stride(primals_13, (112,), (1,))
    assert_size_stride(primals_14, (160, 192, 3, 3), (1728, 9, 3, 1))
    assert_size_stride(primals_15, (160,), (1,))
    assert_size_stride(primals_16, (160, 160, 3, 3), (1440, 9, 3, 1))
    assert_size_stride(primals_17, (160,), (1,))
    assert_size_stride(primals_18, (112, 224, 3, 3), (2016, 9, 3, 1))
    assert_size_stride(primals_19, (112,), (1,))
    assert_size_stride(primals_20, (112, 112, 3, 3), (1008, 9, 3, 1))
    assert_size_stride(primals_21, (112,), (1,))
    assert_size_stride(primals_22, (96, 160, 3, 3), (1440, 9, 3, 1))
    assert_size_stride(primals_23, (96,), (1,))
    assert_size_stride(primals_24, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_25, (96,), (1,))
    assert_size_stride(primals_26, (64, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_27, (64,), (1,))
    assert_size_stride(primals_28, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_29, (64,), (1,))
    assert_size_stride(primals_30, (64, 67, 3, 3), (603, 9, 3, 1))
    assert_size_stride(primals_31, (64,), (1,))
    assert_size_stride(primals_32, (32, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_33, (32,), (1,))
    assert_size_stride(primals_34, (3, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_35, (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 = empty_strided_cuda((4, 32, 32, 32), (32768, 1024, 32, 1),
            torch.float32)
        buf5 = empty_strided_cuda((4, 32, 32, 32), (32768, 1024, 32, 1),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_1[grid(131072)](buf3, buf4,
            buf5, 131072, XBLOCK=512, num_warps=8, num_stages=1)
        buf6 = extern_kernels.convolution(buf4, primals_6, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf6, (4, 48, 32, 32), (49152, 1024, 32, 1))
        buf7 = buf6
        del buf6
        triton_poi_fused_convolution_relu_2[grid(196608)](buf7, primals_7, 
            196608, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_7
        buf8 = empty_strided_cuda((4, 48, 16, 16), (12288, 256, 16, 1),
            torch.float32)
        buf9 = empty_strided_cuda((4, 48, 16, 16), (12288, 256, 16, 1),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_3[grid(49152)](buf7, buf8,
            buf9, 49152, XBLOCK=512, num_warps=4, num_stages=1)
        buf10 = extern_kernels.convolution(buf8, primals_8, 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, 16, 16), (16384, 256, 16, 1))
        buf11 = buf10
        del buf10
        triton_poi_fused_convolution_relu_4[grid(65536)](buf11, primals_9, 
            65536, XBLOCK=512, num_warps=4, num_stages=1)
        del primals_9
        buf12 = empty_strided_cuda((4, 64, 8, 8), (4096, 64, 8, 1), torch.
            float32)
        buf13 = empty_strided_cuda((4, 64, 8, 8), (4096, 64, 8, 1), torch.int8)
        triton_poi_fused_max_pool2d_with_indices_5[grid(16384)](buf11,
            buf12, buf13, 16384, XBLOCK=256, num_warps=4, num_stages=1)
        buf14 = extern_kernels.convolution(buf12, primals_10, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 80, 8, 8), (5120, 64, 8, 1))
        buf15 = buf14
        del buf14
        triton_poi_fused_convolution_relu_6[grid(20480)](buf15, primals_11,
            20480, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_11
        buf16 = empty_strided_cuda((4, 80, 4, 4), (1280, 16, 4, 1), torch.
            float32)
        buf17 = empty_strided_cuda((4, 80, 4, 4), (1280, 16, 4, 1), torch.int8)
        triton_poi_fused_max_pool2d_with_indices_7[grid(5120)](buf15, buf16,
            buf17, 5120, XBLOCK=256, num_warps=4, num_stages=1)
        buf18 = extern_kernels.convolution(buf16, primals_12, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 112, 4, 4), (1792, 16, 4, 1))
        buf19 = buf18
        del buf18
        triton_poi_fused_convolution_relu_8[grid(7168)](buf19, primals_13, 
            7168, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_13
        buf20 = empty_strided_cuda((4, 112, 2, 2), (448, 4, 2, 1), torch.int8)
        triton_poi_fused_max_pool2d_with_indices_9[grid(1792)](buf19, buf20,
            1792, XBLOCK=128, num_warps=4, num_stages=1)
        buf21 = empty_strided_cuda((4,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_10[grid(4)](buf21, 4,
            XBLOCK=4, num_warps=1, num_stages=1)
        buf22 = empty_strided_cuda((4, 192, 4, 4), (3072, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_11[grid(12288)](buf21, buf19, buf16, buf22, 
            12288, XBLOCK=256, num_warps=4, num_stages=1)
        buf23 = extern_kernels.convolution(buf22, primals_14, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 160, 4, 4), (2560, 16, 4, 1))
        buf24 = buf23
        del buf23
        triton_poi_fused_convolution_relu_12[grid(10240)](buf24, primals_15,
            10240, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_15
        buf25 = extern_kernels.convolution(buf24, primals_16, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf25, (4, 160, 4, 4), (2560, 16, 4, 1))
        buf26 = empty_strided_cuda((8,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_13[grid(8)](buf26, 8,
            XBLOCK=8, num_warps=1, num_stages=1)
        buf27 = empty_strided_cuda((4, 224, 8, 8), (14336, 64, 8, 1), torch
            .float32)
        triton_poi_fused_cat_14[grid(57344)](buf26, buf25, primals_17,
            buf12, buf27, 57344, XBLOCK=512, num_warps=4, num_stages=1)
        buf28 = extern_kernels.convolution(buf27, primals_18, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf28, (4, 112, 8, 8), (7168, 64, 8, 1))
        buf29 = buf28
        del buf28
        triton_poi_fused_convolution_relu_15[grid(28672)](buf29, primals_19,
            28672, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_19
        buf30 = extern_kernels.convolution(buf29, primals_20, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf30, (4, 112, 8, 8), (7168, 64, 8, 1))
        buf31 = empty_strided_cuda((16,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_16[grid(16)](buf31, 16,
            XBLOCK=16, num_warps=1, num_stages=1)
        buf32 = empty_strided_cuda((4, 160, 16, 16), (40960, 256, 16, 1),
            torch.float32)
        triton_poi_fused_cat_17[grid(163840)](buf31, buf30, primals_21,
            buf8, buf32, 163840, XBLOCK=512, num_warps=8, num_stages=1)
        buf33 = extern_kernels.convolution(buf32, primals_22, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf33, (4, 96, 16, 16), (24576, 256, 16, 1))
        buf34 = buf33
        del buf33
        triton_poi_fused_convolution_relu_18[grid(98304)](buf34, primals_23,
            98304, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_23
        buf35 = extern_kernels.convolution(buf34, primals_24, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf35, (4, 96, 16, 16), (24576, 256, 16, 1))
        buf36 = empty_strided_cuda((32,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_19[grid(32)](buf36, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf37 = empty_strided_cuda((4, 128, 32, 32), (131072, 1024, 32, 1),
            torch.float32)
        triton_poi_fused_cat_20[grid(524288)](buf36, buf35, primals_25,
            buf4, buf37, 524288, XBLOCK=1024, num_warps=4, num_stages=1)
        buf38 = extern_kernels.convolution(buf37, primals_26, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf38, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf39 = buf38
        del buf38
        triton_poi_fused_convolution_relu_21[grid(262144)](buf39,
            primals_27, 262144, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_27
        buf40 = extern_kernels.convolution(buf39, primals_28, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf40, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf41 = empty_strided_cuda((64,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_22[grid(64)](buf41, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf42 = empty_strided_cuda((4, 67, 64, 64), (274432, 4096, 64, 1),
            torch.float32)
        triton_poi_fused_cat_23[grid(1097728)](buf41, buf40, primals_29,
            primals_3, buf42, 1097728, XBLOCK=1024, num_warps=4, num_stages=1)
        buf43 = extern_kernels.convolution(buf42, primals_30, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf43, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf44 = buf43
        del buf43
        triton_poi_fused_convolution_relu_24[grid(1048576)](buf44,
            primals_31, 1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_31
        buf45 = extern_kernels.convolution(buf44, primals_32, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf45, (4, 32, 64, 64), (131072, 4096, 64, 1))
        buf46 = buf45
        del buf45
        triton_poi_fused_convolution_relu_0[grid(524288)](buf46, primals_33,
            524288, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_33
        buf47 = extern_kernels.convolution(buf46, primals_34, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf47, (4, 3, 64, 64), (12288, 4096, 64, 1))
        buf48 = buf47
        del buf47
        triton_poi_fused_convolution_25[grid(49152)](buf48, primals_35, 
            49152, XBLOCK=512, num_warps=4, num_stages=1)
        del primals_35
        buf49 = empty_strided_cuda((4, 64, 32, 32), (65536, 1024, 32, 1),
            torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_26[grid(262144)](
            buf40, primals_29, buf49, 262144, XBLOCK=1024, num_warps=4,
            num_stages=1)
        del buf40
        del primals_29
        buf50 = empty_strided_cuda((4, 96, 16, 16), (24576, 256, 16, 1),
            torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_27[grid(98304)](
            buf35, primals_25, buf50, 98304, XBLOCK=1024, num_warps=4,
            num_stages=1)
        del buf35
        del primals_25
        buf51 = empty_strided_cuda((4, 112, 8, 8), (7168, 64, 8, 1), torch.bool
            )
        triton_poi_fused_convolution_relu_threshold_backward_28[grid(28672)](
            buf30, primals_21, buf51, 28672, XBLOCK=256, num_warps=4,
            num_stages=1)
        del buf30
        del primals_21
        buf52 = empty_strided_cuda((4, 160, 4, 4), (2560, 16, 4, 1), torch.bool
            )
        triton_poi_fused_convolution_relu_threshold_backward_29[grid(10240)](
            buf25, primals_17, buf52, 10240, XBLOCK=256, num_warps=4,
            num_stages=1)
        del buf25
        del primals_17
    return (buf48, 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, buf1, buf3, buf4, buf5, buf7,
        buf8, buf9, buf11, buf12, buf13, buf15, buf16, buf17, buf19, buf20,
        buf21, buf22, buf24, buf26, buf27, buf29, buf31, buf32, buf34,
        buf36, buf37, buf39, buf41, buf42, buf44, buf46, buf49, buf50,
        buf51, buf52)


def Conv(in_channels, out_channels):
    return nn.Conv2d(in_channels, out_channels, 3, padding=1)


def concat(a, b):
    return torch.cat((a, b), 1)


def pool(x):
    return F.max_pool2d(x, 2, 2)


def relu(x):
    return F.relu(x, inplace=True)


def upsample(x):
    return F.interpolate(x, scale_factor=2, mode='nearest')


class AutoencoderNew(nn.Module):

    def __init__(self, in_channels=3, out_channels=3):
        super(AutoencoderNew, self).__init__()
        ic = in_channels
        ec1 = 32
        ec2 = 48
        ec3 = 64
        ec4 = 80
        ec5 = 112
        dc5 = 160
        dc4 = 112
        dc3 = 96
        dc2 = 64
        dc1a = 64
        dc1b = 32
        oc = out_channels
        self.enc_conv0 = Conv(ic, ec1)
        self.enc_conv1 = Conv(ec1, ec1)
        self.enc_conv2 = Conv(ec1, ec2)
        self.enc_conv3 = Conv(ec2, ec3)
        self.enc_conv4 = Conv(ec3, ec4)
        self.enc_conv5 = Conv(ec4, ec5)
        self.dec_conv5a = Conv(ec5 + ec4, dc5)
        self.dec_conv5b = Conv(dc5, dc5)
        self.dec_conv4a = Conv(dc5 + ec3, dc4)
        self.dec_conv4b = Conv(dc4, dc4)
        self.dec_conv3a = Conv(dc4 + ec2, dc3)
        self.dec_conv3b = Conv(dc3, dc3)
        self.dec_conv2a = Conv(dc3 + ec1, dc2)
        self.dec_conv2b = Conv(dc2, dc2)
        self.dec_conv1a = Conv(dc2 + ic, dc1a)
        self.dec_conv1b = Conv(dc1a, dc1b)
        self.dec_conv0 = Conv(dc1b, oc)

    def forward(self, input_0):
        primals_1 = self.enc_conv0.weight
        primals_2 = self.enc_conv0.bias
        primals_4 = self.enc_conv1.weight
        primals_5 = self.enc_conv1.bias
        primals_6 = self.enc_conv2.weight
        primals_7 = self.enc_conv2.bias
        primals_8 = self.enc_conv3.weight
        primals_9 = self.enc_conv3.bias
        primals_10 = self.enc_conv4.weight
        primals_11 = self.enc_conv4.bias
        primals_12 = self.enc_conv5.weight
        primals_13 = self.enc_conv5.bias
        primals_14 = self.dec_conv5a.weight
        primals_15 = self.dec_conv5a.bias
        primals_16 = self.dec_conv5b.weight
        primals_17 = self.dec_conv5b.bias
        primals_18 = self.dec_conv4a.weight
        primals_19 = self.dec_conv4a.bias
        primals_20 = self.dec_conv4b.weight
        primals_21 = self.dec_conv4b.bias
        primals_22 = self.dec_conv3a.weight
        primals_23 = self.dec_conv3a.bias
        primals_24 = self.dec_conv3b.weight
        primals_25 = self.dec_conv3b.bias
        primals_26 = self.dec_conv2a.weight
        primals_27 = self.dec_conv2a.bias
        primals_28 = self.dec_conv2b.weight
        primals_29 = self.dec_conv2b.bias
        primals_30 = self.dec_conv1a.weight
        primals_31 = self.dec_conv1a.bias
        primals_32 = self.dec_conv1b.weight
        primals_33 = self.dec_conv1b.bias
        primals_34 = self.dec_conv0.weight
        primals_35 = self.dec_conv0.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])
        return output[0]


Measured latency_ms: 0.015096