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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda


@triton.jit
def triton_poi_fused_0(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 9
    xnumel = 49
    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 + 49 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tl.store(out_ptr0 + (y0 + 3 * x2 + 147 * 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 = 48
    xnumel = 49
    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 + 49 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tl.store(out_ptr0 + (y0 + 3 * x2 + 147 * 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 = 49
    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 + 49 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tl.store(out_ptr0 + (y0 + 16 * x2 + 784 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_4(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    xnumel = 49
    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 + 49 * y3), xmask, eviction_policy=
        'evict_last')
    tl.store(out_ptr0 + (y0 + 32 * x2 + 1568 * 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_6(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_7(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 % 128
    y1 = yindex // 128
    tmp0 = tl.load(in_ptr0 + (x2 + 9 * y3), xmask, eviction_policy='evict_last'
        )
    tl.store(out_ptr0 + (y0 + 128 * x2 + 1152 * y1), tmp0, 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
        ) = args
    args.clear()
    assert_size_stride(primals_1, (3, 3, 7, 7), (147, 49, 7, 1))
    assert_size_stride(primals_2, (4, 3, 64, 64), (12288, 4096, 64, 1))
    assert_size_stride(primals_3, (3, 3, 7, 7), (147, 49, 7, 1))
    assert_size_stride(primals_4, (3, 3, 7, 7), (147, 49, 7, 1))
    assert_size_stride(primals_5, (16, 3, 7, 7), (147, 49, 7, 1))
    assert_size_stride(primals_6, (32, 16, 7, 7), (784, 49, 7, 1))
    assert_size_stride(primals_7, (64, 32, 7, 7), (1568, 49, 7, 1))
    assert_size_stride(primals_8, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_9, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_10, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_11, (128, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_12, (128, 128, 3, 3), (1152, 9, 3, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((3, 3, 7, 7), (147, 1, 21, 3), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_0[grid(9, 49)](primals_1, buf0, 9, 49, XBLOCK=64,
            YBLOCK=16, 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_2, buf1, 12, 4096,
            XBLOCK=64, YBLOCK=16, num_warps=4, num_stages=1)
        del primals_2
        buf2 = empty_strided_cuda((3, 3, 7, 7), (147, 1, 21, 3), torch.float32)
        triton_poi_fused_0[grid(9, 49)](primals_3, buf2, 9, 49, XBLOCK=64,
            YBLOCK=16, num_warps=4, num_stages=1)
        del primals_3
        buf3 = empty_strided_cuda((3, 3, 7, 7), (147, 1, 21, 3), torch.float32)
        triton_poi_fused_0[grid(9, 49)](primals_4, buf3, 9, 49, XBLOCK=64,
            YBLOCK=16, num_warps=4, num_stages=1)
        del primals_4
        buf4 = empty_strided_cuda((16, 3, 7, 7), (147, 1, 21, 3), torch.float32
            )
        triton_poi_fused_2[grid(48, 49)](primals_5, buf4, 48, 49, XBLOCK=32,
            YBLOCK=32, num_warps=4, num_stages=1)
        del primals_5
        buf5 = empty_strided_cuda((32, 16, 7, 7), (784, 1, 112, 16), torch.
            float32)
        triton_poi_fused_3[grid(512, 49)](primals_6, buf5, 512, 49, XBLOCK=
            32, YBLOCK=32, num_warps=4, num_stages=1)
        del primals_6
        buf6 = empty_strided_cuda((64, 32, 7, 7), (1568, 1, 224, 32), torch
            .float32)
        triton_poi_fused_4[grid(2048, 49)](primals_7, buf6, 2048, 49,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del primals_7
        buf7 = empty_strided_cuda((64, 64, 3, 3), (576, 1, 192, 64), torch.
            float32)
        triton_poi_fused_5[grid(4096, 9)](primals_8, buf7, 4096, 9, XBLOCK=
            16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_8
        buf8 = empty_strided_cuda((64, 64, 3, 3), (576, 1, 192, 64), torch.
            float32)
        triton_poi_fused_5[grid(4096, 9)](primals_9, buf8, 4096, 9, XBLOCK=
            16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_9
        buf9 = empty_strided_cuda((64, 64, 3, 3), (576, 1, 192, 64), torch.
            float32)
        triton_poi_fused_5[grid(4096, 9)](primals_10, buf9, 4096, 9, XBLOCK
            =16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_10
        buf10 = empty_strided_cuda((128, 64, 3, 3), (576, 1, 192, 64),
            torch.float32)
        triton_poi_fused_6[grid(8192, 9)](primals_11, buf10, 8192, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_11
        buf11 = empty_strided_cuda((128, 128, 3, 3), (1152, 1, 384, 128),
            torch.float32)
        triton_poi_fused_7[grid(16384, 9)](primals_12, buf11, 16384, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_12
        buf12 = extern_kernels.convolution(buf1, buf0, stride=(1, 1),
            padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf12, (4, 3, 64, 64), (12288, 1, 192, 3))
        buf13 = extern_kernels.convolution(buf12, buf2, stride=(1, 1),
            padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf13, (4, 3, 64, 64), (12288, 1, 192, 3))
        buf14 = extern_kernels.convolution(buf13, buf3, stride=(1, 1),
            padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 3, 64, 64), (12288, 1, 192, 3))
        buf15 = extern_kernels.convolution(buf14, buf4, stride=(2, 2),
            padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf15, (4, 16, 32, 32), (16384, 1, 512, 16))
        buf16 = extern_kernels.convolution(buf15, buf5, stride=(2, 2),
            padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 32, 16, 16), (8192, 1, 512, 32))
        buf17 = extern_kernels.convolution(buf16, buf6, stride=(1, 1),
            padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf17, (4, 64, 16, 16), (16384, 1, 1024, 64))
        buf18 = extern_kernels.convolution(buf17, buf7, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 64, 16, 16), (16384, 1, 1024, 64))
        buf19 = extern_kernels.convolution(buf18, buf8, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf19, (4, 64, 8, 8), (4096, 1, 512, 64))
        buf20 = extern_kernels.convolution(buf19, buf9, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 64, 4, 4), (1024, 1, 256, 64))
        buf21 = extern_kernels.convolution(buf20, buf10, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf21, (4, 128, 2, 2), (512, 1, 256, 128))
        buf22 = extern_kernels.convolution(buf21, buf11, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 128, 1, 1), (128, 1, 128, 128))
    return (buf22, buf0, buf1, buf2, buf3, buf4, buf5, buf6, buf7, buf8,
        buf9, buf10, buf11, buf12, buf13, buf14, buf15, buf16, buf17, buf18,
        buf19, buf20, buf21)


class NetNew(nn.Module):

    def __init__(self):
        super(NetNew, self).__init__()
        self.conv1 = nn.Conv2d(3, 3, kernel_size=7, stride=1, bias=False,
            padding=3)
        self.conv2 = nn.Conv2d(3, 3, kernel_size=7, stride=1, bias=False,
            padding=3)
        self.conv3 = nn.Conv2d(3, 3, kernel_size=7, stride=1, bias=False,
            padding=3)
        self.conv4 = nn.Conv2d(3, 16, kernel_size=7, stride=2, bias=False,
            padding=3)
        self.conv5 = nn.Conv2d(16, 32, kernel_size=7, stride=2, bias=False,
            padding=3)
        self.conv6 = nn.Conv2d(32, 64, kernel_size=7, stride=1, bias=False,
            padding=3)
        self.conv7 = nn.Conv2d(64, 64, kernel_size=3, stride=1, bias=False,
            padding=1)
        self.conv8 = nn.Conv2d(64, 64, kernel_size=3, stride=2, bias=False,
            padding=1)
        self.conv9 = nn.Conv2d(64, 64, kernel_size=3, stride=2, bias=False,
            padding=1)
        self.conv10 = nn.Conv2d(64, 128, kernel_size=3, stride=2, bias=
            False, padding=1)
        self.conv11 = nn.Conv2d(128, 128, kernel_size=3, stride=2, bias=
            False, padding=1)

    def forward(self, input_0):
        primals_1 = self.conv1.weight
        primals_3 = self.conv2.weight
        primals_4 = self.conv3.weight
        primals_5 = self.conv4.weight
        primals_6 = self.conv5.weight
        primals_7 = self.conv6.weight
        primals_8 = self.conv7.weight
        primals_9 = self.conv8.weight
        primals_10 = self.conv9.weight
        primals_11 = self.conv10.weight
        primals_12 = self.conv11.weight
        primals_2 = 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])
        return output[0]


Measured latency_ms: 0.28519