import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.functional as F


class VGG11(nn.Module):

    def __init__(self, num_classes=10, out_ch_conv1=17, out_ch_conv2=27,
        out_ch_conv3=39, out_ch_conv4=35, out_ch_conv5=55, out_ch_conv6=44,
        out_ch_conv7=22, out_ch_conv8=14, out_ch_fc1=145, out_ch_fc2=145):
        super(VGG11, self).__init__()
        self.conv1 = nn.Conv2d(3, out_ch_conv1, kernel_size=3, padding=1)
        self.pool1 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.conv2 = nn.Conv2d(out_ch_conv1, out_ch_conv2, kernel_size=3,
            padding=1)
        self.pool2 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.conv3 = nn.Conv2d(out_ch_conv2, out_ch_conv3, kernel_size=3,
            padding=1)
        self.conv4 = nn.Conv2d(out_ch_conv3, out_ch_conv4, kernel_size=3,
            padding=1)
        self.pool4 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.conv5 = nn.Conv2d(out_ch_conv4, out_ch_conv5, kernel_size=3,
            padding=1)
        self.conv6 = nn.Conv2d(out_ch_conv5, out_ch_conv6, kernel_size=3,
            padding=1)
        self.pool6 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.conv7 = nn.Conv2d(out_ch_conv6, out_ch_conv7, kernel_size=3,
            padding=1)
        self.conv8 = nn.Conv2d(out_ch_conv7, out_ch_conv8, kernel_size=3,
            padding=1)
        self.pool8 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.avgpool = nn.AdaptiveAvgPool2d((7, 7))
        self.fc1 = nn.Linear(out_ch_conv8 * 7 * 7, out_ch_fc1)
        self.drop1 = nn.Dropout()
        self.fc2 = nn.Linear(out_ch_fc1, out_ch_fc2)
        self.drop2 = nn.Dropout()
        self.fc3 = nn.Linear(out_ch_fc2, num_classes)

    def forward(self, x):
        x = self.conv1(x)
        x = F.relu(x, inplace=True)
        x = self.pool1(x)
        x = self.conv2(x)
        x = F.relu(x, inplace=True)
        x = self.pool2(x)
        x = self.conv3(x)
        x = F.relu(x, inplace=True)
        x = self.conv4(x)
        x = F.relu(x, inplace=True)
        x = self.pool4(x)
        x = self.conv5(x)
        x = F.relu(x, inplace=True)
        x = self.conv6(x)
        x = F.relu(x, inplace=True)
        x = self.pool6(x)
        x = self.conv7(x)
        x = F.relu(x, inplace=True)
        x = self.conv8(x)
        x = F.relu(x, inplace=True)
        x = self.pool8(x)
        x = self.avgpool(x)
        x = torch.flatten(x, 1)
        x = self.fc1(x)
        x = F.relu(x, inplace=True)
        x = self.drop1(x)
        x = self.fc2(x)
        x = F.relu(x, inplace=True)
        x = self.drop2(x)
        x = self.fc3(x)
        return x


def get_inputs():
    return [torch.rand([4, 3, 64, 64])]


