import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_poi_fused_0(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 24
    xnumel = 9
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 3
    y1 = yindex // 3
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask & ymask, eviction_policy=
        'evict_last')
    tl.store(out_ptr0 + (y0 + 3 * x2 + 27 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_1(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 12
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    x2 = xindex
    y3 = yindex
    y0 = yindex % 3
    y1 = yindex // 3
    tmp0 = tl.load(in_ptr0 + (x2 + 4096 * y3), ymask, eviction_policy=
        'evict_last')
    tl.store(out_ptr0 + (y0 + 3 * x2 + 12288 * y1), tmp0, ymask)


@triton.jit
def triton_poi_fused_2(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 128
    xnumel = 9
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 8
    y1 = yindex // 8
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask & ymask, eviction_policy=
        'evict_last')
    tl.store(out_ptr0 + (y0 + 8 * x2 + 72 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_3(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 512
    xnumel = 9
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 16
    y1 = yindex // 16
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask & ymask, eviction_policy=
        'evict_last')
    tl.store(out_ptr0 + (y0 + 16 * x2 + 144 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_4(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    xnumel = 9
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 32
    y1 = yindex // 32
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask, eviction_policy='evict_last'
        )
    tl.store(out_ptr0 + (y0 + 32 * x2 + 288 * y1), tmp0, xmask)


@triton.jit
def triton_poi_fused_5(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    xnumel = 9
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 64
    y1 = yindex // 64
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask, eviction_policy='evict_last'
        )
    tl.store(out_ptr0 + (y0 + 64 * x2 + 576 * y1), tmp0, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_6(in_ptr0, in_ptr1, 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)
    x2 = xindex
    x0 = xindex % 8
    tmp0 = tl.load(in_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(out_ptr0 + x2, tmp4, None)
    tl.store(out_ptr1 + x2, tmp7, None)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_7(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 % 32
    x2 = xindex // 256
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 16 * x1 + 1024 * x2), None)
    tmp1 = tl.load(in_ptr0 + (8 + x0 + 16 * x1 + 1024 * x2), None)
    tmp3 = tl.load(in_ptr0 + (512 + x0 + 16 * x1 + 1024 * x2), None)
    tmp5 = tl.load(in_ptr0 + (520 + x0 + 16 * x1 + 1024 * x2), None)
    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 + x3, tmp6, None)
    tl.store(out_ptr1 + x3, tmp16, None)


@triton.jit
def triton_poi_fused_convolution_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)
    x2 = xindex
    x0 = xindex % 16
    tmp0 = tl.load(in_out_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x2, tmp2, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_9(in_ptr0, out_ptr0, out_ptr1,
    out_ptr2, xnumel, rnumel):
    XBLOCK: tl.constexpr = 1
    RBLOCK: tl.constexpr = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    tl.full([RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (16 * r1 + 16384 * (x0 // 16) + x0 % 16), None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tl.broadcast_to(tmp5, [RBLOCK])
    tmp8 = tl.broadcast_to(tmp6, [RBLOCK])
    tmp10 = triton_helpers.promote_to_tensor(tl.sum(tmp8, 0))
    tmp11 = tl.full([1], 1024, tl.int32)
    tmp12 = tmp11.to(tl.float32)
    tmp13 = tmp10 / tmp12
    tmp14 = tmp6 - tmp13
    tmp15 = tmp14 * tmp14
    tmp16 = tl.broadcast_to(tmp15, [RBLOCK])
    tmp18 = triton_helpers.promote_to_tensor(tl.sum(tmp16, 0))
    tmp19 = 1024.0
    tmp20 = tmp18 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tl.store(out_ptr2 + x0, tmp23, None)
    tl.store(out_ptr0 + x0, tmp13, None)
    tl.store(out_ptr1 + x0, tmp18, None)


@triton.jit
def triton_poi_fused__native_batch_norm_legit_10(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    xnumel = 64
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (16 * y0 + 16384 * (x1 // 16) + x1 % 16),
        xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + x1, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + x1, xmask, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 1024.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + (y0 + 1024 * x1), tmp14, xmask)


@triton.jit
def triton_poi_fused__native_batch_norm_legit_view_11(in_ptr0, out_ptr0,
    ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 1024
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 16
    y1 = yindex // 16
    tmp0 = tl.load(in_ptr0 + (x2 + 1024 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (y0 + 16 * x2 + 16384 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_12(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 % 16
    x2 = xindex // 256
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 32 * x1 + 1024 * x2), None)
    tmp1 = tl.load(in_ptr0 + (16 + x0 + 32 * x1 + 1024 * x2), None)
    tmp3 = tl.load(in_ptr0 + (512 + x0 + 32 * x1 + 1024 * x2), None)
    tmp5 = tl.load(in_ptr0 + (528 + x0 + 32 * x1 + 1024 * x2), None)
    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 + x3, tmp6, None)
    tl.store(out_ptr1 + x3, tmp16, None)


@triton.jit
def triton_poi_fused_convolution_13(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)
    x2 = xindex
    x0 = xindex % 32
    tmp0 = tl.load(in_out_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x2, tmp2, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_14(in_ptr0, out_ptr0,
    out_ptr1, out_ptr2, xnumel, rnumel):
    XBLOCK: tl.constexpr = 1
    RBLOCK: tl.constexpr = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    tl.full([RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (32 * r1 + 8192 * (x0 // 32) + x0 % 32), None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tl.broadcast_to(tmp5, [RBLOCK])
    tmp8 = tl.broadcast_to(tmp6, [RBLOCK])
    tmp10 = triton_helpers.promote_to_tensor(tl.sum(tmp8, 0))
    tmp11 = tl.full([1], 256, tl.int32)
    tmp12 = tmp11.to(tl.float32)
    tmp13 = tmp10 / tmp12
    tmp14 = tmp6 - tmp13
    tmp15 = tmp14 * tmp14
    tmp16 = tl.broadcast_to(tmp15, [RBLOCK])
    tmp18 = triton_helpers.promote_to_tensor(tl.sum(tmp16, 0))
    tmp19 = 256.0
    tmp20 = tmp18 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tl.store(out_ptr2 + x0, tmp23, None)
    tl.store(out_ptr0 + x0, tmp13, None)
    tl.store(out_ptr1 + x0, tmp18, None)


@triton.jit
def triton_poi_fused__native_batch_norm_legit_15(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 256
    xnumel = 128
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (32 * y0 + 8192 * (x1 // 32) + x1 % 32), xmask &
        ymask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + x1, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + x1, xmask, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 256.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + (y0 + 256 * x1), tmp14, xmask & ymask)


@triton.jit
def triton_poi_fused__native_batch_norm_legit_view_16(in_ptr0, out_ptr0,
    ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 128
    xnumel = 256
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 32
    y1 = yindex // 32
    tmp0 = tl.load(in_ptr0 + (x2 + 256 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (y0 + 32 * x2 + 8192 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_17(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 % 8
    x2 = xindex // 256
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 64 * x1 + 1024 * x2), None)
    tmp1 = tl.load(in_ptr0 + (32 + x0 + 64 * x1 + 1024 * x2), None)
    tmp3 = tl.load(in_ptr0 + (512 + x0 + 64 * x1 + 1024 * x2), None)
    tmp5 = tl.load(in_ptr0 + (544 + x0 + 64 * x1 + 1024 * x2), None)
    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 + x3, tmp6, None)
    tl.store(out_ptr1 + x3, tmp16, None)


@triton.jit
def triton_poi_fused_convolution_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)
    x2 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x2, tmp2, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_19(in_ptr0, out_ptr0,
    out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    RBLOCK: tl.constexpr = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (64 * r1 + 4096 * (x0 // 64) + x0 % 64), xmask,
        other=0.0)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tl.broadcast_to(tmp5, [XBLOCK, RBLOCK])
    tl.where(xmask, tmp6, 0)
    tmp9 = tl.broadcast_to(tmp6, [XBLOCK, RBLOCK])
    tmp11 = tl.where(xmask, tmp9, 0)
    tmp12 = tl.sum(tmp11, 1)[:, None]
    tmp13 = tl.full([XBLOCK, 1], 64, tl.int32)
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp12 / tmp14
    tmp16 = tmp6 - tmp15
    tmp17 = tmp16 * tmp16
    tmp18 = tl.broadcast_to(tmp17, [XBLOCK, RBLOCK])
    tmp20 = tl.where(xmask, tmp18, 0)
    tmp21 = tl.sum(tmp20, 1)[:, None]
    tmp22 = 64.0
    tmp23 = tmp21 / tmp22
    tmp24 = 1e-05
    tmp25 = tmp23 + tmp24
    tmp26 = libdevice.rsqrt(tmp25)
    tl.store(out_ptr2 + x0, tmp26, xmask)
    tl.store(out_ptr0 + x0, tmp15, xmask)
    tl.store(out_ptr1 + x0, tmp21, xmask)


@triton.jit
def triton_poi_fused__native_batch_norm_legit_20(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 256
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (64 * y0 + 4096 * (x1 // 64) + x1 % 64), xmask &
        ymask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + x1, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + x1, xmask, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 64.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + (y0 + 64 * x1), tmp14, xmask & ymask)


@triton.jit
def triton_poi_fused__native_batch_norm_legit_view_21(in_ptr0, out_ptr0,
    ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 256
    xnumel = 64
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 64
    y1 = yindex // 64
    tmp0 = tl.load(in_ptr0 + (x2 + 64 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tl.store(out_ptr0 + (y0 + 64 * x2 + 4096 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_22(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 % 64
    x1 = xindex // 64 % 4
    x2 = xindex // 256
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 128 * x1 + 1024 * x2), None)
    tmp1 = tl.load(in_ptr0 + (64 + x0 + 128 * x1 + 1024 * x2), None)
    tmp3 = tl.load(in_ptr0 + (512 + x0 + 128 * x1 + 1024 * x2), None)
    tmp5 = tl.load(in_ptr0 + (576 + x0 + 128 * x1 + 1024 * x2), None)
    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 + x3, tmp6, None)
    tl.store(out_ptr1 + x3, tmp16, None)


@triton.jit
def triton_poi_fused_convolution_23(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)
    x2 = xindex
    x0 = xindex % 128
    tmp0 = tl.load(in_out_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x2, tmp2, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_24(in_ptr0, out_ptr0,
    out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK: tl.constexpr):
    xnumel = 512
    RBLOCK: tl.constexpr = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (128 * r1 + 2048 * (x0 // 128) + x0 % 128),
        xmask, other=0.0)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tl.broadcast_to(tmp5, [XBLOCK, RBLOCK])
    tl.where(xmask, tmp6, 0)
    tmp9 = tl.broadcast_to(tmp6, [XBLOCK, RBLOCK])
    tmp11 = tl.where(xmask, tmp9, 0)
    tmp12 = tl.sum(tmp11, 1)[:, None]
    tmp13 = tl.full([XBLOCK, 1], 16, tl.int32)
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp12 / tmp14
    tmp16 = tmp6 - tmp15
    tmp17 = tmp16 * tmp16
    tmp18 = tl.broadcast_to(tmp17, [XBLOCK, RBLOCK])
    tmp20 = tl.where(xmask, tmp18, 0)
    tmp21 = tl.sum(tmp20, 1)[:, None]
    tmp22 = 16.0
    tmp23 = tmp21 / tmp22
    tmp24 = 1e-05
    tmp25 = tmp23 + tmp24
    tmp26 = libdevice.rsqrt(tmp25)
    tl.store(out_ptr2 + x0, tmp26, xmask)
    tl.store(out_ptr0 + x0, tmp15, xmask)
    tl.store(out_ptr1 + x0, tmp21, xmask)


@triton.jit
def triton_poi_fused__native_batch_norm_legit_25(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 16
    xnumel = 512
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (128 * y0 + 2048 * (x1 // 128) + x1 % 128), 
        xmask & ymask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + x1, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + x1, xmask, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 16.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + (y0 + 16 * x1), tmp14, xmask & ymask)


@triton.jit
def triton_poi_fused__native_batch_norm_legit_view_26(in_ptr0, out_ptr0,
    ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 512
    xnumel = 16
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 128
    y1 = yindex // 128
    tmp0 = tl.load(in_ptr0 + (x2 + 16 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tl.store(out_ptr0 + (y0 + 128 * x2 + 2048 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_27(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 % 128
    x1 = xindex // 128 % 2
    x2 = xindex // 256
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 256 * x1 + 1024 * x2), None)
    tmp1 = tl.load(in_ptr0 + (128 + x0 + 256 * x1 + 1024 * x2), None)
    tmp3 = tl.load(in_ptr0 + (512 + x0 + 256 * x1 + 1024 * x2), None)
    tmp5 = tl.load(in_ptr0 + (640 + x0 + 256 * x1 + 1024 * x2), None)
    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 + x3, tmp6, None)
    tl.store(out_ptr1 + x3, tmp16, None)


@triton.jit
def triton_poi_fused_convolution_sigmoid_28(in_out_ptr0, in_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 = tl.load(in_out_ptr0 + x0, xmask)
    tmp1 = tl.load(in_ptr0 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp3 = tmp0 + tmp2
    tmp4 = tl.sigmoid(tmp3)
    tl.store(in_out_ptr0 + x0, tmp4, 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) = args
    args.clear()
    assert_size_stride(primals_1, (8, 3, 3, 3), (27, 9, 3, 1))
    assert_size_stride(primals_2, (8,), (1,))
    assert_size_stride(primals_3, (4, 3, 64, 64), (12288, 4096, 64, 1))
    assert_size_stride(primals_4, (16, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_5, (16,), (1,))
    assert_size_stride(primals_6, (32, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_7, (32,), (1,))
    assert_size_stride(primals_8, (64, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_9, (64,), (1,))
    assert_size_stride(primals_10, (128, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_11, (128,), (1,))
    assert_size_stride(primals_12, (1, 128, 1, 1), (128, 1, 1, 1))
    assert_size_stride(primals_13, (1,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((8, 3, 3, 3), (27, 1, 9, 3), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_0[grid(24, 9)](primals_1, buf0, 24, 9, XBLOCK=16,
            YBLOCK=32, num_warps=4, num_stages=1)
        del primals_1
        buf1 = empty_strided_cuda((4, 3, 64, 64), (12288, 1, 192, 3), torch
            .float32)
        triton_poi_fused_1[grid(12, 4096)](primals_3, buf1, 12, 4096,
            XBLOCK=64, YBLOCK=16, num_warps=4, num_stages=1)
        del primals_3
        buf2 = empty_strided_cuda((16, 8, 3, 3), (72, 1, 24, 8), torch.float32)
        triton_poi_fused_2[grid(128, 9)](primals_4, buf2, 128, 9, XBLOCK=16,
            YBLOCK=64, num_warps=4, num_stages=1)
        del primals_4
        buf3 = empty_strided_cuda((32, 16, 3, 3), (144, 1, 48, 16), torch.
            float32)
        triton_poi_fused_3[grid(512, 9)](primals_6, buf3, 512, 9, XBLOCK=16,
            YBLOCK=64, num_warps=4, num_stages=1)
        del primals_6
        buf4 = empty_strided_cuda((64, 32, 3, 3), (288, 1, 96, 32), torch.
            float32)
        triton_poi_fused_4[grid(2048, 9)](primals_8, buf4, 2048, 9, XBLOCK=
            16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_8
        buf5 = empty_strided_cuda((128, 64, 3, 3), (576, 1, 192, 64), torch
            .float32)
        triton_poi_fused_5[grid(8192, 9)](primals_10, buf5, 8192, 9, XBLOCK
            =16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_10
        buf6 = extern_kernels.convolution(buf1, buf0, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf6, (4, 8, 64, 64), (32768, 1, 512, 8))
        buf7 = empty_strided_cuda((4, 8, 64, 64), (32768, 1, 512, 8), torch
            .bool)
        buf8 = empty_strided_cuda((4, 8, 64, 64), (32768, 1, 512, 8), torch
            .float32)
        triton_poi_fused_convolution_leaky_relu_6[grid(131072)](buf6,
            primals_2, buf7, buf8, 131072, XBLOCK=1024, num_warps=4,
            num_stages=1)
        del buf6
        del primals_2
        buf9 = empty_strided_cuda((4, 8, 32, 32), (8192, 1, 256, 8), torch.
            float32)
        buf10 = empty_strided_cuda((4, 8, 32, 32), (8192, 1, 256, 8), torch
            .int8)
        triton_poi_fused_max_pool2d_with_indices_7[grid(32768)](buf8, buf9,
            buf10, 32768, XBLOCK=128, num_warps=4, num_stages=1)
        buf11 = extern_kernels.convolution(buf9, buf2, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf11, (4, 16, 32, 32), (16384, 1, 512, 16))
        buf12 = buf11
        del buf11
        triton_poi_fused_convolution_8[grid(65536)](buf12, primals_5, 65536,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_5
        buf13 = empty_strided_cuda((1, 64, 1, 1), (64, 1, 64, 64), torch.
            float32)
        buf14 = empty_strided_cuda((1, 64, 1, 1), (64, 1, 64, 64), torch.
            float32)
        buf16 = empty_strided_cuda((1, 64, 1, 1), (64, 1, 64, 64), torch.
            float32)
        triton_per_fused__native_batch_norm_legit_9[grid(64)](buf12, buf13,
            buf14, buf16, 64, 1024, num_warps=8, num_stages=1)
        buf17 = empty_strided_cuda((1, 64, 32, 32), (65536, 1024, 32, 1),
            torch.float32)
        triton_poi_fused__native_batch_norm_legit_10[grid(1024, 64)](buf12,
            buf13, buf14, buf17, 1024, 64, XBLOCK=16, YBLOCK=256, num_warps
            =8, num_stages=1)
        del buf14
        buf18 = empty_strided_cuda((4, 16, 32, 32), (16384, 1, 512, 16),
            torch.float32)
        triton_poi_fused__native_batch_norm_legit_view_11[grid(64, 1024)](buf17
            , buf18, 64, 1024, XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del buf17
        buf19 = empty_strided_cuda((4, 16, 16, 16), (4096, 1, 256, 16),
            torch.float32)
        buf20 = empty_strided_cuda((4, 16, 16, 16), (4096, 1, 256, 16),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_12[grid(16384)](buf18,
            buf19, buf20, 16384, XBLOCK=256, num_warps=4, num_stages=1)
        buf21 = extern_kernels.convolution(buf19, buf3, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf21, (4, 32, 16, 16), (8192, 1, 512, 32))
        buf22 = buf21
        del buf21
        triton_poi_fused_convolution_13[grid(32768)](buf22, primals_7, 
            32768, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_7
        buf23 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf24 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf26 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_14[grid(128)](buf22,
            buf23, buf24, buf26, 128, 256, num_warps=2, num_stages=1)
        buf27 = empty_strided_cuda((1, 128, 16, 16), (32768, 256, 16, 1),
            torch.float32)
        triton_poi_fused__native_batch_norm_legit_15[grid(256, 128)](buf22,
            buf23, buf24, buf27, 256, 128, XBLOCK=32, YBLOCK=32, num_warps=
            4, num_stages=1)
        del buf24
        buf28 = empty_strided_cuda((4, 32, 16, 16), (8192, 1, 512, 32),
            torch.float32)
        triton_poi_fused__native_batch_norm_legit_view_16[grid(128, 256)](buf27
            , buf28, 128, 256, XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del buf27
        buf29 = empty_strided_cuda((4, 32, 8, 8), (2048, 1, 256, 32), torch
            .float32)
        buf30 = empty_strided_cuda((4, 32, 8, 8), (2048, 1, 256, 32), torch
            .int8)
        triton_poi_fused_max_pool2d_with_indices_17[grid(8192)](buf28,
            buf29, buf30, 8192, XBLOCK=128, num_warps=4, num_stages=1)
        buf31 = extern_kernels.convolution(buf29, buf4, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 64, 8, 8), (4096, 1, 512, 64))
        buf32 = buf31
        del buf31
        triton_poi_fused_convolution_18[grid(16384)](buf32, primals_9, 
            16384, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_9
        buf33 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf34 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf36 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_19[grid(256)](buf32,
            buf33, buf34, buf36, 256, 64, XBLOCK=32, num_warps=8, num_stages=1)
        buf37 = empty_strided_cuda((1, 256, 8, 8), (16384, 64, 8, 1), torch
            .float32)
        triton_poi_fused__native_batch_norm_legit_20[grid(64, 256)](buf32,
            buf33, buf34, buf37, 64, 256, XBLOCK=32, YBLOCK=32, num_warps=4,
            num_stages=1)
        del buf34
        buf38 = empty_strided_cuda((4, 64, 8, 8), (4096, 1, 512, 64), torch
            .float32)
        triton_poi_fused__native_batch_norm_legit_view_21[grid(256, 64)](buf37,
            buf38, 256, 64, XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del buf37
        buf39 = empty_strided_cuda((4, 64, 4, 4), (1024, 1, 256, 64), torch
            .float32)
        buf40 = empty_strided_cuda((4, 64, 4, 4), (1024, 1, 256, 64), torch
            .int8)
        triton_poi_fused_max_pool2d_with_indices_22[grid(4096)](buf38,
            buf39, buf40, 4096, XBLOCK=256, num_warps=4, num_stages=1)
        buf41 = extern_kernels.convolution(buf39, buf5, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf41, (4, 128, 4, 4), (2048, 1, 512, 128))
        buf42 = buf41
        del buf41
        triton_poi_fused_convolution_23[grid(8192)](buf42, primals_11, 8192,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_11
        buf43 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf44 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf46 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_24[grid(512)](buf42,
            buf43, buf44, buf46, 512, 16, XBLOCK=8, num_warps=2, num_stages=1)
        buf47 = empty_strided_cuda((1, 512, 4, 4), (8192, 16, 4, 1), torch.
            float32)
        triton_poi_fused__native_batch_norm_legit_25[grid(16, 512)](buf42,
            buf43, buf44, buf47, 16, 512, XBLOCK=16, YBLOCK=16, num_warps=4,
            num_stages=1)
        del buf44
        buf48 = empty_strided_cuda((4, 128, 4, 4), (2048, 1, 512, 128),
            torch.float32)
        triton_poi_fused__native_batch_norm_legit_view_26[grid(512, 16)](buf47,
            buf48, 512, 16, XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del buf47
        buf49 = empty_strided_cuda((4, 128, 2, 2), (512, 1, 256, 128),
            torch.float32)
        buf50 = empty_strided_cuda((4, 128, 2, 2), (512, 1, 256, 128),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_27[grid(2048)](buf48,
            buf49, buf50, 2048, XBLOCK=128, num_warps=4, num_stages=1)
        buf51 = extern_kernels.convolution(buf49, primals_12, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf51, (4, 1, 2, 2), (4, 1, 2, 1))
        buf52 = reinterpret_tensor(buf51, (4, 1, 2, 2), (4, 4, 2, 1), 0)
        del buf51
        triton_poi_fused_convolution_sigmoid_28[grid(16)](buf52, primals_13,
            16, XBLOCK=16, num_warps=1, num_stages=1)
        del primals_13
    return (buf52, buf0, buf1, buf2, buf3, buf4, buf5, primals_12, buf7,
        buf8, buf9, buf10, buf12, reinterpret_tensor(buf16, (64,), (1,), 0),
        buf18, buf19, buf20, buf22, reinterpret_tensor(buf26, (128,), (1,),
        0), buf28, buf29, buf30, buf32, reinterpret_tensor(buf36, (256,), (
        1,), 0), buf38, buf39, buf40, buf42, reinterpret_tensor(buf46, (512
        ,), (1,), 0), buf48, buf49, buf50, buf52, reinterpret_tensor(buf43,
        (1, 512, 1, 1), (512, 1, 1, 1), 0), reinterpret_tensor(buf33, (1, 
        256, 1, 1), (256, 1, 1, 1), 0), reinterpret_tensor(buf23, (1, 128, 
        1, 1), (128, 1, 1, 1), 0), reinterpret_tensor(buf13, (1, 64, 1, 1),
        (64, 1, 1, 1), 0))


class dis_cfNew(nn.Module):

    def __init__(self):
        super().__init__()
        self.d1 = nn.Conv2d(in_channels=3, out_channels=8, kernel_size=3,
            stride=1, padding=1)
        self.d2 = nn.Conv2d(in_channels=8, out_channels=16, kernel_size=3,
            stride=1, padding=1)
        self.d3 = nn.Conv2d(in_channels=16, out_channels=32, kernel_size=3,
            stride=1, padding=1)
        self.d4 = nn.Conv2d(in_channels=32, out_channels=64, kernel_size=3,
            stride=1, padding=1)
        self.d5 = nn.Conv2d(in_channels=64, out_channels=128, kernel_size=3,
            stride=1, padding=1)
        self.val = nn.Conv2d(in_channels=128, out_channels=1, kernel_size=1,
            stride=1, padding=0)
        self.maxpool = nn.MaxPool2d(2)

    def forward(self, input_0):
        primals_1 = self.d1.weight
        primals_2 = self.d1.bias
        primals_4 = self.d2.weight
        primals_5 = self.d2.bias
        primals_6 = self.d3.weight
        primals_7 = self.d3.bias
        primals_8 = self.d4.weight
        primals_9 = self.d4.bias
        primals_10 = self.d5.weight
        primals_11 = self.d5.bias
        primals_12 = self.val.weight
        primals_13 = self.val.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])
        return output[0]


Measured latency_ms: 0.183867