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
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):
    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_1(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_2(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)


@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) * 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)


@triton.jit
def triton_poi_fused_convolution_relu_4(in_ptr0, in_ptr1, out_ptr0, ynumel,
    xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 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]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    x2 = xindex
    y3 = yindex
    y0 = yindex % 64
    y1 = yindex // 64
    tmp0 = tl.load(in_ptr0 + (x2 + 4096 * y3), ymask, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr1 + y0, ymask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1, 1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(out_ptr0 + (y0 + 64 * x2 + 262144 * y1), tmp4, ymask)


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


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_6(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 % 32
    x2 = xindex // 2048
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 128 * x1 + 8192 * x2), None)
    tmp1 = tl.load(in_ptr0 + (64 + x0 + 128 * x1 + 8192 * x2), None)
    tmp3 = tl.load(in_ptr0 + (4096 + x0 + 128 * x1 + 8192 * x2), None)
    tmp5 = tl.load(in_ptr0 + (4160 + x0 + 128 * x1 + 8192 * 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_relu_7(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
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x2, tmp4, None)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_8(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 % 16
    x2 = xindex // 1024
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 128 * x1 + 4096 * x2), None)
    tmp1 = tl.load(in_ptr0 + (64 + x0 + 128 * x1 + 4096 * x2), None)
    tmp3 = tl.load(in_ptr0 + (2048 + x0 + 128 * x1 + 4096 * x2), None)
    tmp5 = tl.load(in_ptr0 + (2112 + x0 + 128 * x1 + 4096 * 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_relu_9(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
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x2, tmp4, None)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_10(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 % 8
    x2 = xindex // 1024
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 256 * x1 + 4096 * x2), None)
    tmp1 = tl.load(in_ptr0 + (128 + x0 + 256 * x1 + 4096 * x2), None)
    tmp3 = tl.load(in_ptr0 + (2048 + x0 + 256 * x1 + 4096 * x2), None)
    tmp5 = tl.load(in_ptr0 + (2176 + x0 + 256 * x1 + 4096 * 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_relu_11(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
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x2, tmp4, None)


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


@triton.jit
def triton_poi_fused_convolution_13(in_ptr0, in_ptr1, out_ptr0, ynumel,
    xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 260
    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
    y0 = yindex % 65
    y1 = yindex // 65
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 65 * x2 + 4160 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + y0, ymask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + (x2 + 64 * y3), tmp2, xmask & ymask)


@triton.jit
def triton_per_fused_convolution_linalg_vector_norm_14(in_out_ptr0,
    in_out_ptr1, in_ptr0, 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_out_ptr0 + (r1 + 256 * x0), None)
    tmp1 = tl.load(in_ptr0 + r1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tmp2 * tmp2
    tmp4 = tl.broadcast_to(tmp3, [RBLOCK])
    tmp6 = triton_helpers.promote_to_tensor(tl.sum(tmp4, 0))
    tmp7 = libdevice.sqrt(tmp6)
    tl.store(in_out_ptr0 + (r1 + 256 * x0), tmp2, None)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_div_15(in_ptr0, in_ptr1, 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
    x2 = xindex
    y0 = yindex % 256
    y1 = yindex // 256
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 256 * x2 + 16384 * y1), xmask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2 + 64 * y1), xmask, eviction_policy=
        'evict_last')
    tmp2 = tmp0 / tmp1
    tl.store(out_ptr0 + (x2 + 64 * y3), tmp2, 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, primals_24, primals_25) = args
    args.clear()
    assert_size_stride(primals_1, (64, 1, 3, 3), (9, 9, 3, 1))
    assert_size_stride(primals_2, (64,), (1,))
    assert_size_stride(primals_3, (4, 1, 64, 64), (4096, 4096, 64, 1))
    assert_size_stride(primals_4, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_5, (64,), (1,))
    assert_size_stride(primals_6, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_7, (64,), (1,))
    assert_size_stride(primals_8, (64, 64, 3, 3), (576, 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, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_13, (128,), (1,))
    assert_size_stride(primals_14, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_15, (128,), (1,))
    assert_size_stride(primals_16, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_17, (128,), (1,))
    assert_size_stride(primals_18, (256, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_19, (256,), (1,))
    assert_size_stride(primals_20, (65, 256, 1, 1), (256, 1, 1, 1))
    assert_size_stride(primals_21, (65,), (1,))
    assert_size_stride(primals_22, (256, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_23, (256,), (1,))
    assert_size_stride(primals_24, (256, 256, 1, 1), (256, 1, 1, 1))
    assert_size_stride(primals_25, (256,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((64, 64, 3, 3), (576, 1, 192, 64), torch.
            float32)
        get_raw_stream(0)
        triton_poi_fused_0[grid(4096, 9)](primals_4, buf0, 4096, 9, XBLOCK=
            16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_4
        buf1 = empty_strided_cuda((64, 64, 3, 3), (576, 1, 192, 64), torch.
            float32)
        triton_poi_fused_0[grid(4096, 9)](primals_6, buf1, 4096, 9, XBLOCK=
            16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_6
        buf2 = empty_strided_cuda((64, 64, 3, 3), (576, 1, 192, 64), torch.
            float32)
        triton_poi_fused_0[grid(4096, 9)](primals_8, buf2, 4096, 9, XBLOCK=
            16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_8
        buf3 = empty_strided_cuda((128, 64, 3, 3), (576, 1, 192, 64), torch
            .float32)
        triton_poi_fused_1[grid(8192, 9)](primals_10, buf3, 8192, 9, XBLOCK
            =16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_10
        buf4 = empty_strided_cuda((128, 128, 3, 3), (1152, 1, 384, 128),
            torch.float32)
        triton_poi_fused_2[grid(16384, 9)](primals_12, buf4, 16384, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_12
        buf5 = empty_strided_cuda((128, 128, 3, 3), (1152, 1, 384, 128),
            torch.float32)
        triton_poi_fused_2[grid(16384, 9)](primals_14, buf5, 16384, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_14
        buf6 = empty_strided_cuda((128, 128, 3, 3), (1152, 1, 384, 128),
            torch.float32)
        triton_poi_fused_2[grid(16384, 9)](primals_16, buf6, 16384, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_16
        buf7 = empty_strided_cuda((256, 128, 3, 3), (1152, 1, 384, 128),
            torch.float32)
        triton_poi_fused_3[grid(32768, 9)](primals_18, buf7, 32768, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_18
        buf8 = empty_strided_cuda((256, 128, 3, 3), (1152, 1, 384, 128),
            torch.float32)
        triton_poi_fused_3[grid(32768, 9)](primals_22, buf8, 32768, 9,
            XBLOCK=16, YBLOCK=64, num_warps=4, num_stages=1)
        del primals_22
        buf9 = 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(buf9, (4, 64, 64, 64), (262144, 4096, 64, 1))
        buf10 = empty_strided_cuda((4, 64, 64, 64), (262144, 1, 4096, 64),
            torch.float32)
        triton_poi_fused_convolution_relu_4[grid(256, 4096)](buf9,
            primals_2, buf10, 256, 4096, XBLOCK=32, YBLOCK=32, num_warps=4,
            num_stages=1)
        del buf9
        del primals_2
        buf11 = extern_kernels.convolution(buf10, buf0, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf11, (4, 64, 64, 64), (262144, 1, 4096, 64))
        buf12 = buf11
        del buf11
        triton_poi_fused_convolution_relu_5[grid(1048576)](buf12, primals_5,
            1048576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_5
        buf13 = empty_strided_cuda((4, 64, 32, 32), (65536, 1, 2048, 64),
            torch.float32)
        buf14 = empty_strided_cuda((4, 64, 32, 32), (65536, 1, 2048, 64),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_6[grid(262144)](buf12,
            buf13, buf14, 262144, XBLOCK=512, num_warps=8, num_stages=1)
        buf15 = extern_kernels.convolution(buf13, buf1, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf15, (4, 64, 32, 32), (65536, 1, 2048, 64))
        buf16 = buf15
        del buf15
        triton_poi_fused_convolution_relu_7[grid(262144)](buf16, primals_7,
            262144, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_7
        buf17 = extern_kernels.convolution(buf16, buf2, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf17, (4, 64, 32, 32), (65536, 1, 2048, 64))
        buf18 = buf17
        del buf17
        triton_poi_fused_convolution_relu_7[grid(262144)](buf18, primals_9,
            262144, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_9
        buf19 = empty_strided_cuda((4, 64, 16, 16), (16384, 1, 1024, 64),
            torch.float32)
        buf20 = empty_strided_cuda((4, 64, 16, 16), (16384, 1, 1024, 64),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_8[grid(65536)](buf18,
            buf19, buf20, 65536, XBLOCK=512, 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, 128, 16, 16), (32768, 1, 2048, 128))
        buf22 = buf21
        del buf21
        triton_poi_fused_convolution_relu_9[grid(131072)](buf22, primals_11,
            131072, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_11
        buf23 = extern_kernels.convolution(buf22, buf4, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 128, 16, 16), (32768, 1, 2048, 128))
        buf24 = buf23
        del buf23
        triton_poi_fused_convolution_relu_9[grid(131072)](buf24, primals_13,
            131072, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_13
        buf25 = empty_strided_cuda((4, 128, 8, 8), (8192, 1, 1024, 128),
            torch.float32)
        buf26 = empty_strided_cuda((4, 128, 8, 8), (8192, 1, 1024, 128),
            torch.int8)
        triton_poi_fused_max_pool2d_with_indices_10[grid(32768)](buf24,
            buf25, buf26, 32768, XBLOCK=256, num_warps=4, num_stages=1)
        buf27 = extern_kernels.convolution(buf25, buf5, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf27, (4, 128, 8, 8), (8192, 1, 1024, 128))
        buf28 = buf27
        del buf27
        triton_poi_fused_convolution_relu_11[grid(32768)](buf28, primals_15,
            32768, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_15
        buf29 = extern_kernels.convolution(buf28, buf6, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf29, (4, 128, 8, 8), (8192, 1, 1024, 128))
        buf30 = buf29
        del buf29
        triton_poi_fused_convolution_relu_11[grid(32768)](buf30, primals_17,
            32768, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_17
        buf31 = extern_kernels.convolution(buf30, buf7, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 256, 8, 8), (16384, 1, 2048, 256))
        buf32 = buf31
        del buf31
        triton_poi_fused_convolution_relu_12[grid(65536)](buf32, primals_19,
            65536, XBLOCK=512, num_warps=4, num_stages=1)
        del primals_19
        buf33 = extern_kernels.convolution(buf32, primals_20, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf33, (4, 65, 8, 8), (4160, 1, 520, 65))
        buf34 = empty_strided_cuda((4, 65, 8, 8), (4160, 64, 8, 1), torch.
            float32)
        triton_poi_fused_convolution_13[grid(260, 64)](buf33, primals_21,
            buf34, 260, 64, XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del buf33
        del primals_21
        buf35 = extern_kernels.convolution(buf30, buf8, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf35, (4, 256, 8, 8), (16384, 1, 2048, 256))
        buf36 = buf35
        del buf35
        triton_poi_fused_convolution_relu_12[grid(65536)](buf36, primals_23,
            65536, XBLOCK=512, num_warps=4, num_stages=1)
        del primals_23
        buf37 = extern_kernels.convolution(buf36, primals_24, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf37, (4, 256, 8, 8), (16384, 1, 2048, 256))
        buf38 = buf37
        del buf37
        buf39 = empty_strided_cuda((4, 8, 8), (64, 8, 1), torch.float32)
        buf40 = buf39
        del buf39
        triton_per_fused_convolution_linalg_vector_norm_14[grid(256)](buf38,
            buf40, primals_25, 256, 256, num_warps=2, num_stages=1)
        del primals_25
        buf41 = empty_strided_cuda((4, 256, 8, 8), (16384, 64, 8, 1), torch
            .float32)
        triton_poi_fused_div_15[grid(1024, 64)](buf38, buf40, buf41, 1024, 
            64, XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
    return (buf34, buf41, primals_1, primals_3, buf0, buf1, buf2, buf3,
        buf4, buf5, buf6, buf7, primals_20, buf8, primals_24, buf10, buf12,
        buf13, buf14, buf16, buf18, buf19, buf20, buf22, buf24, buf25,
        buf26, buf28, buf30, buf32, buf36, buf38, reinterpret_tensor(buf40,
        (4, 1, 8, 8), (64, 64, 8, 1), 0))


class SuperPointNetNew(torch.nn.Module):
    """    Pytorch definition of SuperPoint Network. """

    def __init__(self):
        super(SuperPointNetNew, self).__init__()
        self.relu = torch.nn.ReLU(inplace=True)
        self.pool = torch.nn.MaxPool2d(kernel_size=2, stride=2)
        c1, c2, c3, c4, c5, d1 = 64, 64, 128, 128, 256, 256
        self.conv1a = torch.nn.Conv2d(1, c1, kernel_size=3, stride=1, padding=1
            )
        self.conv1b = torch.nn.Conv2d(c1, c1, kernel_size=3, stride=1,
            padding=1)
        self.conv2a = torch.nn.Conv2d(c1, c2, kernel_size=3, stride=1,
            padding=1)
        self.conv2b = torch.nn.Conv2d(c2, c2, kernel_size=3, stride=1,
            padding=1)
        self.conv3a = torch.nn.Conv2d(c2, c3, kernel_size=3, stride=1,
            padding=1)
        self.conv3b = torch.nn.Conv2d(c3, c3, kernel_size=3, stride=1,
            padding=1)
        self.conv4a = torch.nn.Conv2d(c3, c4, kernel_size=3, stride=1,
            padding=1)
        self.conv4b = torch.nn.Conv2d(c4, c4, kernel_size=3, stride=1,
            padding=1)
        self.convPa = torch.nn.Conv2d(c4, c5, kernel_size=3, stride=1,
            padding=1)
        self.convPb = torch.nn.Conv2d(c5, 65, kernel_size=1, stride=1,
            padding=0)
        self.convDa = torch.nn.Conv2d(c4, c5, kernel_size=3, stride=1,
            padding=1)
        self.convDb = torch.nn.Conv2d(c5, d1, kernel_size=1, stride=1,
            padding=0)

    def forward(self, input_0):
        primals_1 = self.conv1a.weight
        primals_2 = self.conv1a.bias
        primals_4 = self.conv1b.weight
        primals_5 = self.conv1b.bias
        primals_6 = self.conv2a.weight
        primals_7 = self.conv2a.bias
        primals_8 = self.conv2b.weight
        primals_9 = self.conv2b.bias
        primals_10 = self.conv3a.weight
        primals_11 = self.conv3a.bias
        primals_12 = self.conv3b.weight
        primals_13 = self.conv3b.bias
        primals_14 = self.conv4a.weight
        primals_15 = self.conv4a.bias
        primals_16 = self.conv4b.weight
        primals_17 = self.conv4b.bias
        primals_18 = self.convPa.weight
        primals_19 = self.convPa.bias
        primals_20 = self.convPb.weight
        primals_21 = self.convPb.bias
        primals_22 = self.convDa.weight
        primals_23 = self.convDa.bias
        primals_24 = self.convDb.weight
        primals_25 = self.convDb.bias
        primals_3 = input_0
        output = call([primals_1, primals_2, primals_3, primals_4,
            primals_5, primals_6, primals_7, primals_8, primals_9,
            primals_10, primals_11, primals_12, primals_13, primals_14,
            primals_15, primals_16, primals_17, primals_18, primals_19,
            primals_20, primals_21, primals_22, primals_23, primals_24,
            primals_25])
        return output[0], output[1]


Measured latency_ms: 0.014009