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.utils.data
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 = 192
    xnumel = 121
    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 + 121 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (y0 + 3 * x2 + 363 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_1(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    xnumel = 25
    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 + 25 * y3), xmask, eviction_policy=
        'evict_last')
    tl.store(out_ptr0 + (y0 + 64 * x2 + 1600 * y1), tmp0, xmask)


@triton.jit
def triton_poi_fused_2(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    xnumel = 9
    yoffset = (tl.program_id(1) + tl.program_id(2) * tl.num_programs(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 % 192
    y1 = yindex // 192
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask, eviction_policy='evict_last'
        )
    tl.store(out_ptr0 + (y0 + 192 * x2 + 1728 * y1), tmp0, xmask)


@triton.jit
def triton_poi_fused_3(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    xnumel = 9
    yoffset = (tl.program_id(1) + tl.program_id(2) * tl.num_programs(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 % 384
    y1 = yindex // 384
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask, eviction_policy='evict_last'
        )
    tl.store(out_ptr0 + (y0 + 384 * x2 + 3456 * y1), tmp0, xmask)


@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) + tl.program_id(2) * tl.num_programs(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 % 256
    y1 = yindex // 256
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask, eviction_policy='evict_last'
        )
    tl.store(out_ptr0 + (y0 + 256 * x2 + 2304 * y1), tmp0, xmask)


@triton.jit
def triton_poi_fused_div_sub_5(in_ptr0, out_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 % 3
    x1 = xindex // 3
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 4 * x1), None)
    tmp1 = 0.00392156862745098
    tmp2 = tmp0 * tmp1
    tmp3 = 0.5071
    tmp4 = tmp2 - tmp3
    tmp5 = 3.7383177570093458
    tmp6 = tmp4 * tmp5
    tmp7 = 0.4867
    tmp8 = tmp6 - tmp7
    tmp9 = 3.898635477582846
    tmp10 = tmp8 * tmp9
    tmp11 = 0.4408
    tmp12 = tmp10 - tmp11
    tmp13 = 3.621876131836291
    tmp14 = tmp12 * tmp13
    tl.store(out_ptr0 + x2, tmp14, None)


@triton.jit
def triton_poi_fused_convolution_relu_6(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 61504
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, 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 + x2, tmp4, xmask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_7(in_ptr0, out_ptr0, out_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 14400
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 64
    x1 = xindex // 64 % 15
    x2 = xindex // 960
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 128 * x1 + 3968 * x2), xmask)
    tmp1 = tl.load(in_ptr0 + (64 + x0 + 128 * x1 + 3968 * x2), xmask)
    tmp3 = tl.load(in_ptr0 + (128 + x0 + 128 * x1 + 3968 * x2), xmask)
    tmp5 = tl.load(in_ptr0 + (1984 + x0 + 128 * x1 + 3968 * x2), xmask)
    tmp7 = tl.load(in_ptr0 + (2048 + x0 + 128 * x1 + 3968 * x2), xmask)
    tmp9 = tl.load(in_ptr0 + (2112 + x0 + 128 * x1 + 3968 * x2), xmask)
    tmp11 = tl.load(in_ptr0 + (3968 + x0 + 128 * x1 + 3968 * x2), xmask)
    tmp13 = tl.load(in_ptr0 + (4032 + x0 + 128 * x1 + 3968 * x2), xmask)
    tmp15 = tl.load(in_ptr0 + (4096 + x0 + 128 * x1 + 3968 * x2), xmask)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tmp12 = triton_helpers.maximum(tmp11, tmp10)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp16 = triton_helpers.maximum(tmp15, tmp14)
    tmp17 = tmp1 > tmp0
    tmp18 = tl.full([1], 1, tl.int8)
    tmp19 = tl.full([1], 0, tl.int8)
    tmp20 = tl.where(tmp17, tmp18, tmp19)
    tmp21 = tmp3 > tmp2
    tmp22 = tl.full([1], 2, tl.int8)
    tmp23 = tl.where(tmp21, tmp22, tmp20)
    tmp24 = tmp5 > tmp4
    tmp25 = tl.full([1], 3, tl.int8)
    tmp26 = tl.where(tmp24, tmp25, tmp23)
    tmp27 = tmp7 > tmp6
    tmp28 = tl.full([1], 4, tl.int8)
    tmp29 = tl.where(tmp27, tmp28, tmp26)
    tmp30 = tmp9 > tmp8
    tmp31 = tl.full([1], 5, tl.int8)
    tmp32 = tl.where(tmp30, tmp31, tmp29)
    tmp33 = tmp11 > tmp10
    tmp34 = tl.full([1], 6, tl.int8)
    tmp35 = tl.where(tmp33, tmp34, tmp32)
    tmp36 = tmp13 > tmp12
    tmp37 = tl.full([1], 7, tl.int8)
    tmp38 = tl.where(tmp36, tmp37, tmp35)
    tmp39 = tmp15 > tmp14
    tmp40 = tl.full([1], 8, tl.int8)
    tmp41 = tl.where(tmp39, tmp40, tmp38)
    tl.store(out_ptr0 + x3, tmp16, xmask)
    tl.store(out_ptr1 + x3, tmp41, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_8(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 43200
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 192
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, 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 + x2, tmp4, xmask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_9(in_ptr0, out_ptr0, out_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 9408
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 192
    x1 = xindex // 192 % 7
    x2 = xindex // 1344
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 384 * x1 + 5760 * x2), xmask)
    tmp1 = tl.load(in_ptr0 + (192 + x0 + 384 * x1 + 5760 * x2), xmask)
    tmp3 = tl.load(in_ptr0 + (384 + x0 + 384 * x1 + 5760 * x2), xmask)
    tmp5 = tl.load(in_ptr0 + (2880 + x0 + 384 * x1 + 5760 * x2), xmask)
    tmp7 = tl.load(in_ptr0 + (3072 + x0 + 384 * x1 + 5760 * x2), xmask)
    tmp9 = tl.load(in_ptr0 + (3264 + x0 + 384 * x1 + 5760 * x2), xmask)
    tmp11 = tl.load(in_ptr0 + (5760 + x0 + 384 * x1 + 5760 * x2), xmask)
    tmp13 = tl.load(in_ptr0 + (5952 + x0 + 384 * x1 + 5760 * x2), xmask)
    tmp15 = tl.load(in_ptr0 + (6144 + x0 + 384 * x1 + 5760 * x2), xmask)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tmp12 = triton_helpers.maximum(tmp11, tmp10)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp16 = triton_helpers.maximum(tmp15, tmp14)
    tmp17 = tmp1 > tmp0
    tmp18 = tl.full([1], 1, tl.int8)
    tmp19 = tl.full([1], 0, tl.int8)
    tmp20 = tl.where(tmp17, tmp18, tmp19)
    tmp21 = tmp3 > tmp2
    tmp22 = tl.full([1], 2, tl.int8)
    tmp23 = tl.where(tmp21, tmp22, tmp20)
    tmp24 = tmp5 > tmp4
    tmp25 = tl.full([1], 3, tl.int8)
    tmp26 = tl.where(tmp24, tmp25, tmp23)
    tmp27 = tmp7 > tmp6
    tmp28 = tl.full([1], 4, tl.int8)
    tmp29 = tl.where(tmp27, tmp28, tmp26)
    tmp30 = tmp9 > tmp8
    tmp31 = tl.full([1], 5, tl.int8)
    tmp32 = tl.where(tmp30, tmp31, tmp29)
    tmp33 = tmp11 > tmp10
    tmp34 = tl.full([1], 6, tl.int8)
    tmp35 = tl.where(tmp33, tmp34, tmp32)
    tmp36 = tmp13 > tmp12
    tmp37 = tl.full([1], 7, tl.int8)
    tmp38 = tl.where(tmp36, tmp37, tmp35)
    tmp39 = tmp15 > tmp14
    tmp40 = tl.full([1], 8, tl.int8)
    tmp41 = tl.where(tmp39, tmp40, tmp38)
    tl.store(out_ptr0 + x3, tmp16, xmask)
    tl.store(out_ptr1 + x3, tmp41, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_10(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 18816
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 384
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, 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 + x2, tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_11(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 12544
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 256
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, 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 + x2, tmp4, xmask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_12(in_ptr0, out_ptr0, out_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x1 = xindex // 256 % 3
    x2 = xindex // 768
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 512 * x1 + 3584 * x2), xmask)
    tmp1 = tl.load(in_ptr0 + (256 + x0 + 512 * x1 + 3584 * x2), xmask)
    tmp3 = tl.load(in_ptr0 + (512 + x0 + 512 * x1 + 3584 * x2), xmask)
    tmp5 = tl.load(in_ptr0 + (1792 + x0 + 512 * x1 + 3584 * x2), xmask)
    tmp7 = tl.load(in_ptr0 + (2048 + x0 + 512 * x1 + 3584 * x2), xmask)
    tmp9 = tl.load(in_ptr0 + (2304 + x0 + 512 * x1 + 3584 * x2), xmask)
    tmp11 = tl.load(in_ptr0 + (3584 + x0 + 512 * x1 + 3584 * x2), xmask)
    tmp13 = tl.load(in_ptr0 + (3840 + x0 + 512 * x1 + 3584 * x2), xmask)
    tmp15 = tl.load(in_ptr0 + (4096 + x0 + 512 * x1 + 3584 * x2), xmask)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tmp12 = triton_helpers.maximum(tmp11, tmp10)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp16 = triton_helpers.maximum(tmp15, tmp14)
    tmp17 = tmp1 > tmp0
    tmp18 = tl.full([1], 1, tl.int8)
    tmp19 = tl.full([1], 0, tl.int8)
    tmp20 = tl.where(tmp17, tmp18, tmp19)
    tmp21 = tmp3 > tmp2
    tmp22 = tl.full([1], 2, tl.int8)
    tmp23 = tl.where(tmp21, tmp22, tmp20)
    tmp24 = tmp5 > tmp4
    tmp25 = tl.full([1], 3, tl.int8)
    tmp26 = tl.where(tmp24, tmp25, tmp23)
    tmp27 = tmp7 > tmp6
    tmp28 = tl.full([1], 4, tl.int8)
    tmp29 = tl.where(tmp27, tmp28, tmp26)
    tmp30 = tmp9 > tmp8
    tmp31 = tl.full([1], 5, tl.int8)
    tmp32 = tl.where(tmp30, tmp31, tmp29)
    tmp33 = tmp11 > tmp10
    tmp34 = tl.full([1], 6, tl.int8)
    tmp35 = tl.where(tmp33, tmp34, tmp32)
    tmp36 = tmp13 > tmp12
    tmp37 = tl.full([1], 7, tl.int8)
    tmp38 = tl.where(tmp36, tmp37, tmp35)
    tmp39 = tmp15 > tmp14
    tmp40 = tl.full([1], 8, tl.int8)
    tmp41 = tl.where(tmp39, tmp40, tmp38)
    tl.store(out_ptr0 + x3, tmp16, xmask)
    tl.store(out_ptr1 + x3, tmp41, xmask)


@triton.jit
def triton_poi_fused_clone_13(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl
    .constexpr, XBLOCK: tl.constexpr):
    ynumel = 256
    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
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 256 * x1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x1 + 9 * y0), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_relu_14(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
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x0, tmp4, None)


@triton.jit
def triton_poi_fused_relu_15(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 1024
    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 + x0, xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    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, primals_14, primals_15, primals_16, primals_17) = args
    args.clear()
    assert_size_stride(primals_1, (128, 128, 4), (512, 4, 1))
    assert_size_stride(primals_2, (64, 3, 11, 11), (363, 121, 11, 1))
    assert_size_stride(primals_3, (64,), (1,))
    assert_size_stride(primals_4, (192, 64, 5, 5), (1600, 25, 5, 1))
    assert_size_stride(primals_5, (192,), (1,))
    assert_size_stride(primals_6, (384, 192, 3, 3), (1728, 9, 3, 1))
    assert_size_stride(primals_7, (384,), (1,))
    assert_size_stride(primals_8, (256, 384, 3, 3), (3456, 9, 3, 1))
    assert_size_stride(primals_9, (256,), (1,))
    assert_size_stride(primals_10, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_11, (256,), (1,))
    assert_size_stride(primals_12, (4096, 2304), (2304, 1))
    assert_size_stride(primals_13, (4096,), (1,))
    assert_size_stride(primals_14, (1024, 4096), (4096, 1))
    assert_size_stride(primals_15, (1024,), (1,))
    assert_size_stride(primals_16, (100, 1024), (1024, 1))
    assert_size_stride(primals_17, (100,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((64, 3, 11, 11), (363, 1, 33, 3), torch.
            float32)
        get_raw_stream(0)
        triton_poi_fused_0[grid(192, 121)](primals_2, buf0, 192, 121,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del primals_2
        buf1 = empty_strided_cuda((192, 64, 5, 5), (1600, 1, 320, 64),
            torch.float32)
        triton_poi_fused_1[grid(12288, 25)](primals_4, buf1, 12288, 25,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del primals_4
        buf2 = empty_strided_cuda((384, 192, 3, 3), (1728, 1, 576, 192),
            torch.float32)
        triton_poi_fused_2[grid(73728, 9)](primals_6, buf2, 73728, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_6
        buf3 = empty_strided_cuda((256, 384, 3, 3), (3456, 1, 1152, 384),
            torch.float32)
        triton_poi_fused_3[grid(98304, 9)](primals_8, buf3, 98304, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_8
        buf4 = empty_strided_cuda((256, 256, 3, 3), (2304, 1, 768, 256),
            torch.float32)
        triton_poi_fused_4[grid(65536, 9)](primals_10, buf4, 65536, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_10
        buf5 = empty_strided_cuda((1, 3, 128, 128), (49152, 1, 384, 3),
            torch.float32)
        triton_poi_fused_div_sub_5[grid(49152)](primals_1, buf5, 49152,
            XBLOCK=512, num_warps=4, num_stages=1)
        del primals_1
        buf6 = extern_kernels.convolution(buf5, buf0, stride=(4, 4),
            padding=(2, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf6, (1, 64, 31, 31), (61504, 1, 1984, 64))
        buf7 = buf6
        del buf6
        triton_poi_fused_convolution_relu_6[grid(61504)](buf7, primals_3, 
            61504, XBLOCK=512, num_warps=4, num_stages=1)
        del primals_3
        buf8 = empty_strided_cuda((1, 64, 15, 15), (14400, 1, 960, 64),
            torch.float32)
        buf9 = empty_strided_cuda((1, 64, 15, 15), (14400, 1, 960, 64),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_7[grid(14400)](buf7, buf8,
            buf9, 14400, XBLOCK=256, num_warps=4, num_stages=1)
        buf10 = extern_kernels.convolution(buf8, buf1, stride=(1, 1),
            padding=(2, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (1, 192, 15, 15), (43200, 1, 2880, 192))
        buf11 = buf10
        del buf10
        triton_poi_fused_convolution_relu_8[grid(43200)](buf11, primals_5, 
            43200, XBLOCK=512, num_warps=4, num_stages=1)
        del primals_5
        buf12 = empty_strided_cuda((1, 192, 7, 7), (9408, 1, 1344, 192),
            torch.float32)
        buf13 = empty_strided_cuda((1, 192, 7, 7), (9408, 1, 1344, 192),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_9[grid(9408)](buf11, buf12,
            buf13, 9408, XBLOCK=256, num_warps=4, num_stages=1)
        buf14 = extern_kernels.convolution(buf12, buf2, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (1, 384, 7, 7), (18816, 1, 2688, 384))
        buf15 = buf14
        del buf14
        triton_poi_fused_convolution_relu_10[grid(18816)](buf15, primals_7,
            18816, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_7
        buf16 = extern_kernels.convolution(buf15, buf3, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (1, 256, 7, 7), (12544, 1, 1792, 256))
        buf17 = buf16
        del buf16
        triton_poi_fused_convolution_relu_11[grid(12544)](buf17, primals_9,
            12544, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_9
        buf18 = extern_kernels.convolution(buf17, buf4, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (1, 256, 7, 7), (12544, 1, 1792, 256))
        buf19 = buf18
        del buf18
        triton_poi_fused_convolution_relu_11[grid(12544)](buf19, primals_11,
            12544, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_11
        buf20 = empty_strided_cuda((1, 256, 3, 3), (2304, 1, 768, 256),
            torch.float32)
        buf21 = empty_strided_cuda((1, 256, 3, 3), (2304, 1, 768, 256),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_12[grid(2304)](buf19,
            buf20, buf21, 2304, XBLOCK=256, num_warps=4, num_stages=1)
        buf22 = empty_strided_cuda((1, 256, 3, 3), (2304, 9, 3, 1), torch.
            float32)
        triton_poi_fused_clone_13[grid(256, 9)](buf20, buf22, 256, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del buf20
        buf23 = empty_strided_cuda((1, 4096), (4096, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf22, (1, 2304), (0, 1), 0),
            reinterpret_tensor(primals_12, (2304, 4096), (1, 2304), 0), out
            =buf23)
        buf24 = buf23
        del buf23
        triton_poi_fused_relu_14[grid(4096)](buf24, primals_13, 4096,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_13
        buf25 = empty_strided_cuda((1, 1024), (1024, 1), torch.float32)
        extern_kernels.mm(buf24, reinterpret_tensor(primals_14, (4096, 1024
            ), (1, 4096), 0), out=buf25)
        buf26 = buf25
        del buf25
        triton_poi_fused_relu_15[grid(1024)](buf26, primals_15, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_15
        buf27 = empty_strided_cuda((1, 100), (100, 1), torch.float32)
        extern_kernels.addmm(primals_17, buf26, reinterpret_tensor(
            primals_16, (1024, 100), (1, 1024), 0), alpha=1, beta=1, out=buf27)
        del primals_17
    return (buf27, buf0, buf1, buf2, buf3, buf4, buf5, buf7, buf8, buf9,
        buf11, buf12, buf13, buf15, buf17, buf19, buf21, reinterpret_tensor
        (buf22, (1, 2304), (2304, 1), 0), buf24, buf26, primals_16,
        primals_14, primals_12)


class AlexNetNew(nn.Module):

    def __init__(self):
        super(AlexNetNew, self).__init__()
        self.conv1 = nn.Conv2d(3, 64, (11, 11), stride=(4, 4), padding=(2, 2))
        self.conv2 = nn.Conv2d(64, 192, (5, 5), stride=(1, 1), padding=(2, 2))
        self.conv3 = nn.Conv2d(192, 384, (3, 3), stride=(1, 1), padding=(1, 1))
        self.conv4 = nn.Conv2d(384, 256, (3, 3), stride=(1, 1), padding=(1, 1))
        self.conv5 = nn.Conv2d(256, 256, (3, 3), stride=(1, 1), padding=(1, 1))
        self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2)
        self.dropout = nn.Dropout(0.5)
        self.fc1 = nn.Linear(256 * 3 * 3, 4096)
        self.fc2 = nn.Linear(4096, 1024)
        self.fc3 = nn.Linear(1024, 100)

    def forward(self, input_0):
        primals_2 = self.conv1.weight
        primals_3 = self.conv1.bias
        primals_4 = self.conv2.weight
        primals_5 = self.conv2.bias
        primals_6 = self.conv3.weight
        primals_7 = self.conv3.bias
        primals_8 = self.conv4.weight
        primals_9 = self.conv4.bias
        primals_10 = self.conv5.weight
        primals_11 = self.conv5.bias
        primals_12 = self.fc1.weight
        primals_13 = self.fc1.bias
        primals_14 = self.fc2.weight
        primals_15 = self.fc2.bias
        primals_16 = self.fc3.weight
        primals_17 = self.fc3.bias
        primals_1 = 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])
        return output[0]


Measured latency_ms: 0.34333