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.functional as F
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_stack_0(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 320
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 8
    x1 = xindex // 8 % 4
    x3 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (4 * x1 + x0), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 8, tl.int64)
    tmp9 = tl.load(in_ptr1 + (4 * x1 + (-4 + x0)), tmp6 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tl.store(out_ptr0 + x3, tmp10, xmask)


@triton.jit
def triton_for_fused_1(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5,
    in_ptr6, in_ptr7, in_ptr8, in_ptr9, out_ptr0, out_ptr1, out_ptr2,
    out_ptr3, out_ptr4, out_ptr5, out_ptr6, out_ptr7, out_ptr8, out_ptr9):
    pid = tl.program_id(0)
    XBLOCK: tl.constexpr = 1024
    num_xblocks_0 = tl.cdiv(2048, XBLOCK)
    num_xblocks_1 = num_xblocks_0 + tl.cdiv(2048, XBLOCK)
    num_xblocks_2 = num_xblocks_1 + tl.cdiv(2048, XBLOCK)
    num_xblocks_3 = num_xblocks_2 + tl.cdiv(2048, XBLOCK)
    num_xblocks_4 = num_xblocks_3 + tl.cdiv(2048, XBLOCK)
    num_xblocks_5 = num_xblocks_4 + tl.cdiv(2048, XBLOCK)
    num_xblocks_6 = num_xblocks_5 + tl.cdiv(2048, XBLOCK)
    num_xblocks_7 = num_xblocks_6 + tl.cdiv(2048, XBLOCK)
    num_xblocks_8 = num_xblocks_7 + tl.cdiv(2048, XBLOCK)
    num_xblocks_9 = num_xblocks_8 + tl.cdiv(2048, XBLOCK)
    if pid < num_xblocks_0:
        pid_offset = pid
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x0 = xindex
        tmp0 = tl.load(in_ptr0 + x0, None)
        tl.store(out_ptr0 + x0, tmp0, None)
    elif pid < num_xblocks_1:
        pid_offset = pid - num_xblocks_0
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x1 = xindex
        tmp1 = tl.load(in_ptr1 + x1, None)
        tl.store(out_ptr1 + x1, tmp1, None)
    elif pid < num_xblocks_2:
        pid_offset = pid - num_xblocks_1
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x2 = xindex
        tmp2 = tl.load(in_ptr2 + x2, None)
        tl.store(out_ptr2 + x2, tmp2, None)
    elif pid < num_xblocks_3:
        pid_offset = pid - num_xblocks_2
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x3 = xindex
        tmp3 = tl.load(in_ptr3 + x3, None)
        tl.store(out_ptr3 + x3, tmp3, None)
    elif pid < num_xblocks_4:
        pid_offset = pid - num_xblocks_3
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x4 = xindex
        tmp4 = tl.load(in_ptr4 + x4, None)
        tl.store(out_ptr4 + x4, tmp4, None)
    elif pid < num_xblocks_5:
        pid_offset = pid - num_xblocks_4
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x5 = xindex
        tmp5 = tl.load(in_ptr5 + x5, None)
        tl.store(out_ptr5 + x5, tmp5, None)
    elif pid < num_xblocks_6:
        pid_offset = pid - num_xblocks_5
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x6 = xindex
        tmp6 = tl.load(in_ptr6 + x6, None)
        tl.store(out_ptr6 + x6, tmp6, None)
    elif pid < num_xblocks_7:
        pid_offset = pid - num_xblocks_6
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x7 = xindex
        tmp7 = tl.load(in_ptr7 + x7, None)
        tl.store(out_ptr7 + x7, tmp7, None)
    elif pid < num_xblocks_8:
        pid_offset = pid - num_xblocks_7
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x8 = xindex
        tmp8 = tl.load(in_ptr8 + x8, None)
        tl.store(out_ptr8 + x8, tmp8, None)
    elif pid < num_xblocks_9:
        pid_offset = pid - num_xblocks_8
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x9 = xindex
        tmp9 = tl.load(in_ptr9 + x9, None)
        tl.store(out_ptr9 + x9, tmp9, None)
    else:
        pass


@triton.jit
def triton_for_fused_2(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5,
    in_ptr6, in_ptr7, in_ptr8, in_ptr9, out_ptr0, out_ptr1, out_ptr2,
    out_ptr3, out_ptr4, out_ptr5, out_ptr6, out_ptr7, out_ptr8, out_ptr9):
    pid = tl.program_id(0)
    XBLOCK: tl.constexpr = 1024
    num_xblocks_0 = tl.cdiv(256, XBLOCK)
    num_xblocks_1 = num_xblocks_0 + tl.cdiv(256, XBLOCK)
    num_xblocks_2 = num_xblocks_1 + tl.cdiv(256, XBLOCK)
    num_xblocks_3 = num_xblocks_2 + tl.cdiv(256, XBLOCK)
    num_xblocks_4 = num_xblocks_3 + tl.cdiv(256, XBLOCK)
    num_xblocks_5 = num_xblocks_4 + tl.cdiv(256, XBLOCK)
    num_xblocks_6 = num_xblocks_5 + tl.cdiv(256, XBLOCK)
    num_xblocks_7 = num_xblocks_6 + tl.cdiv(256, XBLOCK)
    num_xblocks_8 = num_xblocks_7 + tl.cdiv(256, XBLOCK)
    num_xblocks_9 = num_xblocks_8 + tl.cdiv(256, XBLOCK)
    if pid < num_xblocks_0:
        pid_offset = pid
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x0 = xindex
        tmp0 = tl.load(in_ptr0 + x0, xmask)
        tl.store(out_ptr0 + x0, tmp0, xmask)
    elif pid < num_xblocks_1:
        pid_offset = pid - num_xblocks_0
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x1 = xindex
        tmp1 = tl.load(in_ptr1 + x1, xmask)
        tl.store(out_ptr1 + x1, tmp1, xmask)
    elif pid < num_xblocks_2:
        pid_offset = pid - num_xblocks_1
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x2 = xindex
        tmp2 = tl.load(in_ptr2 + x2, xmask)
        tl.store(out_ptr2 + x2, tmp2, xmask)
    elif pid < num_xblocks_3:
        pid_offset = pid - num_xblocks_2
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x3 = xindex
        tmp3 = tl.load(in_ptr3 + x3, xmask)
        tl.store(out_ptr3 + x3, tmp3, xmask)
    elif pid < num_xblocks_4:
        pid_offset = pid - num_xblocks_3
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x4 = xindex
        tmp4 = tl.load(in_ptr4 + x4, xmask)
        tl.store(out_ptr4 + x4, tmp4, xmask)
    elif pid < num_xblocks_5:
        pid_offset = pid - num_xblocks_4
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x5 = xindex
        tmp5 = tl.load(in_ptr5 + x5, xmask)
        tl.store(out_ptr5 + x5, tmp5, xmask)
    elif pid < num_xblocks_6:
        pid_offset = pid - num_xblocks_5
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x6 = xindex
        tmp6 = tl.load(in_ptr6 + x6, xmask)
        tl.store(out_ptr6 + x6, tmp6, xmask)
    elif pid < num_xblocks_7:
        pid_offset = pid - num_xblocks_6
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x7 = xindex
        tmp7 = tl.load(in_ptr7 + x7, xmask)
        tl.store(out_ptr7 + x7, tmp7, xmask)
    elif pid < num_xblocks_8:
        pid_offset = pid - num_xblocks_7
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x8 = xindex
        tmp8 = tl.load(in_ptr8 + x8, xmask)
        tl.store(out_ptr8 + x8, tmp8, xmask)
    elif pid < num_xblocks_9:
        pid_offset = pid - num_xblocks_8
        xnumel = 256
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        xmask = xindex < xnumel
        x9 = xindex
        tmp9 = tl.load(in_ptr9 + x9, xmask)
        tl.store(out_ptr9 + x9, tmp9, xmask)
    else:
        pass


@triton.jit
def triton_poi_fused_stack_3(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_4(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (256 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (1024 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_5(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (512 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (2048 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_6(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (768 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (3072 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_7(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (1024 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (4096 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_8(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (1280 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (5120 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_9(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (1536 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (6144 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_10(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (1792 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (7168 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_11(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (2048 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (8192 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_12(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 256
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (2304 + x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (9216 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + x2, tmp2, xmask)


@triton.jit
def triton_for_fused_13(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, in_ptr8, in_ptr9, out_ptr0, out_ptr1,
    out_ptr2, out_ptr3, out_ptr4, out_ptr5, out_ptr6, out_ptr7, out_ptr8,
    out_ptr9):
    pid = tl.program_id(0)
    XBLOCK: tl.constexpr = 1024
    num_xblocks_0 = tl.cdiv(65536, XBLOCK)
    num_xblocks_1 = num_xblocks_0 + tl.cdiv(65536, XBLOCK)
    num_xblocks_2 = num_xblocks_1 + tl.cdiv(65536, XBLOCK)
    num_xblocks_3 = num_xblocks_2 + tl.cdiv(65536, XBLOCK)
    num_xblocks_4 = num_xblocks_3 + tl.cdiv(65536, XBLOCK)
    num_xblocks_5 = num_xblocks_4 + tl.cdiv(65536, XBLOCK)
    num_xblocks_6 = num_xblocks_5 + tl.cdiv(65536, XBLOCK)
    num_xblocks_7 = num_xblocks_6 + tl.cdiv(65536, XBLOCK)
    num_xblocks_8 = num_xblocks_7 + tl.cdiv(65536, XBLOCK)
    num_xblocks_9 = num_xblocks_8 + tl.cdiv(65536, XBLOCK)
    if pid < num_xblocks_0:
        pid_offset = pid
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x0 = xindex
        tmp0 = tl.load(in_ptr0 + x0, None)
        tl.store(out_ptr0 + x0, tmp0, None)
    elif pid < num_xblocks_1:
        pid_offset = pid - num_xblocks_0
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x1 = xindex
        tmp1 = tl.load(in_ptr1 + x1, None)
        tl.store(out_ptr1 + x1, tmp1, None)
    elif pid < num_xblocks_2:
        pid_offset = pid - num_xblocks_1
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x2 = xindex
        tmp2 = tl.load(in_ptr2 + x2, None)
        tl.store(out_ptr2 + x2, tmp2, None)
    elif pid < num_xblocks_3:
        pid_offset = pid - num_xblocks_2
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x3 = xindex
        tmp3 = tl.load(in_ptr3 + x3, None)
        tl.store(out_ptr3 + x3, tmp3, None)
    elif pid < num_xblocks_4:
        pid_offset = pid - num_xblocks_3
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x4 = xindex
        tmp4 = tl.load(in_ptr4 + x4, None)
        tl.store(out_ptr4 + x4, tmp4, None)
    elif pid < num_xblocks_5:
        pid_offset = pid - num_xblocks_4
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x5 = xindex
        tmp5 = tl.load(in_ptr5 + x5, None)
        tl.store(out_ptr5 + x5, tmp5, None)
    elif pid < num_xblocks_6:
        pid_offset = pid - num_xblocks_5
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x6 = xindex
        tmp6 = tl.load(in_ptr6 + x6, None)
        tl.store(out_ptr6 + x6, tmp6, None)
    elif pid < num_xblocks_7:
        pid_offset = pid - num_xblocks_6
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x7 = xindex
        tmp7 = tl.load(in_ptr7 + x7, None)
        tl.store(out_ptr7 + x7, tmp7, None)
    elif pid < num_xblocks_8:
        pid_offset = pid - num_xblocks_7
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x8 = xindex
        tmp8 = tl.load(in_ptr8 + x8, None)
        tl.store(out_ptr8 + x8, tmp8, None)
    elif pid < num_xblocks_9:
        pid_offset = pid - num_xblocks_8
        xoffset = pid_offset * XBLOCK
        xindex = xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        x9 = xindex
        tmp9 = tl.load(in_ptr9 + x9, None)
        tl.store(out_ptr9 + x9, tmp9, None)
    else:
        pass


@triton.jit
def triton_for_fused_14(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, in_ptr8, in_ptr9, out_ptr0, out_ptr1,
    out_ptr2, out_ptr3, out_ptr4, out_ptr5, out_ptr6, out_ptr7, out_ptr8,
    out_ptr9):
    pid = tl.program_id(0)
    XBLOCK: tl.constexpr = 1024
    num_xblocks_0 = tl.cdiv(1, XBLOCK)
    num_xblocks_1 = num_xblocks_0 + tl.cdiv(1, XBLOCK)
    num_xblocks_2 = num_xblocks_1 + tl.cdiv(1, XBLOCK)
    num_xblocks_3 = num_xblocks_2 + tl.cdiv(1, XBLOCK)
    num_xblocks_4 = num_xblocks_3 + tl.cdiv(1, XBLOCK)
    num_xblocks_5 = num_xblocks_4 + tl.cdiv(1, XBLOCK)
    num_xblocks_6 = num_xblocks_5 + tl.cdiv(1, XBLOCK)
    num_xblocks_7 = num_xblocks_6 + tl.cdiv(1, XBLOCK)
    num_xblocks_8 = num_xblocks_7 + tl.cdiv(1, XBLOCK)
    num_xblocks_9 = num_xblocks_8 + tl.cdiv(1, XBLOCK)
    if pid < num_xblocks_0:
        pid_offset = pid
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp0 = tl.load(in_ptr0 + 0)
        tmp1 = tl.broadcast_to(tmp0, [XBLOCK])
        tl.store(out_ptr0 + tl.full([XBLOCK], 0, tl.int32), tmp1, None)
    elif pid < num_xblocks_1:
        pid_offset = pid - num_xblocks_0
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp2 = tl.load(in_ptr1 + 0)
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK])
        tl.store(out_ptr1 + tl.full([XBLOCK], 0, tl.int32), tmp3, None)
    elif pid < num_xblocks_2:
        pid_offset = pid - num_xblocks_1
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp4 = tl.load(in_ptr2 + 0)
        tmp5 = tl.broadcast_to(tmp4, [XBLOCK])
        tl.store(out_ptr2 + tl.full([XBLOCK], 0, tl.int32), tmp5, None)
    elif pid < num_xblocks_3:
        pid_offset = pid - num_xblocks_2
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp6 = tl.load(in_ptr3 + 0)
        tmp7 = tl.broadcast_to(tmp6, [XBLOCK])
        tl.store(out_ptr3 + tl.full([XBLOCK], 0, tl.int32), tmp7, None)
    elif pid < num_xblocks_4:
        pid_offset = pid - num_xblocks_3
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp8 = tl.load(in_ptr4 + 0)
        tmp9 = tl.broadcast_to(tmp8, [XBLOCK])
        tl.store(out_ptr4 + tl.full([XBLOCK], 0, tl.int32), tmp9, None)
    elif pid < num_xblocks_5:
        pid_offset = pid - num_xblocks_4
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp10 = tl.load(in_ptr5 + 0)
        tmp11 = tl.broadcast_to(tmp10, [XBLOCK])
        tl.store(out_ptr5 + tl.full([XBLOCK], 0, tl.int32), tmp11, None)
    elif pid < num_xblocks_6:
        pid_offset = pid - num_xblocks_5
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp12 = tl.load(in_ptr6 + 0)
        tmp13 = tl.broadcast_to(tmp12, [XBLOCK])
        tl.store(out_ptr6 + tl.full([XBLOCK], 0, tl.int32), tmp13, None)
    elif pid < num_xblocks_7:
        pid_offset = pid - num_xblocks_6
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp14 = tl.load(in_ptr7 + 0)
        tmp15 = tl.broadcast_to(tmp14, [XBLOCK])
        tl.store(out_ptr7 + tl.full([XBLOCK], 0, tl.int32), tmp15, None)
    elif pid < num_xblocks_8:
        pid_offset = pid - num_xblocks_7
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp16 = tl.load(in_ptr8 + 0)
        tmp17 = tl.broadcast_to(tmp16, [XBLOCK])
        tl.store(out_ptr8 + tl.full([XBLOCK], 0, tl.int32), tmp17, None)
    elif pid < num_xblocks_9:
        pid_offset = pid - num_xblocks_8
        xoffset = pid_offset * XBLOCK
        xoffset + tl.arange(0, XBLOCK)[:]
        tl.full([XBLOCK], True, tl.int1)
        tmp18 = tl.load(in_ptr9 + 0)
        tmp19 = tl.broadcast_to(tmp18, [XBLOCK])
        tl.store(out_ptr9 + tl.full([XBLOCK], 0, tl.int32), tmp19, None)
    else:
        pass


@triton.jit
def triton_poi_fused_stack_15(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_16(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (1024 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_17(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (2048 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_18(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (3072 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_19(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (4096 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_20(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (5120 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_21(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (6144 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_22(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (7168 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_23(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (8192 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_stack_24(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (9216 + x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_baddbmm_25(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 40
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_out_ptr0 + x2, xmask)
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x2, tmp2, xmask)


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


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, primals_26, primals_27,
        primals_28, primals_29, primals_30, primals_31, primals_32,
        primals_33, primals_34, primals_35, primals_36, primals_37,
        primals_38, primals_39, primals_40, primals_41, primals_42,
        primals_43, primals_44, primals_45, primals_46, primals_47,
        primals_48, primals_49, primals_50, primals_51, primals_52,
        primals_53, primals_54, primals_55, primals_56, primals_57,
        primals_58, primals_59, primals_60, primals_61, primals_62) = args
    args.clear()
    assert_size_stride(primals_1, (4, 4), (4, 1))
    assert_size_stride(primals_2, (4, 4), (4, 1))
    assert_size_stride(primals_3, (256, 8), (8, 1))
    assert_size_stride(primals_4, (256,), (1,))
    assert_size_stride(primals_5, (256, 256), (256, 1))
    assert_size_stride(primals_6, (256,), (1,))
    assert_size_stride(primals_7, (1, 256), (256, 1))
    assert_size_stride(primals_8, (1,), (1,))
    assert_size_stride(primals_9, (256, 8), (8, 1))
    assert_size_stride(primals_10, (256,), (1,))
    assert_size_stride(primals_11, (256, 256), (256, 1))
    assert_size_stride(primals_12, (256,), (1,))
    assert_size_stride(primals_13, (1, 256), (256, 1))
    assert_size_stride(primals_14, (1,), (1,))
    assert_size_stride(primals_15, (256, 8), (8, 1))
    assert_size_stride(primals_16, (256,), (1,))
    assert_size_stride(primals_17, (256, 256), (256, 1))
    assert_size_stride(primals_18, (256,), (1,))
    assert_size_stride(primals_19, (1, 256), (256, 1))
    assert_size_stride(primals_20, (1,), (1,))
    assert_size_stride(primals_21, (256, 8), (8, 1))
    assert_size_stride(primals_22, (256,), (1,))
    assert_size_stride(primals_23, (256, 256), (256, 1))
    assert_size_stride(primals_24, (256,), (1,))
    assert_size_stride(primals_25, (1, 256), (256, 1))
    assert_size_stride(primals_26, (1,), (1,))
    assert_size_stride(primals_27, (256, 8), (8, 1))
    assert_size_stride(primals_28, (256,), (1,))
    assert_size_stride(primals_29, (256, 256), (256, 1))
    assert_size_stride(primals_30, (256,), (1,))
    assert_size_stride(primals_31, (1, 256), (256, 1))
    assert_size_stride(primals_32, (1,), (1,))
    assert_size_stride(primals_33, (256, 8), (8, 1))
    assert_size_stride(primals_34, (256,), (1,))
    assert_size_stride(primals_35, (256, 256), (256, 1))
    assert_size_stride(primals_36, (256,), (1,))
    assert_size_stride(primals_37, (1, 256), (256, 1))
    assert_size_stride(primals_38, (1,), (1,))
    assert_size_stride(primals_39, (256, 8), (8, 1))
    assert_size_stride(primals_40, (256,), (1,))
    assert_size_stride(primals_41, (256, 256), (256, 1))
    assert_size_stride(primals_42, (256,), (1,))
    assert_size_stride(primals_43, (1, 256), (256, 1))
    assert_size_stride(primals_44, (1,), (1,))
    assert_size_stride(primals_45, (256, 8), (8, 1))
    assert_size_stride(primals_46, (256,), (1,))
    assert_size_stride(primals_47, (256, 256), (256, 1))
    assert_size_stride(primals_48, (256,), (1,))
    assert_size_stride(primals_49, (1, 256), (256, 1))
    assert_size_stride(primals_50, (1,), (1,))
    assert_size_stride(primals_51, (256, 8), (8, 1))
    assert_size_stride(primals_52, (256,), (1,))
    assert_size_stride(primals_53, (256, 256), (256, 1))
    assert_size_stride(primals_54, (256,), (1,))
    assert_size_stride(primals_55, (1, 256), (256, 1))
    assert_size_stride(primals_56, (1,), (1,))
    assert_size_stride(primals_57, (256, 8), (8, 1))
    assert_size_stride(primals_58, (256,), (1,))
    assert_size_stride(primals_59, (256, 256), (256, 1))
    assert_size_stride(primals_60, (256,), (1,))
    assert_size_stride(primals_61, (1, 256), (256, 1))
    assert_size_stride(primals_62, (1,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((10, 4, 8), (32, 8, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_stack_0[grid(320)](primals_1, primals_2, buf0, 320,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_1
        del primals_2
        buf11 = empty_strided_cuda((2560, 8), (8, 1), torch.float32)
        buf1 = reinterpret_tensor(buf11, (256, 8), (8, 1), 0)
        buf2 = reinterpret_tensor(buf11, (256, 8), (8, 1), 2048)
        buf3 = reinterpret_tensor(buf11, (256, 8), (8, 1), 4096)
        buf4 = reinterpret_tensor(buf11, (256, 8), (8, 1), 6144)
        buf5 = reinterpret_tensor(buf11, (256, 8), (8, 1), 8192)
        buf6 = reinterpret_tensor(buf11, (256, 8), (8, 1), 10240)
        buf7 = reinterpret_tensor(buf11, (256, 8), (8, 1), 12288)
        buf8 = reinterpret_tensor(buf11, (256, 8), (8, 1), 14336)
        buf9 = reinterpret_tensor(buf11, (256, 8), (8, 1), 16384)
        buf10 = reinterpret_tensor(buf11, (256, 8), (8, 1), 18432)
        triton_for_fused_1[20, 1, 1](primals_3, primals_9, primals_15,
            primals_21, primals_27, primals_33, primals_39, primals_45,
            primals_51, primals_57, buf1, buf2, buf3, buf4, buf5, buf6,
            buf7, buf8, buf9, buf10, num_warps=8, num_stages=1)
        del primals_15
        del primals_21
        del primals_27
        del primals_3
        del primals_33
        del primals_39
        del primals_45
        del primals_51
        del primals_57
        del primals_9
        buf22 = empty_strided_cuda((2560,), (1,), torch.float32)
        buf12 = reinterpret_tensor(buf22, (256,), (1,), 0)
        buf13 = reinterpret_tensor(buf22, (256,), (1,), 256)
        buf14 = reinterpret_tensor(buf22, (256,), (1,), 512)
        buf15 = reinterpret_tensor(buf22, (256,), (1,), 768)
        buf16 = reinterpret_tensor(buf22, (256,), (1,), 1024)
        buf17 = reinterpret_tensor(buf22, (256,), (1,), 1280)
        buf18 = reinterpret_tensor(buf22, (256,), (1,), 1536)
        buf19 = reinterpret_tensor(buf22, (256,), (1,), 1792)
        buf20 = reinterpret_tensor(buf22, (256,), (1,), 2048)
        buf21 = reinterpret_tensor(buf22, (256,), (1,), 2304)
        triton_for_fused_2[10, 1, 1](primals_4, primals_10, primals_16,
            primals_22, primals_28, primals_34, primals_40, primals_46,
            primals_52, primals_58, buf12, buf13, buf14, buf15, buf16,
            buf17, buf18, buf19, buf20, buf21, num_warps=8, num_stages=1)
        del buf1
        del buf10
        del buf2
        del buf3
        del buf4
        del buf5
        del buf6
        del buf7
        del buf8
        del buf9
        del primals_10
        del primals_16
        del primals_22
        del primals_28
        del primals_34
        del primals_4
        del primals_40
        del primals_46
        del primals_52
        del primals_58
        del buf12
        del buf13
        del buf14
        del buf15
        del buf16
        del buf17
        del buf18
        del buf19
        del buf20
        del buf21
        buf23 = empty_strided_cuda((10, 4, 256), (1024, 256, 1), torch.float32)
        extern_kernels.bmm(buf0, reinterpret_tensor(buf11, (10, 8, 256), (
            2048, 1, 8), 0), out=buf23)
        del buf11
        buf34 = empty_strided_cuda((40, 256), (256, 1), torch.float32)
        buf24 = reinterpret_tensor(buf34, (4, 256), (256, 1), 0)
        triton_poi_fused_stack_3[grid(1024)](buf22, buf23, buf24, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf25 = reinterpret_tensor(buf34, (4, 256), (256, 1), 1024)
        triton_poi_fused_stack_4[grid(1024)](buf22, buf23, buf25, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf26 = reinterpret_tensor(buf34, (4, 256), (256, 1), 2048)
        triton_poi_fused_stack_5[grid(1024)](buf22, buf23, buf26, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf27 = reinterpret_tensor(buf34, (4, 256), (256, 1), 3072)
        triton_poi_fused_stack_6[grid(1024)](buf22, buf23, buf27, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf28 = reinterpret_tensor(buf34, (4, 256), (256, 1), 4096)
        triton_poi_fused_stack_7[grid(1024)](buf22, buf23, buf28, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf29 = reinterpret_tensor(buf34, (4, 256), (256, 1), 5120)
        triton_poi_fused_stack_8[grid(1024)](buf22, buf23, buf29, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf30 = reinterpret_tensor(buf34, (4, 256), (256, 1), 6144)
        triton_poi_fused_stack_9[grid(1024)](buf22, buf23, buf30, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf31 = reinterpret_tensor(buf34, (4, 256), (256, 1), 7168)
        triton_poi_fused_stack_10[grid(1024)](buf22, buf23, buf31, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf32 = reinterpret_tensor(buf34, (4, 256), (256, 1), 8192)
        triton_poi_fused_stack_11[grid(1024)](buf22, buf23, buf32, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf33 = reinterpret_tensor(buf34, (4, 256), (256, 1), 9216)
        triton_poi_fused_stack_12[grid(1024)](buf22, buf23, buf33, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf45 = empty_strided_cuda((2560, 256), (256, 1), torch.float32)
        buf35 = reinterpret_tensor(buf45, (256, 256), (256, 1), 0)
        buf36 = reinterpret_tensor(buf45, (256, 256), (256, 1), 65536)
        buf37 = reinterpret_tensor(buf45, (256, 256), (256, 1), 131072)
        buf38 = reinterpret_tensor(buf45, (256, 256), (256, 1), 196608)
        buf39 = reinterpret_tensor(buf45, (256, 256), (256, 1), 262144)
        buf40 = reinterpret_tensor(buf45, (256, 256), (256, 1), 327680)
        buf41 = reinterpret_tensor(buf45, (256, 256), (256, 1), 393216)
        buf42 = reinterpret_tensor(buf45, (256, 256), (256, 1), 458752)
        buf43 = reinterpret_tensor(buf45, (256, 256), (256, 1), 524288)
        buf44 = reinterpret_tensor(buf45, (256, 256), (256, 1), 589824)
        triton_for_fused_13[640, 1, 1](primals_5, primals_11, primals_17,
            primals_23, primals_29, primals_35, primals_41, primals_47,
            primals_53, primals_59, buf35, buf36, buf37, buf38, buf39,
            buf40, buf41, buf42, buf43, buf44, num_warps=8, num_stages=1)
        del buf24
        del buf25
        del buf26
        del buf27
        del buf28
        del buf29
        del buf30
        del buf31
        del buf32
        del buf33
        del primals_11
        del primals_17
        del primals_23
        del primals_29
        del primals_35
        del primals_41
        del primals_47
        del primals_5
        del primals_53
        del primals_59
        buf56 = buf22
        del buf22
        buf46 = reinterpret_tensor(buf56, (256,), (1,), 0)
        buf47 = reinterpret_tensor(buf56, (256,), (1,), 256)
        buf48 = reinterpret_tensor(buf56, (256,), (1,), 512)
        buf49 = reinterpret_tensor(buf56, (256,), (1,), 768)
        buf50 = reinterpret_tensor(buf56, (256,), (1,), 1024)
        buf51 = reinterpret_tensor(buf56, (256,), (1,), 1280)
        buf52 = reinterpret_tensor(buf56, (256,), (1,), 1536)
        buf53 = reinterpret_tensor(buf56, (256,), (1,), 1792)
        buf54 = reinterpret_tensor(buf56, (256,), (1,), 2048)
        buf55 = reinterpret_tensor(buf56, (256,), (1,), 2304)
        triton_for_fused_2[10, 1, 1](primals_6, primals_12, primals_18,
            primals_24, primals_30, primals_36, primals_42, primals_48,
            primals_54, primals_60, buf46, buf47, buf48, buf49, buf50,
            buf51, buf52, buf53, buf54, buf55, num_warps=8, num_stages=1)
        del primals_12
        del primals_18
        del primals_24
        del primals_30
        del primals_36
        del primals_42
        del primals_48
        del primals_54
        del primals_6
        del primals_60
        buf67 = empty_strided_cuda((10, 256), (256, 1), torch.float32)
        buf57 = reinterpret_tensor(buf67, (1, 256), (256, 1), 0)
        buf58 = reinterpret_tensor(buf67, (1, 256), (256, 1), 256)
        buf59 = reinterpret_tensor(buf67, (1, 256), (256, 1), 512)
        buf60 = reinterpret_tensor(buf67, (1, 256), (256, 1), 768)
        buf61 = reinterpret_tensor(buf67, (1, 256), (256, 1), 1024)
        buf62 = reinterpret_tensor(buf67, (1, 256), (256, 1), 1280)
        buf63 = reinterpret_tensor(buf67, (1, 256), (256, 1), 1536)
        buf64 = reinterpret_tensor(buf67, (1, 256), (256, 1), 1792)
        buf65 = reinterpret_tensor(buf67, (1, 256), (256, 1), 2048)
        buf66 = reinterpret_tensor(buf67, (1, 256), (256, 1), 2304)
        triton_for_fused_2[10, 1, 1](primals_7, primals_13, primals_19,
            primals_25, primals_31, primals_37, primals_43, primals_49,
            primals_55, primals_61, buf57, buf58, buf59, buf60, buf61,
            buf62, buf63, buf64, buf65, buf66, num_warps=8, num_stages=1)
        del buf46
        del buf47
        del buf48
        del buf49
        del buf50
        del buf51
        del buf52
        del buf53
        del buf54
        del buf55
        del primals_13
        del primals_19
        del primals_25
        del primals_31
        del primals_37
        del primals_43
        del primals_49
        del primals_55
        del primals_61
        del primals_7
        buf78 = empty_strided_cuda((10,), (1,), torch.float32)
        buf68 = reinterpret_tensor(buf78, (1,), (1,), 0)
        buf69 = reinterpret_tensor(buf78, (1,), (1,), 1)
        buf70 = reinterpret_tensor(buf78, (1,), (1,), 2)
        buf71 = reinterpret_tensor(buf78, (1,), (1,), 3)
        buf72 = reinterpret_tensor(buf78, (1,), (1,), 4)
        buf73 = reinterpret_tensor(buf78, (1,), (1,), 5)
        buf74 = reinterpret_tensor(buf78, (1,), (1,), 6)
        buf75 = reinterpret_tensor(buf78, (1,), (1,), 7)
        buf76 = reinterpret_tensor(buf78, (1,), (1,), 8)
        buf77 = reinterpret_tensor(buf78, (1,), (1,), 9)
        triton_for_fused_14[10, 1, 1](primals_8, primals_14, primals_20,
            primals_26, primals_32, primals_38, primals_44, primals_50,
            primals_56, primals_62, buf68, buf69, buf70, buf71, buf72,
            buf73, buf74, buf75, buf76, buf77, num_warps=8, num_stages=1)
        del primals_14
        del primals_20
        del primals_26
        del primals_32
        del primals_38
        del primals_44
        del primals_50
        del primals_56
        del primals_62
        del primals_8
        buf89 = reinterpret_tensor(buf23, (40, 256), (256, 1), 0)
        del buf23
        buf79 = reinterpret_tensor(buf89, (4, 256), (256, 1), 0)
        triton_poi_fused_stack_15[grid(1024)](buf34, buf79, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        del buf68
        del buf69
        del buf70
        del buf71
        del buf72
        del buf73
        del buf74
        del buf75
        del buf76
        del buf77
        buf80 = reinterpret_tensor(buf89, (4, 256), (256, 1), 1024)
        triton_poi_fused_stack_16[grid(1024)](buf34, buf80, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf81 = reinterpret_tensor(buf89, (4, 256), (256, 1), 2048)
        triton_poi_fused_stack_17[grid(1024)](buf34, buf81, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf82 = reinterpret_tensor(buf89, (4, 256), (256, 1), 3072)
        triton_poi_fused_stack_18[grid(1024)](buf34, buf82, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf83 = reinterpret_tensor(buf89, (4, 256), (256, 1), 4096)
        triton_poi_fused_stack_19[grid(1024)](buf34, buf83, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf84 = reinterpret_tensor(buf89, (4, 256), (256, 1), 5120)
        triton_poi_fused_stack_20[grid(1024)](buf34, buf84, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf85 = reinterpret_tensor(buf89, (4, 256), (256, 1), 6144)
        triton_poi_fused_stack_21[grid(1024)](buf34, buf85, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf86 = reinterpret_tensor(buf89, (4, 256), (256, 1), 7168)
        triton_poi_fused_stack_22[grid(1024)](buf34, buf86, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf87 = reinterpret_tensor(buf89, (4, 256), (256, 1), 8192)
        triton_poi_fused_stack_23[grid(1024)](buf34, buf87, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf88 = reinterpret_tensor(buf89, (4, 256), (256, 1), 9216)
        triton_poi_fused_stack_24[grid(1024)](buf34, buf88, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf90 = empty_strided_cuda((10, 4, 256), (1024, 256, 1), torch.float32)
        extern_kernels.bmm(reinterpret_tensor(buf89, (10, 4, 256), (1024, 
            256, 1), 0), reinterpret_tensor(buf45, (10, 256, 256), (65536, 
            1, 256), 0), out=buf90)
        buf101 = empty_strided_cuda((40, 256), (256, 1), torch.float32)
        buf91 = reinterpret_tensor(buf101, (4, 256), (256, 1), 0)
        triton_poi_fused_stack_3[grid(1024)](buf56, buf90, buf91, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf92 = reinterpret_tensor(buf101, (4, 256), (256, 1), 1024)
        triton_poi_fused_stack_4[grid(1024)](buf56, buf90, buf92, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf93 = reinterpret_tensor(buf101, (4, 256), (256, 1), 2048)
        triton_poi_fused_stack_5[grid(1024)](buf56, buf90, buf93, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf94 = reinterpret_tensor(buf101, (4, 256), (256, 1), 3072)
        triton_poi_fused_stack_6[grid(1024)](buf56, buf90, buf94, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf95 = reinterpret_tensor(buf101, (4, 256), (256, 1), 4096)
        triton_poi_fused_stack_7[grid(1024)](buf56, buf90, buf95, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf96 = reinterpret_tensor(buf101, (4, 256), (256, 1), 5120)
        triton_poi_fused_stack_8[grid(1024)](buf56, buf90, buf96, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf97 = reinterpret_tensor(buf101, (4, 256), (256, 1), 6144)
        triton_poi_fused_stack_9[grid(1024)](buf56, buf90, buf97, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf98 = reinterpret_tensor(buf101, (4, 256), (256, 1), 7168)
        triton_poi_fused_stack_10[grid(1024)](buf56, buf90, buf98, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf99 = reinterpret_tensor(buf101, (4, 256), (256, 1), 8192)
        triton_poi_fused_stack_11[grid(1024)](buf56, buf90, buf99, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf100 = reinterpret_tensor(buf101, (4, 256), (256, 1), 9216)
        triton_poi_fused_stack_12[grid(1024)](buf56, buf90, buf100, 1024,
            XBLOCK=128, num_warps=4, num_stages=1)
        del buf56
        buf112 = reinterpret_tensor(buf90, (40, 256), (256, 1), 0)
        del buf90
        buf102 = reinterpret_tensor(buf112, (4, 256), (256, 1), 0)
        triton_poi_fused_stack_15[grid(1024)](buf101, buf102, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        del buf100
        del buf91
        del buf92
        del buf93
        del buf94
        del buf95
        del buf96
        del buf97
        del buf98
        del buf99
        buf103 = reinterpret_tensor(buf112, (4, 256), (256, 1), 1024)
        triton_poi_fused_stack_16[grid(1024)](buf101, buf103, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf104 = reinterpret_tensor(buf112, (4, 256), (256, 1), 2048)
        triton_poi_fused_stack_17[grid(1024)](buf101, buf104, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf105 = reinterpret_tensor(buf112, (4, 256), (256, 1), 3072)
        triton_poi_fused_stack_18[grid(1024)](buf101, buf105, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf106 = reinterpret_tensor(buf112, (4, 256), (256, 1), 4096)
        triton_poi_fused_stack_19[grid(1024)](buf101, buf106, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf107 = reinterpret_tensor(buf112, (4, 256), (256, 1), 5120)
        triton_poi_fused_stack_20[grid(1024)](buf101, buf107, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf108 = reinterpret_tensor(buf112, (4, 256), (256, 1), 6144)
        triton_poi_fused_stack_21[grid(1024)](buf101, buf108, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf109 = reinterpret_tensor(buf112, (4, 256), (256, 1), 7168)
        triton_poi_fused_stack_22[grid(1024)](buf101, buf109, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf110 = reinterpret_tensor(buf112, (4, 256), (256, 1), 8192)
        triton_poi_fused_stack_23[grid(1024)](buf101, buf110, 1024, XBLOCK=
            128, num_warps=4, num_stages=1)
        buf111 = reinterpret_tensor(buf112, (4, 256), (256, 1), 9216)
        triton_poi_fused_stack_24[grid(1024)](buf101, buf111, 1024, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf113 = empty_strided_cuda((10, 4, 1), (4, 1, 1), torch.float32)
        extern_kernels.bmm(reinterpret_tensor(buf112, (10, 4, 256), (1024, 
            256, 1), 0), reinterpret_tensor(buf67, (10, 256, 1), (256, 1, 
            256), 0), out=buf113)
        buf114 = buf113
        del buf113
        triton_poi_fused_baddbmm_25[grid(40)](buf114, buf78, 40, XBLOCK=64,
            num_warps=1, num_stages=1)
        del buf78
        buf115 = empty_strided_cuda((10, 4, 256), (1024, 256, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_26[grid(10240)](buf101,
            buf115, 10240, XBLOCK=256, num_warps=4, num_stages=1)
        del buf101
        buf116 = empty_strided_cuda((10, 4, 256), (1024, 256, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_26[grid(10240)](buf34,
            buf116, 10240, XBLOCK=256, num_warps=4, num_stages=1)
        del buf34
    return reinterpret_tensor(buf114, (4, 1), (1, 1), 0), reinterpret_tensor(
        buf114, (4, 1), (1, 1), 4), reinterpret_tensor(buf114, (4, 1), (1, 
        1), 8), reinterpret_tensor(buf114, (4, 1), (1, 1), 12
        ), reinterpret_tensor(buf114, (4, 1), (1, 1), 16), reinterpret_tensor(
        buf114, (4, 1), (1, 1), 20), reinterpret_tensor(buf114, (4, 1), (1,
        1), 24), reinterpret_tensor(buf114, (4, 1), (1, 1), 28
        ), reinterpret_tensor(buf114, (4, 1), (1, 1), 32), reinterpret_tensor(
        buf114, (4, 1), (1, 1), 36), reinterpret_tensor(buf67, (10, 1, 256),
        (256, 256, 1), 0), reinterpret_tensor(buf112, (10, 256, 4), (1024, 
        1, 256), 0), buf115, reinterpret_tensor(buf45, (10, 256, 256), (
        65536, 256, 1), 0), reinterpret_tensor(buf89, (10, 256, 4), (1024, 
        1, 256), 0), buf116, reinterpret_tensor(buf0, (10, 8, 4), (32, 1, 8), 0
        )


def weight_init(m):
    """Custom weight init for Conv2D and Linear layers."""
    if isinstance(m, nn.Linear):
        nn.init.orthogonal_(m.weight.data)
        m.bias.data.fill_(0.0)
    elif isinstance(m, nn.Conv2d) or isinstance(m, nn.ConvTranspose2d):
        assert m.weight.size(2) == m.weight.size(3)
        m.weight.data.fill_(0.0)
        m.bias.data.fill_(0.0)
        mid = m.weight.size(2) // 2
        gain = nn.init.calculate_gain('relu')
        nn.init.orthogonal_(m.weight.data[:, :, mid, mid], gain)


class CriticNew(nn.Module):

    def __init__(self, state_dim, action_dim, hidden_dim=256):
        super(CriticNew, self).__init__()
        self.l1 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l2 = nn.Linear(hidden_dim, hidden_dim)
        self.l3 = nn.Linear(hidden_dim, 1)
        self.l4 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l5 = nn.Linear(hidden_dim, hidden_dim)
        self.l6 = nn.Linear(hidden_dim, 1)
        self.l7 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l8 = nn.Linear(hidden_dim, hidden_dim)
        self.l9 = nn.Linear(hidden_dim, 1)
        self.l10 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l11 = nn.Linear(hidden_dim, hidden_dim)
        self.l12 = nn.Linear(hidden_dim, 1)
        self.l13 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l14 = nn.Linear(hidden_dim, hidden_dim)
        self.l15 = nn.Linear(hidden_dim, 1)
        self.l16 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l17 = nn.Linear(hidden_dim, hidden_dim)
        self.l18 = nn.Linear(hidden_dim, 1)
        self.l19 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l20 = nn.Linear(hidden_dim, hidden_dim)
        self.l21 = nn.Linear(hidden_dim, 1)
        self.l22 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l23 = nn.Linear(hidden_dim, hidden_dim)
        self.l24 = nn.Linear(hidden_dim, 1)
        self.l25 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l26 = nn.Linear(hidden_dim, hidden_dim)
        self.l27 = nn.Linear(hidden_dim, 1)
        self.l28 = nn.Linear(state_dim + action_dim, hidden_dim)
        self.l29 = nn.Linear(hidden_dim, hidden_dim)
        self.l30 = nn.Linear(hidden_dim, 1)
        self.apply(weight_init)

    def Qvalue(self, state, action, head=1):
        sa = torch.cat([state, action], dim=1)
        q1 = F.relu(self.l1(sa))
        q1 = F.relu(self.l2(q1))
        q1 = self.l3(q1)
        q2 = F.relu(self.l4(sa))
        q2 = F.relu(self.l5(q2))
        q2 = self.l6(q2)
        q3 = F.relu(self.l7(sa))
        q3 = F.relu(self.l8(q3))
        q3 = self.l9(q3)
        q4 = F.relu(self.l10(sa))
        q4 = F.relu(self.l11(q4))
        q4 = self.l12(q4)
        q5 = F.relu(self.l13(sa))
        q5 = F.relu(self.l14(q5))
        q5 = self.l15(q5)
        q6 = F.relu(self.l16(sa))
        q6 = F.relu(self.l17(q6))
        q6 = self.l18(q6)
        q7 = F.relu(self.l19(sa))
        q7 = F.relu(self.l20(q7))
        q7 = self.l21(q7)
        q8 = F.relu(self.l22(sa))
        q8 = F.relu(self.l23(q8))
        q8 = self.l24(q8)
        q9 = F.relu(self.l25(sa))
        q9 = F.relu(self.l26(q9))
        q9 = self.l27(q9)
        q10 = F.relu(self.l28(sa))
        q10 = F.relu(self.l29(q10))
        q10 = self.l30(q10)
        q_dict = {(1): q1, (2): q2, (3): q3, (4): q4, (5): q5, (6): q6, (7):
            q7, (8): q8, (9): q9, (10): q10}
        if head < 10:
            return q_dict[head], q_dict[head + 1]
        else:
            return q_dict[10], q_dict[1]

    def forward(self, input_0, input_1):
        primals_3 = self.l1.weight
        primals_4 = self.l1.bias
        primals_5 = self.l2.weight
        primals_6 = self.l2.bias
        primals_7 = self.l3.weight
        primals_8 = self.l3.bias
        primals_9 = self.l4.weight
        primals_10 = self.l4.bias
        primals_11 = self.l5.weight
        primals_12 = self.l5.bias
        primals_13 = self.l6.weight
        primals_14 = self.l6.bias
        primals_15 = self.l7.weight
        primals_16 = self.l7.bias
        primals_17 = self.l8.weight
        primals_18 = self.l8.bias
        primals_19 = self.l9.weight
        primals_20 = self.l9.bias
        primals_21 = self.l10.weight
        primals_22 = self.l10.bias
        primals_23 = self.l11.weight
        primals_24 = self.l11.bias
        primals_25 = self.l12.weight
        primals_26 = self.l12.bias
        primals_27 = self.l13.weight
        primals_28 = self.l13.bias
        primals_29 = self.l14.weight
        primals_30 = self.l14.bias
        primals_31 = self.l15.weight
        primals_32 = self.l15.bias
        primals_33 = self.l16.weight
        primals_34 = self.l16.bias
        primals_35 = self.l17.weight
        primals_36 = self.l17.bias
        primals_37 = self.l18.weight
        primals_38 = self.l18.bias
        primals_39 = self.l19.weight
        primals_40 = self.l19.bias
        primals_41 = self.l20.weight
        primals_42 = self.l20.bias
        primals_43 = self.l21.weight
        primals_44 = self.l21.bias
        primals_45 = self.l22.weight
        primals_46 = self.l22.bias
        primals_47 = self.l23.weight
        primals_48 = self.l23.bias
        primals_49 = self.l24.weight
        primals_50 = self.l24.bias
        primals_51 = self.l25.weight
        primals_52 = self.l25.bias
        primals_53 = self.l26.weight
        primals_54 = self.l26.bias
        primals_55 = self.l27.weight
        primals_56 = self.l27.bias
        primals_57 = self.l28.weight
        primals_58 = self.l28.bias
        primals_59 = self.l29.weight
        primals_60 = self.l29.bias
        primals_61 = self.l30.weight
        primals_62 = self.l30.bias
        primals_1 = input_0
        primals_2 = input_1
        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, primals_26, primals_27, primals_28, primals_29,
            primals_30, primals_31, primals_32, primals_33, primals_34,
            primals_35, primals_36, primals_37, primals_38, primals_39,
            primals_40, primals_41, primals_42, primals_43, primals_44,
            primals_45, primals_46, primals_47, primals_48, primals_49,
            primals_50, primals_51, primals_52, primals_53, primals_54,
            primals_55, primals_56, primals_57, primals_58, primals_59,
            primals_60, primals_61, primals_62])
        return output[0], output[1], output[2], output[3], output[4], output[5
            ], output[6], output[7], output[8], output[9]


Measured latency_ms: 0.784276