def get_init_inputs():
    return [[], {}]

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.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
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_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 % 17
    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 % 27
    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):
    xnumel = 27648
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 16
    x1 = xindex // 16
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x0 + 64 * x1), xmask, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 2 * x0 + 64 * x1), xmask, eviction_policy
        ='evict_last')
    tmp3 = tl.load(in_ptr0 + (32 + 2 * x0 + 64 * x1), xmask,
        eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (33 + 2 * x0 + 64 * 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_4(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 39936
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 256 % 39
    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_convolution_relu_5(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 35840
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 256 % 35
    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_6(in_ptr0, out_ptr0, out_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 8960
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 8
    x1 = xindex // 8
    x4 = xindex
    x3 = xindex // 2240
    x5 = xindex % 2240
    tmp0 = tl.load(in_ptr0 + (2 * x0 + 32 * x1), xmask, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 2 * x0 + 32 * x1), xmask, eviction_policy
        ='evict_last')
    tmp3 = tl.load(in_ptr0 + (16 + 2 * x0 + 32 * x1), xmask,
        eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (17 + 2 * x0 + 32 * 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 + x4, tmp6, xmask)
    tl.store(out_ptr1 + (x5 + 2304 * x3), tmp16, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_7(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 14080
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 64 % 55
    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_convolution_relu_8(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 11264
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 64 % 44
    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, out_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 2816
    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_10(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 1408
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 16 % 22
    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_convolution_relu_11(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 896
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 16 % 14
    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_12(in_ptr0, out_ptr0, out_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 224
    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')
    tmp3 = tl.load(in_ptr0 + (4 + 2 * x0 + 8 * x1), xmask, eviction_policy=
        'evict_last')
    tmp5 = tl.load(in_ptr0 + (5 + 2 * x0 + 8 * 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__adaptive_avg_pool2d_13(in_ptr0, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 2744
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 7 % 7
    x0 = xindex % 7
    x2 = xindex // 49
    x4 = xindex
    tmp0 = 2 * x1 // 7
    tmp1 = (8 + 2 * x1) // 7
    tmp2 = tmp0 < tmp1
    tmp3 = 2 * x0 // 7
    tmp4 = (8 + 2 * x0) // 7
    tmp5 = tmp3 < tmp4
    tmp6 = tmp2 & tmp5
    tmp7 = tl.load(in_ptr0 + (2 * (2 * x1 // 7) + 4 * x2 + 2 * x0 // 7), 
        tmp6 & xmask, eviction_policy='evict_last', other=0.0)
    tmp8 = 1 + 2 * x0 // 7
    tmp9 = tmp8 < tmp4
    tmp10 = tmp2 & tmp9
    tmp11 = tl.load(in_ptr0 + (1 + 2 * (2 * x1 // 7) + 4 * x2 + 2 * x0 // 7
        ), tmp10 & xmask, eviction_policy='evict_last', other=0.0)
    tmp12 = tmp11 + tmp7
    tmp13 = 1 + 2 * x1 // 7
    tmp14 = tmp13 < tmp1
    tmp15 = tmp14 & tmp5
    tmp16 = tl.load(in_ptr0 + (2 + 2 * (2 * x1 // 7) + 4 * x2 + 2 * x0 // 7
        ), tmp15 & xmask, eviction_policy='evict_last', other=0.0)
    tmp17 = tmp16 + tmp12
    tmp18 = tmp14 & tmp9
    tmp19 = tl.load(in_ptr0 + (3 + 2 * (2 * x1 // 7) + 4 * x2 + 2 * x0 // 7
        ), tmp18 & xmask, eviction_policy='evict_last', other=0.0)
    tmp20 = tmp19 + tmp17
    tmp21 = 1.0
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp6, tmp21, tmp22)
    tmp24 = tl.where(tmp10, tmp21, tmp22)
    tmp25 = tmp24 + tmp23
    tmp26 = tl.where(tmp15, tmp21, tmp22)
    tmp27 = tmp26 + tmp25
    tmp28 = tl.where(tmp18, tmp21, tmp22)
    tmp29 = tmp28 + tmp27
    tmp30 = tmp20 / tmp29
    tl.store(out_ptr0 + x4, tmp30, xmask)


@triton.jit
def triton_poi_fused_relu_14(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 580
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 145
    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)


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
        ) = args
    args.clear()
    assert_size_stride(primals_1, (17, 3, 3, 3), (27, 9, 3, 1))
    assert_size_stride(primals_2, (17,), (1,))
    assert_size_stride(primals_3, (4, 3, 64, 64), (12288, 4096, 64, 1))
    assert_size_stride(primals_4, (27, 17, 3, 3), (153, 9, 3, 1))
    assert_size_stride(primals_5, (27,), (1,))
    assert_size_stride(primals_6, (39, 27, 3, 3), (243, 9, 3, 1))
    assert_size_stride(primals_7, (39,), (1,))
    assert_size_stride(primals_8, (35, 39, 3, 3), (351, 9, 3, 1))
    assert_size_stride(primals_9, (35,), (1,))
    assert_size_stride(primals_10, (55, 35, 3, 3), (315, 9, 3, 1))
    assert_size_stride(primals_11, (55,), (1,))
    assert_size_stride(primals_12, (44, 55, 3, 3), (495, 9, 3, 1))
    assert_size_stride(primals_13, (44,), (1,))
    assert_size_stride(primals_14, (22, 44, 3, 3), (396, 9, 3, 1))
    assert_size_stride(primals_15, (22,), (1,))
    assert_size_stride(primals_16, (14, 22, 3, 3), (198, 9, 3, 1))
    assert_size_stride(primals_17, (14,), (1,))
    assert_size_stride(primals_18, (145, 686), (686, 1))
    assert_size_stride(primals_19, (145,), (1,))
    assert_size_stride(primals_20, (145, 145), (145, 1))
    assert_size_stride(primals_21, (145,), (1,))
    assert_size_stride(primals_22, (10, 145), (145, 1))
    assert_size_stride(primals_23, (10,), (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, 17, 64, 64), (69632, 4096, 64, 1))
        buf1 = buf0
        del buf0
        get_raw_stream(0)
        triton_poi_fused_convolution_relu_0[grid(278528)](buf1, primals_2, 
            278528, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_2
        buf2 = empty_strided_cuda((4, 17, 32, 32), (17408, 1024, 32, 1),
            torch.float32)
        buf3 = empty_strided_cuda((4, 17, 32, 32), (17408, 1024, 32, 1),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_1[grid(69632)](buf1, buf2,
            buf3, 69632, XBLOCK=512, num_warps=8, num_stages=1)
        buf4 = extern_kernels.convolution(buf2, primals_4, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf4, (4, 27, 32, 32), (27648, 1024, 32, 1))
        buf5 = buf4
        del buf4
        triton_poi_fused_convolution_relu_2[grid(110592)](buf5, primals_5, 
            110592, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_5
        buf6 = empty_strided_cuda((4, 27, 16, 16), (6912, 256, 16, 1),
            torch.float32)
        buf7 = empty_strided_cuda((4, 27, 16, 16), (6912, 256, 16, 1),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_3[grid(27648)](buf5, buf6,
            buf7, 27648, XBLOCK=128, num_warps=4, num_stages=1)
        buf8 = extern_kernels.convolution(buf6, primals_6, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 39, 16, 16), (9984, 256, 16, 1))
        buf9 = buf8
        del buf8
        triton_poi_fused_convolution_relu_4[grid(39936)](buf9, primals_7, 
            39936, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_7
        buf10 = extern_kernels.convolution(buf9, 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, 35, 16, 16), (8960, 256, 16, 1))
        buf11 = buf10
        del buf10
        triton_poi_fused_convolution_relu_5[grid(35840)](buf11, primals_9, 
            35840, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_9
        buf12 = empty_strided_cuda((4, 35, 8, 8), (2240, 64, 8, 1), torch.
            float32)
        buf13 = empty_strided_cuda((4, 35, 8, 8), (2304, 64, 8, 1), torch.int8)
        triton_poi_fused_max_pool2d_with_indices_6[grid(8960)](buf11, buf12,
            buf13, 8960, XBLOCK=128, 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, 55, 8, 8), (3520, 64, 8, 1))
        buf15 = buf14
        del buf14
        triton_poi_fused_convolution_relu_7[grid(14080)](buf15, primals_11,
            14080, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_11
        buf16 = extern_kernels.convolution(buf15, primals_12, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 44, 8, 8), (2816, 64, 8, 1))
        buf17 = buf16
        del buf16
        triton_poi_fused_convolution_relu_8[grid(11264)](buf17, primals_13,
            11264, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_13
        buf18 = empty_strided_cuda((4, 44, 4, 4), (704, 16, 4, 1), torch.
            float32)
        buf19 = empty_strided_cuda((4, 44, 4, 4), (704, 16, 4, 1), torch.int8)
        triton_poi_fused_max_pool2d_with_indices_9[grid(2816)](buf17, buf18,
            buf19, 2816, XBLOCK=128, num_warps=4, num_stages=1)
        buf20 = extern_kernels.convolution(buf18, primals_14, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 22, 4, 4), (352, 16, 4, 1))
        buf21 = buf20
        del buf20
        triton_poi_fused_convolution_relu_10[grid(1408)](buf21, primals_15,
            1408, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_15
        buf22 = extern_kernels.convolution(buf21, primals_16, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 14, 4, 4), (224, 16, 4, 1))
        buf23 = buf22
        del buf22
        triton_poi_fused_convolution_relu_11[grid(896)](buf23, primals_17, 
            896, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_17
        buf24 = empty_strided_cuda((4, 14, 2, 2), (56, 4, 2, 1), torch.float32)
        buf25 = empty_strided_cuda((4, 14, 2, 2), (56, 4, 2, 1), torch.int8)
        triton_poi_fused_max_pool2d_with_indices_12[grid(224)](buf23, buf24,
            buf25, 224, XBLOCK=128, num_warps=4, num_stages=1)
        buf26 = empty_strided_cuda((4, 14, 7, 7), (686, 49, 7, 1), torch.
            float32)
        triton_poi_fused__adaptive_avg_pool2d_13[grid(2744)](buf24, buf26, 
            2744, XBLOCK=128, num_warps=4, num_stages=1)
        buf27 = empty_strided_cuda((4, 145), (145, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf26, (4, 686), (686, 1), 0),
            reinterpret_tensor(primals_18, (686, 145), (1, 686), 0), out=buf27)
        buf28 = buf27
        del buf27
        triton_poi_fused_relu_14[grid(580)](buf28, primals_19, 580, XBLOCK=
            128, num_warps=4, num_stages=1)
        del primals_19
        buf29 = empty_strided_cuda((4, 145), (145, 1), torch.float32)
        extern_kernels.mm(buf28, reinterpret_tensor(primals_20, (145, 145),
            (1, 145), 0), out=buf29)
        buf30 = buf29
        del buf29
        triton_poi_fused_relu_14[grid(580)](buf30, primals_21, 580, XBLOCK=
            128, num_warps=4, num_stages=1)
        del primals_21
        buf31 = empty_strided_cuda((4, 10), (10, 1), torch.float32)
        extern_kernels.addmm(primals_23, buf30, reinterpret_tensor(
            primals_22, (145, 10), (1, 145), 0), alpha=1, beta=1, out=buf31)
        del primals_23
    return (buf31, primals_1, primals_3, primals_4, primals_6, primals_8,
        primals_10, primals_12, primals_14, primals_16, buf1, buf2, buf3,
        buf5, buf6, buf7, buf9, buf11, buf12, buf13, buf15, buf17, buf18,
        buf19, buf21, buf23, buf24, buf25, reinterpret_tensor(buf26, (4, 
        686), (686, 1), 0), buf28, buf30, primals_22, primals_20, primals_18)


class VGG11New(nn.Module):

    def __init__(self, num_classes=10, out_ch_conv1=17, out_ch_conv2=27,
        out_ch_conv3=39, out_ch_conv4=35, out_ch_conv5=55, out_ch_conv6=44,
        out_ch_conv7=22, out_ch_conv8=14, out_ch_fc1=145, out_ch_fc2=145):
        super(VGG11New, self).__init__()
        self.conv1 = nn.Conv2d(3, out_ch_conv1, kernel_size=3, padding=1)
        self.pool1 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.conv2 = nn.Conv2d(out_ch_conv1, out_ch_conv2, kernel_size=3,
            padding=1)
        self.pool2 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.conv3 = nn.Conv2d(out_ch_conv2, out_ch_conv3, kernel_size=3,
            padding=1)
        self.conv4 = nn.Conv2d(out_ch_conv3, out_ch_conv4, kernel_size=3,
            padding=1)
        self.pool4 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.conv5 = nn.Conv2d(out_ch_conv4, out_ch_conv5, kernel_size=3,
            padding=1)
        self.conv6 = nn.Conv2d(out_ch_conv5, out_ch_conv6, kernel_size=3,
            padding=1)
        self.pool6 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.conv7 = nn.Conv2d(out_ch_conv6, out_ch_conv7, kernel_size=3,
            padding=1)
        self.conv8 = nn.Conv2d(out_ch_conv7, out_ch_conv8, kernel_size=3,
            padding=1)
        self.pool8 = nn.MaxPool2d(kernel_size=2, stride=2)
        self.avgpool = nn.AdaptiveAvgPool2d((7, 7))
        self.fc1 = nn.Linear(out_ch_conv8 * 7 * 7, out_ch_fc1)
        self.drop1 = nn.Dropout()
        self.fc2 = nn.Linear(out_ch_fc1, out_ch_fc2)
        self.drop2 = nn.Dropout()
        self.fc3 = nn.Linear(out_ch_fc2, num_classes)

    def forward(self, input_0):
        primals_1 = self.conv1.weight
        primals_2 = 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.conv6.weight
        primals_13 = self.conv6.bias
        primals_14 = self.conv7.weight
        primals_15 = self.conv7.bias
        primals_16 = self.conv8.weight
        primals_17 = self.conv8.bias
        primals_18 = self.fc1.weight
        primals_19 = self.fc1.bias
        primals_20 = self.fc2.weight
        primals_21 = self.fc2.bias
        primals_22 = self.fc3.weight
        primals_23 = self.fc3.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])
        return output[0]
