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
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
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_poi_fused_div_sub_0(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
    tmp0 = tl.load(in_ptr0 + x0, None)
    tmp1 = 0.00784313725490196
    tmp2 = tmp0 * tmp1
    tmp3 = 1.0
    tmp4 = tmp2 - tmp3
    tl.store(out_ptr0 + x0, tmp4, None)


@triton.jit
def triton_poi_fused_convolution_elu_1(in_out_ptr0, in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 369024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 3844 % 24
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 1.0
    tmp6 = tmp2 * tmp5
    tmp7 = libdevice.expm1(tmp6)
    tmp8 = tmp7 * tmp5
    tmp9 = tl.where(tmp4, tmp6, tmp8)
    tl.store(in_out_ptr0 + x3, tmp2, xmask)
    tl.store(out_ptr0 + x3, tmp9, xmask)


@triton.jit
def triton_poi_fused_convolution_elu_2(in_out_ptr0, in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 121104
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 841 % 36
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 1.0
    tmp6 = tmp2 * tmp5
    tmp7 = libdevice.expm1(tmp6)
    tmp8 = tmp7 * tmp5
    tmp9 = tl.where(tmp4, tmp6, tmp8)
    tl.store(in_out_ptr0 + x3, tmp2, xmask)
    tl.store(out_ptr0 + x3, tmp9, xmask)


@triton.jit
def triton_poi_fused_convolution_elu_3(in_out_ptr0, in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 32448
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 169 % 48
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 1.0
    tmp6 = tmp2 * tmp5
    tmp7 = libdevice.expm1(tmp6)
    tmp8 = tmp7 * tmp5
    tmp9 = tl.where(tmp4, tmp6, tmp8)
    tl.store(in_out_ptr0 + x3, tmp2, xmask)
    tl.store(out_ptr0 + x3, tmp9, xmask)


@triton.jit
def triton_poi_fused_convolution_elu_4(in_out_ptr0, in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 30976
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 121 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 1.0
    tmp6 = tmp2 * tmp5
    tmp7 = libdevice.expm1(tmp6)
    tmp8 = tmp7 * tmp5
    tmp9 = tl.where(tmp4, tmp6, tmp8)
    tl.store(in_out_ptr0 + x3, tmp2, xmask)
    tl.store(out_ptr0 + x3, tmp9, xmask)


@triton.jit
def triton_poi_fused_convolution_elu_5(in_out_ptr0, in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 20736
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 81 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 1.0
    tmp6 = tmp2 * tmp5
    tmp7 = libdevice.expm1(tmp6)
    tmp8 = tmp7 * tmp5
    tmp9 = tl.where(tmp4, tmp6, tmp8)
    tl.store(in_out_ptr0 + x3, tmp2, xmask)
    tl.store(out_ptr0 + x3, tmp9, xmask)


@triton.jit
def triton_red_fused_mean_std_6(in_ptr0, out_ptr0, out_ptr1, out_ptr2,
    out_ptr3, xnumel, rnumel, XBLOCK: tl.constexpr, RBLOCK: tl.constexpr):
    xnumel = 3
    rnumel = 6912
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    _tmp2 = tl.full([XBLOCK, RBLOCK], 0, tl.float32)
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp0 = tl.load(in_ptr0 + (r1 + 6912 * x0), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
        tmp3 = _tmp2 + tmp1
        _tmp2 = tl.where(rmask & xmask, tmp3, _tmp2)
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = (triton_helpers.
            welford_reduce(tmp1, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0)
            )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
    tmp2 = tl.sum(_tmp2, 1)[:, None]
    tl.store(out_ptr0 + x0, tmp2, xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(tmp4_mean,
        tmp4_m2, tmp4_weight, 1)
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr1 + x0, tmp4, xmask)
    tl.store(out_ptr2 + x0, tmp5, xmask)
    tl.store(out_ptr3 + x0, tmp6, xmask)


@triton.jit
def triton_per_fused_mean_7(in_out_ptr0, in_ptr0, xnumel, rnumel, XBLOCK:
    tl.constexpr):
    rnumel = 3
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xoffset + tl.arange(0, XBLOCK)[:, None]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[None, :]
    rmask = rindex < rnumel
    r0 = rindex
    tmp0 = tl.load(in_ptr0 + r0, rmask, other=0.0)
    tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp3 = tl.where(rmask, tmp1, 0)
    tmp4 = tl.sum(tmp3, 1)[:, None]
    tmp5 = 20736.0
    tmp6 = tmp4 / tmp5
    tl.debug_barrier()
    tl.store(in_out_ptr0 + tl.full([XBLOCK, 1], 0, tl.int32), tmp6, None)


@triton.jit
def triton_per_fused_std_8(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, xnumel,
    rnumel, XBLOCK: tl.constexpr):
    rnumel = 3
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xoffset + tl.arange(0, XBLOCK)[:, None]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[None, :]
    rmask = rindex < rnumel
    r0 = rindex
    tmp0 = tl.load(in_ptr0 + r0, rmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + r0, rmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + r0, rmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(rmask, tmp3, 0)
    tmp8 = tl.where(rmask, tmp4, 0)
    tmp9 = tl.where(rmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp12[:, None]
    tmp16 = 20735.0
    tmp17 = tmp14 / tmp16
    tmp18 = libdevice.sqrt(tmp17)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + tl.full([XBLOCK, 1], 0, tl.int32), tmp18, None)


@triton.jit
def triton_poi_fused_add_div_elu_mul_sub_9(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, 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 % 4608
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, None)
    tmp3 = tl.load(in_ptr2 + x2, None)
    tmp5 = tl.load(in_ptr3 + 0)
    tmp6 = tl.broadcast_to(tmp5, [XBLOCK])
    tmp8 = tl.load(in_ptr4 + 0)
    tmp9 = tl.broadcast_to(tmp8, [XBLOCK])
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 / tmp3
    tmp7 = tmp4 * tmp6
    tmp10 = tmp7 + tmp9
    tmp11 = 0.0
    tmp12 = tmp10 > tmp11
    tmp13 = 1.0
    tmp14 = tmp10 * tmp13
    tmp15 = libdevice.expm1(tmp14)
    tmp16 = tmp15 * tmp13
    tmp17 = tl.where(tmp12, tmp14, tmp16)
    tl.store(out_ptr0 + x2, tmp4, None)
    tl.store(out_ptr1 + x2, tmp17, None)


@triton.jit
def triton_poi_fused_10(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 23040
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 1152
    x0 = xindex % 1152
    x2 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 18, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 1152 * x1), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 20, tl.int64)
    tmp9 = 0.0
    tmp10 = tl.full(tmp9.shape, 0.0, tmp9.dtype)
    tmp11 = tl.where(tmp6, tmp9, tmp10)
    tmp12 = tl.where(tmp4, tmp5, tmp11)
    tl.store(out_ptr0 + x2, tmp12, xmask)


@triton.jit
def triton_poi_fused_elu_11(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1800
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 1.0
    tmp4 = tmp0 * tmp3
    tmp5 = libdevice.expm1(tmp4)
    tmp6 = tmp5 * tmp3
    tmp7 = tl.where(tmp2, tmp4, tmp6)
    tl.store(out_ptr0 + x0, tmp7, xmask)


@triton.jit
def triton_poi_fused_elu_12(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 900
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 1.0
    tmp4 = tmp0 * tmp3
    tmp5 = libdevice.expm1(tmp4)
    tmp6 = tmp5 * tmp3
    tmp7 = tl.where(tmp2, tmp4, tmp6)
    tl.store(out_ptr0 + x0, tmp7, xmask)


@triton.jit
def triton_poi_fused_elu_13(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 180
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 1.0
    tmp4 = tmp0 * tmp3
    tmp5 = libdevice.expm1(tmp4)
    tmp6 = tmp5 * tmp3
    tmp7 = tl.where(tmp2, tmp4, tmp6)
    tl.store(out_ptr0 + x0, tmp7, xmask)


@triton.jit
def triton_poi_fused_elu_14(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 6400
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 1.0
    tmp4 = tmp0 * tmp3
    tmp5 = libdevice.expm1(tmp4)
    tmp6 = tmp5 * tmp3
    tmp7 = tl.where(tmp2, tmp4, tmp6)
    tl.store(out_ptr0 + x0, tmp7, xmask)


@triton.jit
def triton_poi_fused_elu_15(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 3200
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 1.0
    tmp4 = tmp0 * tmp3
    tmp5 = libdevice.expm1(tmp4)
    tmp6 = tmp5 * tmp3
    tmp7 = tl.where(tmp2, tmp4, tmp6)
    tl.store(out_ptr0 + x0, tmp7, xmask)


@triton.jit
def triton_poi_fused_elu_16(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 640
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 1.0
    tmp4 = tmp0 * tmp3
    tmp5 = libdevice.expm1(tmp4)
    tmp6 = tmp5 * tmp3
    tmp7 = tl.where(tmp2, tmp4, tmp6)
    tl.store(out_ptr0 + x0, tmp7, 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) = args
    args.clear()
    assert_size_stride(primals_1, (4, 3, 128, 128), (49152, 16384, 128, 1))
    assert_size_stride(primals_2, (24, 3, 5, 5), (75, 25, 5, 1))
    assert_size_stride(primals_3, (24,), (1,))
    assert_size_stride(primals_4, (36, 24, 5, 5), (600, 25, 5, 1))
    assert_size_stride(primals_5, (36,), (1,))
    assert_size_stride(primals_6, (48, 36, 5, 5), (900, 25, 5, 1))
    assert_size_stride(primals_7, (48,), (1,))
    assert_size_stride(primals_8, (64, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_9, (64,), (1,))
    assert_size_stride(primals_10, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_11, (64,), (1,))
    assert_size_stride(primals_12, (4, 4, 4, 1152), (18432, 4608, 1152, 1))
    assert_size_stride(primals_13, (4, 1152), (1152, 1))
    assert_size_stride(primals_14, (4, 4, 4, 1152), (18432, 4608, 1152, 1))
    assert_size_stride(primals_15, (100, 1152), (1152, 1))
    assert_size_stride(primals_16, (100,), (1,))
    assert_size_stride(primals_17, (50, 100), (100, 1))
    assert_size_stride(primals_18, (50,), (1,))
    assert_size_stride(primals_19, (10, 50), (50, 1))
    assert_size_stride(primals_20, (10,), (1,))
    assert_size_stride(primals_21, (1, 10), (10, 1))
    assert_size_stride(primals_22, (1,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 3, 128, 128), (49152, 16384, 128, 1),
            torch.float32)
        get_raw_stream(0)
        triton_poi_fused_div_sub_0[grid(196608)](primals_1, buf0, 196608,
            XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_1
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 24, 62, 62), (92256, 3844, 62, 1))
        buf2 = buf1
        del buf1
        buf3 = empty_strided_cuda((4, 24, 62, 62), (92256, 3844, 62, 1),
            torch.float32)
        triton_poi_fused_convolution_elu_1[grid(369024)](buf2, primals_3,
            buf3, 369024, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_3
        buf4 = extern_kernels.convolution(buf3, primals_4, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf4, (4, 36, 29, 29), (30276, 841, 29, 1))
        buf5 = buf4
        del buf4
        buf6 = empty_strided_cuda((4, 36, 29, 29), (30276, 841, 29, 1),
            torch.float32)
        triton_poi_fused_convolution_elu_2[grid(121104)](buf5, primals_5,
            buf6, 121104, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_5
        buf7 = extern_kernels.convolution(buf6, primals_6, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 48, 13, 13), (8112, 169, 13, 1))
        buf8 = buf7
        del buf7
        buf9 = empty_strided_cuda((4, 48, 13, 13), (8112, 169, 13, 1),
            torch.float32)
        triton_poi_fused_convolution_elu_3[grid(32448)](buf8, primals_7,
            buf9, 32448, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_7
        buf10 = extern_kernels.convolution(buf9, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (4, 64, 11, 11), (7744, 121, 11, 1))
        buf11 = buf10
        del buf10
        buf12 = empty_strided_cuda((4, 64, 11, 11), (7744, 121, 11, 1),
            torch.float32)
        triton_poi_fused_convolution_elu_4[grid(30976)](buf11, primals_9,
            buf12, 30976, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_9
        buf13 = extern_kernels.convolution(buf12, primals_10, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf13, (4, 64, 9, 9), (5184, 81, 9, 1))
        buf14 = buf13
        del buf13
        buf26 = empty_strided_cuda((4, 64, 9, 9), (5184, 81, 9, 1), torch.
            float32)
        triton_poi_fused_convolution_elu_5[grid(20736)](buf14, primals_11,
            buf26, 20736, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_11
        buf15 = empty_strided_cuda((3,), (1,), torch.float32)
        buf18 = empty_strided_cuda((3,), (1,), torch.float32)
        buf19 = empty_strided_cuda((3,), (1,), torch.float32)
        buf20 = empty_strided_cuda((3,), (1,), torch.float32)
        triton_red_fused_mean_std_6[grid(3)](buf14, buf15, buf18, buf19,
            buf20, 3, 6912, XBLOCK=1, RBLOCK=2048, num_warps=16, num_stages=1)
        buf16 = empty_strided_cuda((), (), torch.float32)
        buf17 = buf16
        del buf16
        triton_per_fused_mean_7[grid(1)](buf17, buf15, 1, 3, XBLOCK=1,
            num_warps=2, num_stages=1)
        del buf15
        buf22 = empty_strided_cuda((), (), torch.float32)
        buf24 = buf22
        del buf22
        triton_per_fused_std_8[grid(1)](buf24, buf18, buf19, buf20, 1, 3,
            XBLOCK=1, num_warps=2, num_stages=1)
        del buf18
        del buf19
        del buf20
        buf25 = empty_strided_cuda((4, 4, 4, 1152), (18432, 4608, 1152, 1),
            torch.float32)
        buf36 = empty_strided_cuda((4, 4, 4, 1152), (18432, 4608, 1152, 1),
            torch.float32)
        triton_poi_fused_add_div_elu_mul_sub_9[grid(73728)](primals_13,
            primals_12, primals_14, buf24, buf17, buf25, buf36, 73728,
            XBLOCK=512, num_warps=8, num_stages=1)
        del primals_12
        del primals_13
        del primals_14
        buf27 = empty_strided_cuda((20, 1152), (1152, 1), torch.float32)
        triton_poi_fused_10[grid(23040)](buf26, buf27, 23040, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf28 = empty_strided_cuda((20, 100), (100, 1), torch.float32)
        extern_kernels.addmm(primals_16, buf27, reinterpret_tensor(
            primals_15, (1152, 100), (1, 1152), 0), alpha=1, beta=1, out=buf28)
        del buf27
        buf29 = empty_strided_cuda((18, 100), (100, 1), torch.float32)
        triton_poi_fused_elu_11[grid(1800)](buf28, buf29, 1800, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf30 = empty_strided_cuda((18, 50), (50, 1), torch.float32)
        extern_kernels.addmm(primals_18, buf29, reinterpret_tensor(
            primals_17, (100, 50), (1, 100), 0), alpha=1, beta=1, out=buf30)
        buf31 = empty_strided_cuda((18, 50), (50, 1), torch.float32)
        triton_poi_fused_elu_12[grid(900)](buf30, buf31, 900, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf32 = empty_strided_cuda((18, 10), (10, 1), torch.float32)
        extern_kernels.addmm(primals_20, buf31, reinterpret_tensor(
            primals_19, (50, 10), (1, 50), 0), alpha=1, beta=1, out=buf32)
        buf33 = empty_strided_cuda((18, 10), (10, 1), torch.float32)
        triton_poi_fused_elu_13[grid(180)](buf32, buf33, 180, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf45 = empty_strided_cuda((82, 1), (1, 1), torch.float32)
        buf35 = reinterpret_tensor(buf45, (18, 1), (1, 1), 0)
        extern_kernels.addmm(primals_22, buf33, reinterpret_tensor(
            primals_21, (10, 1), (1, 10), 0), alpha=1, beta=1, out=buf35)
        buf37 = empty_strided_cuda((64, 100), (100, 1), torch.float32)
        extern_kernels.addmm(primals_16, reinterpret_tensor(buf36, (64, 
            1152), (1152, 1), 0), reinterpret_tensor(primals_15, (1152, 100
            ), (1, 1152), 0), alpha=1, beta=1, out=buf37)
        del primals_16
        buf38 = empty_strided_cuda((64, 100), (100, 1), torch.float32)
        triton_poi_fused_elu_14[grid(6400)](buf37, buf38, 6400, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf39 = empty_strided_cuda((64, 50), (50, 1), torch.float32)
        extern_kernels.addmm(primals_18, buf38, reinterpret_tensor(
            primals_17, (100, 50), (1, 100), 0), alpha=1, beta=1, out=buf39)
        del primals_18
        buf40 = empty_strided_cuda((64, 50), (50, 1), torch.float32)
        triton_poi_fused_elu_15[grid(3200)](buf39, buf40, 3200, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf41 = empty_strided_cuda((64, 10), (10, 1), torch.float32)
        extern_kernels.addmm(primals_20, buf40, reinterpret_tensor(
            primals_19, (50, 10), (1, 50), 0), alpha=1, beta=1, out=buf41)
        del primals_20
        buf42 = empty_strided_cuda((64, 10), (10, 1), torch.float32)
        triton_poi_fused_elu_16[grid(640)](buf41, buf42, 640, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf44 = reinterpret_tensor(buf45, (64, 1), (1, 1), 18)
        extern_kernels.addmm(primals_22, buf42, reinterpret_tensor(
            primals_21, (10, 1), (1, 10), 0), alpha=1, beta=1, out=buf44)
        del primals_22
    return (buf45, primals_2, primals_4, primals_6, primals_8, primals_10,
        buf0, buf2, buf3, buf5, buf6, buf8, buf9, buf11, buf12, buf14,
        buf17, buf24, buf25, reinterpret_tensor(buf26, (18, 1152), (1152, 1
        ), 0), buf28, buf29, buf30, buf31, buf32, buf33, reinterpret_tensor
        (buf36, (64, 1152), (1152, 1), 0), buf37, buf38, buf39, buf40,
        buf41, buf42, primals_21, primals_19, primals_17, primals_15)


class LambdaLayer(nn.Module):

    def __init__(self, lambd):
        super(LambdaLayer, self).__init__()
        self.lambd = lambd

    def forward(self, x):
        return self.lambd(x)


class net_nvidia_featshift_pytorchNew(nn.Module):

    def __init__(self):
        super(net_nvidia_featshift_pytorchNew, self).__init__()
        self.conv1 = nn.Conv2d(3, 24, 5, 2)
        self.conv2 = nn.Conv2d(24, 36, 5, 2)
        self.conv3 = nn.Conv2d(36, 48, 5, 2)
        self.conv4 = nn.Conv2d(48, 64, 3)
        self.conv5 = nn.Conv2d(64, 64, 3)
        self.fc1 = nn.Linear(64 * 1 * 18, 100)
        self.fc2 = nn.Linear(100, 50)
        self.fc3 = nn.Linear(50, 10)
        self.fc4 = nn.Linear(10, 1)

    def forward(self, input_0, input_1, input_2, input_3):
        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_15 = self.fc1.weight
        primals_16 = self.fc1.bias
        primals_17 = self.fc2.weight
        primals_18 = self.fc2.bias
        primals_19 = self.fc3.weight
        primals_20 = self.fc3.bias
        primals_21 = self.fc4.weight
        primals_22 = self.fc4.bias
        primals_1 = input_0
        primals_13 = input_1
        primals_12 = input_2
        primals_14 = input_3
        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])
        return output[0]


Measured latency_ms: 0.259143