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, math as tl_math
from torch import 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__to_copy_0(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = 0.0
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_add_tanh_1(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 4
    x2 = xindex // 16
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr1 + (x0 + 4 * x2), xmask, eviction_policy='evict_last'
        )
    tmp2 = tl.load(in_ptr2 + x0, xmask, eviction_policy='evict_last')
    tmp3 = tmp1 + tmp2
    tmp4 = tmp0 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tl.store(out_ptr0 + x3, tmp5, xmask)


@triton.jit
def triton_poi_fused__softmax_2(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x1 = xindex // 4
    tmp0 = tl.load(in_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + 4 * x1, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr0 + (1 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr0 + (2 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr0 + (3 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp3 = triton_helpers.maximum(tmp1, tmp2)
    tmp5 = triton_helpers.maximum(tmp3, tmp4)
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp0 - tmp7
    tmp9 = tl_math.exp(tmp8)
    tl.store(out_ptr0 + x2, tmp9, xmask)


@triton.jit
def triton_poi_fused__softmax_3(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x1 = xindex // 4
    tmp0 = tl.load(in_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + 4 * x1, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr0 + (1 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr0 + (2 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr0 + (3 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp3 = tmp1 + tmp2
    tmp5 = tmp3 + tmp4
    tmp7 = tmp5 + tmp6
    tmp8 = tmp0 / tmp7
    tl.store(out_ptr0 + x2, tmp8, xmask)


@triton.jit
def triton_poi_fused_cat_4(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 8
    x1 = xindex // 8
    x2 = xindex
    tmp0 = x0
    tmp1 = 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 = -4 + x0
    tmp10 = tmp1 == tmp9
    tmp11 = tmp10.to(tl.int32)
    tmp12 = tmp11.to(tl.float32)
    tmp13 = tl.full(tmp12.shape, 0.0, tmp12.dtype)
    tmp14 = tl.where(tmp6, tmp12, tmp13)
    tmp15 = tl.where(tmp4, tmp5, tmp14)
    tl.store(out_ptr0 + x2, tmp15, xmask)


@triton.jit
def triton_poi_fused_argmax_5(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + 4 * x0, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp17 = tl.load(in_ptr0 + (2 + 4 * x0), xmask, eviction_policy='evict_last'
        )
    tmp32 = tl.load(in_ptr0 + (3 + 4 * x0), xmask, eviction_policy='evict_last'
        )
    tmp2 = tmp0 > tmp1
    tmp3 = tmp0 == tmp1
    tmp4 = tmp0 != tmp0
    tmp5 = tmp1 != tmp1
    tmp6 = tmp4 > tmp5
    tmp7 = tmp2 | tmp6
    tmp8 = tmp4 & tmp5
    tmp9 = tmp3 | tmp8
    tmp10 = tl.full([1], 0, tl.int64)
    tmp11 = tl.full([1], 1, tl.int64)
    tmp12 = tmp10 < tmp11
    tmp13 = tmp9 & tmp12
    tmp14 = tmp7 | tmp13
    tmp15 = tl.where(tmp14, tmp0, tmp1)
    tmp16 = tl.where(tmp14, tmp10, tmp11)
    tmp18 = tmp15 > tmp17
    tmp19 = tmp15 == tmp17
    tmp20 = tmp15 != tmp15
    tmp21 = tmp17 != tmp17
    tmp22 = tmp20 > tmp21
    tmp23 = tmp18 | tmp22
    tmp24 = tmp20 & tmp21
    tmp25 = tmp19 | tmp24
    tmp26 = tl.full([1], 2, tl.int64)
    tmp27 = tmp16 < tmp26
    tmp28 = tmp25 & tmp27
    tmp29 = tmp23 | tmp28
    tmp30 = tl.where(tmp29, tmp15, tmp17)
    tmp31 = tl.where(tmp29, tmp16, tmp26)
    tmp33 = tmp30 > tmp32
    tmp34 = tmp30 == tmp32
    tmp35 = tmp30 != tmp30
    tmp36 = tmp32 != tmp32
    tmp37 = tmp35 > tmp36
    tmp38 = tmp33 | tmp37
    tmp39 = tmp35 & tmp36
    tmp40 = tmp34 | tmp39
    tmp41 = tl.full([1], 3, tl.int64)
    tmp42 = tmp31 < tmp41
    tmp43 = tmp40 & tmp42
    tmp44 = tmp38 | tmp43
    tl.where(tmp44, tmp30, tmp32)
    tmp46 = tl.where(tmp44, tmp31, tmp41)
    tl.store(out_ptr0 + x0, tmp46, xmask)


@triton.jit
def triton_poi_fused_cat_6(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 8
    x1 = xindex // 8
    x2 = 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 + x1, tmp6 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp10 = -4 + x0
    tmp11 = tmp9 == tmp10
    tmp12 = tmp11.to(tl.int64)
    tmp13 = tmp12.to(tl.float32)
    tmp14 = tl.full(tmp13.shape, 0.0, tmp13.dtype)
    tmp15 = tl.where(tmp6, tmp13, tmp14)
    tmp16 = tl.where(tmp4, tmp5, tmp15)
    tl.store(out_ptr0 + x2, tmp16, xmask)


@triton.jit
def triton_poi_fused_cat_7(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 4
    x0 = xindex % 4
    x2 = xindex // 16
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 3, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.full([1], 2, tl.int64)
    tmp6 = tmp0 < tmp5
    tmp7 = tmp6 & tmp4
    tmp8 = tl.full([1], 1, tl.int64)
    tmp9 = tmp0 < tmp8
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (x0 + 4 * x2), tmp10 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp12 = tmp0 >= tmp8
    tmp13 = tmp12 & tmp7
    tmp14 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp13 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp15 = tl.where(tmp9, tmp11, tmp14)
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp7, tmp15, tmp16)
    tmp18 = tmp0 >= tmp5
    tmp19 = tmp18 & tmp4
    tmp20 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp19 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tl.where(tmp6, tmp17, tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 4, tl.int64)
    tmp27 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp24 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp28 = tl.where(tmp4, tmp23, tmp27)
    tl.store(out_ptr0 + x3, tmp28, xmask)


@triton.jit
def triton_poi_fused_cat_8(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 112
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 7
    x0 = xindex % 4
    x2 = xindex // 28
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 6, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.full([1], 5, tl.int64)
    tmp6 = tmp0 < tmp5
    tmp7 = tmp6 & tmp4
    tmp8 = tl.full([1], 4, tl.int64)
    tmp9 = tmp0 < tmp8
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (x0 + 4 * x1 + 16 * x2), tmp10 & xmask, other=0.0
        )
    tmp12 = tmp0 >= tmp8
    tmp13 = tmp12 & tmp7
    tmp14 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp13 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp15 = tl.where(tmp9, tmp11, tmp14)
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp7, tmp15, tmp16)
    tmp18 = tmp0 >= tmp5
    tmp19 = tmp18 & tmp4
    tmp20 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp19 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tl.where(tmp6, tmp17, tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 7, tl.int64)
    tmp27 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp24 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp28 = tl.where(tmp4, tmp23, tmp27)
    tl.store(out_ptr0 + x3, tmp28, xmask)


@triton.jit
def triton_poi_fused_cat_9(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 160
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 10
    x0 = xindex % 4
    x2 = xindex // 40
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 9, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.full([1], 8, tl.int64)
    tmp6 = tmp0 < tmp5
    tmp7 = tmp6 & tmp4
    tmp8 = tl.full([1], 7, tl.int64)
    tmp9 = tmp0 < tmp8
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (x0 + 4 * x1 + 28 * x2), tmp10 & xmask, other=0.0
        )
    tmp12 = tmp0 >= tmp8
    tmp13 = tmp12 & tmp7
    tmp14 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp13 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp15 = tl.where(tmp9, tmp11, tmp14)
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp7, tmp15, tmp16)
    tmp18 = tmp0 >= tmp5
    tmp19 = tmp18 & tmp4
    tmp20 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp19 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tl.where(tmp6, tmp17, tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 10, tl.int64)
    tmp27 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp24 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp28 = tl.where(tmp4, tmp23, tmp27)
    tl.store(out_ptr0 + x3, tmp28, xmask)


@triton.jit
def triton_poi_fused_cat_10(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 208
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 13
    x0 = xindex % 4
    x2 = xindex // 52
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 12, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.full([1], 11, tl.int64)
    tmp6 = tmp0 < tmp5
    tmp7 = tmp6 & tmp4
    tmp8 = tl.full([1], 10, tl.int64)
    tmp9 = tmp0 < tmp8
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (x0 + 4 * x1 + 40 * x2), tmp10 & xmask, other=0.0
        )
    tmp12 = tmp0 >= tmp8
    tmp13 = tmp12 & tmp7
    tmp14 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp13 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp15 = tl.where(tmp9, tmp11, tmp14)
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp7, tmp15, tmp16)
    tmp18 = tmp0 >= tmp5
    tmp19 = tmp18 & tmp4
    tmp20 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp19 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tl.where(tmp6, tmp17, tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 13, tl.int64)
    tmp27 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp24 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp28 = tl.where(tmp4, tmp23, tmp27)
    tl.store(out_ptr0 + x3, tmp28, xmask)


@triton.jit
def triton_poi_fused_cat_11(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 16
    x0 = xindex % 4
    x2 = xindex // 64
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 15, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.full([1], 14, tl.int64)
    tmp6 = tmp0 < tmp5
    tmp7 = tmp6 & tmp4
    tmp8 = tl.full([1], 13, tl.int64)
    tmp9 = tmp0 < tmp8
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (x0 + 4 * x1 + 52 * x2), tmp10 & xmask, other=0.0
        )
    tmp12 = tmp0 >= tmp8
    tmp13 = tmp12 & tmp7
    tmp14 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp13 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp15 = tl.where(tmp9, tmp11, tmp14)
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp7, tmp15, tmp16)
    tmp18 = tmp0 >= tmp5
    tmp19 = tmp18 & tmp4
    tmp20 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp19 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tl.where(tmp6, tmp17, tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 16, tl.int64)
    tmp27 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp24 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp28 = tl.where(tmp4, tmp23, tmp27)
    tl.store(out_ptr0 + x3, tmp28, xmask)


@triton.jit
def triton_poi_fused_cat_12(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 19
    x0 = xindex % 4
    x2 = xindex // 76
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 18, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.full([1], 17, tl.int64)
    tmp6 = tmp0 < tmp5
    tmp7 = tmp6 & tmp4
    tmp8 = tl.full([1], 16, tl.int64)
    tmp9 = tmp0 < tmp8
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (x0 + 4 * x1 + 64 * x2), tmp10 & xmask, other=0.0
        )
    tmp12 = tmp0 >= tmp8
    tmp13 = tmp12 & tmp7
    tmp14 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp13 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp15 = tl.where(tmp9, tmp11, tmp14)
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp7, tmp15, tmp16)
    tmp18 = tmp0 >= tmp5
    tmp19 = tmp18 & tmp4
    tmp20 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp19 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tl.where(tmp6, tmp17, tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 19, tl.int64)
    tmp27 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp24 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp28 = tl.where(tmp4, tmp23, tmp27)
    tl.store(out_ptr0 + x3, tmp28, xmask)


@triton.jit
def triton_poi_fused_cat_13(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 352
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 22
    x0 = xindex % 4
    x2 = xindex // 88
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 21, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.full([1], 20, tl.int64)
    tmp6 = tmp0 < tmp5
    tmp7 = tmp6 & tmp4
    tmp8 = tl.full([1], 19, tl.int64)
    tmp9 = tmp0 < tmp8
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (x0 + 4 * x1 + 76 * x2), tmp10 & xmask, other=0.0
        )
    tmp12 = tmp0 >= tmp8
    tmp13 = tmp12 & tmp7
    tmp14 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp13 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp15 = tl.where(tmp9, tmp11, tmp14)
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp7, tmp15, tmp16)
    tmp18 = tmp0 >= tmp5
    tmp19 = tmp18 & tmp4
    tmp20 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp19 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tl.where(tmp6, tmp17, tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 22, tl.int64)
    tmp27 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp24 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp28 = tl.where(tmp4, tmp23, tmp27)
    tl.store(out_ptr0 + x3, tmp28, xmask)


@triton.jit
def triton_poi_fused_add_tanh_14(in_out_ptr0, in_ptr0, in_ptr1, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 4
    x2 = xindex // 16
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + 4 * x2), xmask, eviction_policy='evict_last'
        )
    tmp2 = tl.load(in_ptr1 + x0, xmask, eviction_policy='evict_last')
    tmp3 = tmp1 + tmp2
    tmp4 = tmp0 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tl.store(in_out_ptr0 + x3, tmp5, xmask)


@triton.jit
def triton_poi_fused_cat_15(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 400
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 25
    x0 = xindex % 4
    x2 = xindex // 100
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 24, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.full([1], 23, tl.int64)
    tmp6 = tmp0 < tmp5
    tmp7 = tmp6 & tmp4
    tmp8 = tl.full([1], 22, tl.int64)
    tmp9 = tmp0 < tmp8
    tmp10 = tmp9 & tmp7
    tmp11 = tl.load(in_ptr0 + (x0 + 4 * x1 + 88 * x2), tmp10 & xmask, other=0.0
        )
    tmp12 = tmp0 >= tmp8
    tmp13 = tmp12 & tmp7
    tmp14 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp13 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp15 = tl.where(tmp9, tmp11, tmp14)
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp7, tmp15, tmp16)
    tmp18 = tmp0 >= tmp5
    tmp19 = tmp18 & tmp4
    tmp20 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp19 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tl.where(tmp6, tmp17, tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 25, tl.int64)
    tmp27 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp24 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp28 = tl.where(tmp4, tmp23, tmp27)
    tl.store(out_ptr0 + x3, tmp28, 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) = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4), (16, 4, 1))
    assert_size_stride(primals_2, (4, 4), (4, 1))
    assert_size_stride(primals_3, (4, 4), (4, 1))
    assert_size_stride(primals_4, (4,), (1,))
    assert_size_stride(primals_5, (1, 4), (4, 1))
    assert_size_stride(primals_6, (12, 8), (8, 1))
    assert_size_stride(primals_7, (12, 4), (4, 1))
    assert_size_stride(primals_8, (12,), (1,))
    assert_size_stride(primals_9, (12,), (1,))
    assert_size_stride(primals_10, (4, 4), (4, 1))
    assert_size_stride(primals_11, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused__to_copy_0[grid(16)](buf0, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf1 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(primals_1, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_2, (4, 4), (1, 4), 0), out=buf1)
        del primals_2
        buf2 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.mm(buf0, reinterpret_tensor(primals_3, (4, 4), (1, 4
            ), 0), out=buf2)
        buf3 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf2, primals_4, buf3, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf4 = reinterpret_tensor(buf2, (16, 1), (1, 1), 0)
        del buf2
        extern_kernels.mm(reinterpret_tensor(buf3, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf4)
        buf5 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf4, buf5, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf6 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf5, buf6, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf7 = reinterpret_tensor(buf5, (4, 1, 4), (4, 4, 1), 0)
        del buf5
        extern_kernels.bmm(reinterpret_tensor(buf6, (4, 1, 4), (4, 0, 1), 0
            ), primals_1, out=buf7)
        buf8 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_4[grid(32)](buf7, buf8, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf9 = empty_strided_cuda((4, 12), (12, 1), torch.float32)
        extern_kernels.mm(buf8, reinterpret_tensor(primals_6, (8, 12), (1, 
            8), 0), out=buf9)
        buf10 = empty_strided_cuda((4, 12), (12, 1), torch.float32)
        extern_kernels.mm(buf0, reinterpret_tensor(primals_7, (4, 12), (1, 
            4), 0), out=buf10)
        buf11 = torch.ops.aten._thnn_fused_gru_cell.default(buf9, buf10,
            buf0, primals_8, primals_9)
        buf12 = buf11[0]
        buf13 = buf11[1]
        del buf11
        buf14 = reinterpret_tensor(buf7, (4, 4), (4, 1), 0)
        del buf7
        extern_kernels.addmm(primals_11, buf12, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf14)
        buf15 = empty_strided_cuda((4,), (1,), torch.int64)
        triton_poi_fused_argmax_5[grid(4)](buf14, buf15, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf16 = reinterpret_tensor(buf6, (4, 4), (4, 1), 0)
        del buf6
        extern_kernels.mm(buf12, reinterpret_tensor(primals_3, (4, 4), (1, 
            4), 0), out=buf16)
        buf17 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf16, primals_4, buf17,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf18 = reinterpret_tensor(buf16, (16, 1), (1, 1), 0)
        del buf16
        extern_kernels.mm(reinterpret_tensor(buf17, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf18)
        buf19 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf18, buf19, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf20 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf19, buf20, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf21 = reinterpret_tensor(buf19, (4, 1, 4), (4, 4, 1), 0)
        del buf19
        extern_kernels.bmm(reinterpret_tensor(buf20, (4, 1, 4), (4, 0, 1), 
            0), primals_1, out=buf21)
        buf22 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf21, buf15, buf22, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf23 = buf9
        del buf9
        extern_kernels.mm(buf22, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf23)
        buf24 = buf10
        del buf10
        extern_kernels.mm(buf12, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf24)
        buf25 = torch.ops.aten._thnn_fused_gru_cell.default(buf23, buf24,
            buf12, primals_8, primals_9)
        buf26 = buf25[0]
        buf27 = buf25[1]
        del buf25
        buf28 = reinterpret_tensor(buf21, (4, 4), (4, 1), 0)
        del buf21
        extern_kernels.addmm(primals_11, buf26, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf28)
        buf29 = buf15
        del buf15
        triton_poi_fused_argmax_5[grid(4)](buf28, buf29, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf30 = reinterpret_tensor(buf20, (4, 4), (4, 1), 0)
        del buf20
        extern_kernels.mm(buf26, reinterpret_tensor(primals_3, (4, 4), (1, 
            4), 0), out=buf30)
        buf31 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf30, primals_4, buf31,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf32 = reinterpret_tensor(buf30, (16, 1), (1, 1), 0)
        del buf30
        extern_kernels.mm(reinterpret_tensor(buf31, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf32)
        buf33 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf32, buf33, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf34 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf33, buf34, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf35 = reinterpret_tensor(buf33, (4, 1, 4), (4, 4, 1), 0)
        del buf33
        extern_kernels.bmm(reinterpret_tensor(buf34, (4, 1, 4), (4, 0, 1), 
            0), primals_1, out=buf35)
        buf36 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf35, buf29, buf36, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf37 = buf24
        del buf24
        extern_kernels.mm(buf36, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf37)
        buf38 = buf23
        del buf23
        extern_kernels.mm(buf26, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf38)
        buf39 = torch.ops.aten._thnn_fused_gru_cell.default(buf37, buf38,
            buf26, primals_8, primals_9)
        buf40 = buf39[0]
        buf41 = buf39[1]
        del buf39
        buf42 = reinterpret_tensor(buf35, (4, 4), (4, 1), 0)
        del buf35
        extern_kernels.addmm(primals_11, buf40, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf42)
        buf43 = buf29
        del buf29
        triton_poi_fused_argmax_5[grid(4)](buf42, buf43, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf44 = reinterpret_tensor(buf34, (4, 4), (4, 1), 0)
        del buf34
        extern_kernels.mm(buf40, reinterpret_tensor(primals_3, (4, 4), (1, 
            4), 0), out=buf44)
        buf45 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf44, primals_4, buf45,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf46 = reinterpret_tensor(buf44, (16, 1), (1, 1), 0)
        del buf44
        extern_kernels.mm(reinterpret_tensor(buf45, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf46)
        buf47 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf46, buf47, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf48 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf47, buf48, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf49 = reinterpret_tensor(buf47, (4, 1, 4), (4, 4, 1), 0)
        del buf47
        extern_kernels.bmm(reinterpret_tensor(buf48, (4, 1, 4), (4, 0, 1), 
            0), primals_1, out=buf49)
        buf50 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf49, buf43, buf50, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf51 = buf38
        del buf38
        extern_kernels.mm(buf50, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf51)
        buf52 = buf37
        del buf37
        extern_kernels.mm(buf40, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf52)
        buf53 = torch.ops.aten._thnn_fused_gru_cell.default(buf51, buf52,
            buf40, primals_8, primals_9)
        buf54 = buf53[0]
        buf55 = buf53[1]
        del buf53
        buf56 = reinterpret_tensor(buf49, (4, 4), (4, 1), 0)
        del buf49
        extern_kernels.addmm(primals_11, buf54, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf56)
        buf57 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_cat_7[grid(64)](buf14, buf28, buf42, buf56, buf57,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf58 = buf43
        del buf43
        triton_poi_fused_argmax_5[grid(4)](buf56, buf58, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf59 = buf56
        del buf56
        extern_kernels.mm(buf54, reinterpret_tensor(primals_3, (4, 4), (1, 
            4), 0), out=buf59)
        buf60 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf59, primals_4, buf60,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf61 = reinterpret_tensor(buf59, (16, 1), (1, 1), 0)
        del buf59
        extern_kernels.mm(reinterpret_tensor(buf60, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf61)
        buf62 = reinterpret_tensor(buf42, (4, 4, 1), (4, 1, 16), 0)
        del buf42
        triton_poi_fused__softmax_2[grid(16)](buf61, buf62, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf63 = reinterpret_tensor(buf28, (4, 4, 1), (4, 1, 1), 0)
        del buf28
        triton_poi_fused__softmax_3[grid(16)](buf62, buf63, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf64 = reinterpret_tensor(buf62, (4, 1, 4), (4, 4, 1), 0)
        del buf62
        extern_kernels.bmm(reinterpret_tensor(buf63, (4, 1, 4), (4, 0, 1), 
            0), primals_1, out=buf64)
        buf65 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf64, buf58, buf65, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf66 = buf52
        del buf52
        extern_kernels.mm(buf65, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf66)
        buf67 = buf51
        del buf51
        extern_kernels.mm(buf54, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf67)
        buf68 = torch.ops.aten._thnn_fused_gru_cell.default(buf66, buf67,
            buf54, primals_8, primals_9)
        buf69 = buf68[0]
        buf70 = buf68[1]
        del buf68
        buf71 = reinterpret_tensor(buf64, (4, 4), (4, 1), 0)
        del buf64
        extern_kernels.addmm(primals_11, buf69, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf71)
        buf72 = buf58
        del buf58
        triton_poi_fused_argmax_5[grid(4)](buf71, buf72, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf73 = reinterpret_tensor(buf63, (4, 4), (4, 1), 0)
        del buf63
        extern_kernels.mm(buf69, reinterpret_tensor(primals_3, (4, 4), (1, 
            4), 0), out=buf73)
        buf74 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf73, primals_4, buf74,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf75 = reinterpret_tensor(buf73, (16, 1), (1, 1), 0)
        del buf73
        extern_kernels.mm(reinterpret_tensor(buf74, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf75)
        buf76 = reinterpret_tensor(buf14, (4, 4, 1), (4, 1, 16), 0)
        del buf14
        triton_poi_fused__softmax_2[grid(16)](buf75, buf76, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf77 = buf48
        del buf48
        triton_poi_fused__softmax_3[grid(16)](buf76, buf77, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf78 = reinterpret_tensor(buf76, (4, 1, 4), (4, 4, 1), 0)
        del buf76
        extern_kernels.bmm(reinterpret_tensor(buf77, (4, 1, 4), (4, 0, 1), 
            0), primals_1, out=buf78)
        buf79 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf78, buf72, buf79, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf80 = buf67
        del buf67
        extern_kernels.mm(buf79, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf80)
        buf81 = buf66
        del buf66
        extern_kernels.mm(buf69, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf81)
        buf82 = torch.ops.aten._thnn_fused_gru_cell.default(buf80, buf81,
            buf69, primals_8, primals_9)
        buf83 = buf82[0]
        buf84 = buf82[1]
        del buf82
        buf85 = reinterpret_tensor(buf78, (4, 4), (4, 1), 0)
        del buf78
        extern_kernels.addmm(primals_11, buf83, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf85)
        buf86 = buf72
        del buf72
        triton_poi_fused_argmax_5[grid(4)](buf85, buf86, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf87 = reinterpret_tensor(buf77, (4, 4), (4, 1), 0)
        del buf77
        extern_kernels.mm(buf83, reinterpret_tensor(primals_3, (4, 4), (1, 
            4), 0), out=buf87)
        buf88 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf87, primals_4, buf88,
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf89 = reinterpret_tensor(buf87, (16, 1), (1, 1), 0)
        del buf87
        extern_kernels.mm(reinterpret_tensor(buf88, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf89)
        buf90 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf89, buf90, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf91 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf90, buf91, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf92 = reinterpret_tensor(buf90, (4, 1, 4), (4, 4, 1), 0)
        del buf90
        extern_kernels.bmm(reinterpret_tensor(buf91, (4, 1, 4), (4, 0, 1), 
            0), primals_1, out=buf92)
        buf93 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf92, buf86, buf93, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf94 = buf81
        del buf81
        extern_kernels.mm(buf93, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf94)
        buf95 = buf80
        del buf80
        extern_kernels.mm(buf83, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf95)
        buf96 = torch.ops.aten._thnn_fused_gru_cell.default(buf94, buf95,
            buf83, primals_8, primals_9)
        buf97 = buf96[0]
        buf98 = buf96[1]
        del buf96
        buf99 = reinterpret_tensor(buf92, (4, 4), (4, 1), 0)
        del buf92
        extern_kernels.addmm(primals_11, buf97, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf99)
        buf100 = empty_strided_cuda((4, 7, 4), (28, 4, 1), torch.float32)
        triton_poi_fused_cat_8[grid(112)](buf57, buf71, buf85, buf99,
            buf100, 112, XBLOCK=128, num_warps=4, num_stages=1)
        buf101 = buf86
        del buf86
        triton_poi_fused_argmax_5[grid(4)](buf99, buf101, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf102 = buf99
        del buf99
        extern_kernels.mm(buf97, reinterpret_tensor(primals_3, (4, 4), (1, 
            4), 0), out=buf102)
        buf103 = buf57
        del buf57
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf102, primals_4,
            buf103, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf104 = reinterpret_tensor(buf102, (16, 1), (1, 1), 0)
        del buf102
        extern_kernels.mm(reinterpret_tensor(buf103, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf104)
        buf105 = reinterpret_tensor(buf85, (4, 4, 1), (4, 1, 16), 0)
        del buf85
        triton_poi_fused__softmax_2[grid(16)](buf104, buf105, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf106 = reinterpret_tensor(buf71, (4, 4, 1), (4, 1, 1), 0)
        del buf71
        triton_poi_fused__softmax_3[grid(16)](buf105, buf106, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf107 = reinterpret_tensor(buf105, (4, 1, 4), (4, 4, 1), 0)
        del buf105
        extern_kernels.bmm(reinterpret_tensor(buf106, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf107)
        buf108 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf107, buf101, buf108, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf109 = buf95
        del buf95
        extern_kernels.mm(buf108, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf109)
        buf110 = buf94
        del buf94
        extern_kernels.mm(buf97, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf110)
        buf111 = torch.ops.aten._thnn_fused_gru_cell.default(buf109, buf110,
            buf97, primals_8, primals_9)
        buf112 = buf111[0]
        buf113 = buf111[1]
        del buf111
        buf114 = reinterpret_tensor(buf107, (4, 4), (4, 1), 0)
        del buf107
        extern_kernels.addmm(primals_11, buf112, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf114)
        buf115 = buf101
        del buf101
        triton_poi_fused_argmax_5[grid(4)](buf114, buf115, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf116 = reinterpret_tensor(buf106, (4, 4), (4, 1), 0)
        del buf106
        extern_kernels.mm(buf112, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf116)
        buf117 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf116, primals_4,
            buf117, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf118 = reinterpret_tensor(buf116, (16, 1), (1, 1), 0)
        del buf116
        extern_kernels.mm(reinterpret_tensor(buf117, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf118)
        buf119 = reinterpret_tensor(buf91, (4, 4, 1), (4, 1, 16), 0)
        del buf91
        triton_poi_fused__softmax_2[grid(16)](buf118, buf119, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf120 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf119, buf120, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf121 = reinterpret_tensor(buf119, (4, 1, 4), (4, 4, 1), 0)
        del buf119
        extern_kernels.bmm(reinterpret_tensor(buf120, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf121)
        buf122 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf121, buf115, buf122, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf123 = buf110
        del buf110
        extern_kernels.mm(buf122, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf123)
        buf124 = buf109
        del buf109
        extern_kernels.mm(buf112, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf124)
        buf125 = torch.ops.aten._thnn_fused_gru_cell.default(buf123, buf124,
            buf112, primals_8, primals_9)
        buf126 = buf125[0]
        buf127 = buf125[1]
        del buf125
        buf128 = reinterpret_tensor(buf121, (4, 4), (4, 1), 0)
        del buf121
        extern_kernels.addmm(primals_11, buf126, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf128)
        buf129 = buf115
        del buf115
        triton_poi_fused_argmax_5[grid(4)](buf128, buf129, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf130 = reinterpret_tensor(buf120, (4, 4), (4, 1), 0)
        del buf120
        extern_kernels.mm(buf126, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf130)
        buf131 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf130, primals_4,
            buf131, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf132 = reinterpret_tensor(buf130, (16, 1), (1, 1), 0)
        del buf130
        extern_kernels.mm(reinterpret_tensor(buf131, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf132)
        buf133 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf132, buf133, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf134 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf133, buf134, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf135 = reinterpret_tensor(buf133, (4, 1, 4), (4, 4, 1), 0)
        del buf133
        extern_kernels.bmm(reinterpret_tensor(buf134, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf135)
        buf136 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf135, buf129, buf136, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf137 = buf124
        del buf124
        extern_kernels.mm(buf136, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf137)
        buf138 = buf123
        del buf123
        extern_kernels.mm(buf126, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf138)
        buf139 = torch.ops.aten._thnn_fused_gru_cell.default(buf137, buf138,
            buf126, primals_8, primals_9)
        buf140 = buf139[0]
        buf141 = buf139[1]
        del buf139
        buf142 = reinterpret_tensor(buf135, (4, 4), (4, 1), 0)
        del buf135
        extern_kernels.addmm(primals_11, buf140, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf142)
        buf143 = empty_strided_cuda((4, 10, 4), (40, 4, 1), torch.float32)
        triton_poi_fused_cat_9[grid(160)](buf100, buf114, buf128, buf142,
            buf143, 160, XBLOCK=128, num_warps=4, num_stages=1)
        del buf100
        buf144 = buf129
        del buf129
        triton_poi_fused_argmax_5[grid(4)](buf142, buf144, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf145 = buf142
        del buf142
        extern_kernels.mm(buf140, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf145)
        buf146 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf145, primals_4,
            buf146, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf147 = reinterpret_tensor(buf145, (16, 1), (1, 1), 0)
        del buf145
        extern_kernels.mm(reinterpret_tensor(buf146, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf147)
        buf148 = reinterpret_tensor(buf128, (4, 4, 1), (4, 1, 16), 0)
        del buf128
        triton_poi_fused__softmax_2[grid(16)](buf147, buf148, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf149 = reinterpret_tensor(buf114, (4, 4, 1), (4, 1, 1), 0)
        del buf114
        triton_poi_fused__softmax_3[grid(16)](buf148, buf149, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf150 = reinterpret_tensor(buf148, (4, 1, 4), (4, 4, 1), 0)
        del buf148
        extern_kernels.bmm(reinterpret_tensor(buf149, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf150)
        buf151 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf150, buf144, buf151, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf152 = buf138
        del buf138
        extern_kernels.mm(buf151, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf152)
        buf153 = buf137
        del buf137
        extern_kernels.mm(buf140, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf153)
        buf154 = torch.ops.aten._thnn_fused_gru_cell.default(buf152, buf153,
            buf140, primals_8, primals_9)
        buf155 = buf154[0]
        buf156 = buf154[1]
        del buf154
        buf157 = reinterpret_tensor(buf150, (4, 4), (4, 1), 0)
        del buf150
        extern_kernels.addmm(primals_11, buf155, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf157)
        buf158 = buf144
        del buf144
        triton_poi_fused_argmax_5[grid(4)](buf157, buf158, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf159 = reinterpret_tensor(buf149, (4, 4), (4, 1), 0)
        del buf149
        extern_kernels.mm(buf155, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf159)
        buf160 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf159, primals_4,
            buf160, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf161 = reinterpret_tensor(buf159, (16, 1), (1, 1), 0)
        del buf159
        extern_kernels.mm(reinterpret_tensor(buf160, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf161)
        buf162 = reinterpret_tensor(buf134, (4, 4, 1), (4, 1, 16), 0)
        del buf134
        triton_poi_fused__softmax_2[grid(16)](buf161, buf162, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf163 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf162, buf163, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf164 = reinterpret_tensor(buf162, (4, 1, 4), (4, 4, 1), 0)
        del buf162
        extern_kernels.bmm(reinterpret_tensor(buf163, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf164)
        buf165 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf164, buf158, buf165, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf166 = buf153
        del buf153
        extern_kernels.mm(buf165, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf166)
        buf167 = buf152
        del buf152
        extern_kernels.mm(buf155, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf167)
        buf168 = torch.ops.aten._thnn_fused_gru_cell.default(buf166, buf167,
            buf155, primals_8, primals_9)
        buf169 = buf168[0]
        buf170 = buf168[1]
        del buf168
        buf171 = reinterpret_tensor(buf164, (4, 4), (4, 1), 0)
        del buf164
        extern_kernels.addmm(primals_11, buf169, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf171)
        buf172 = buf158
        del buf158
        triton_poi_fused_argmax_5[grid(4)](buf171, buf172, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf173 = reinterpret_tensor(buf163, (4, 4), (4, 1), 0)
        del buf163
        extern_kernels.mm(buf169, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf173)
        buf174 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf173, primals_4,
            buf174, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf175 = reinterpret_tensor(buf173, (16, 1), (1, 1), 0)
        del buf173
        extern_kernels.mm(reinterpret_tensor(buf174, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf175)
        buf176 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf175, buf176, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf177 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf176, buf177, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf178 = reinterpret_tensor(buf176, (4, 1, 4), (4, 4, 1), 0)
        del buf176
        extern_kernels.bmm(reinterpret_tensor(buf177, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf178)
        buf179 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf178, buf172, buf179, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf180 = buf167
        del buf167
        extern_kernels.mm(buf179, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf180)
        buf181 = buf166
        del buf166
        extern_kernels.mm(buf169, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf181)
        buf182 = torch.ops.aten._thnn_fused_gru_cell.default(buf180, buf181,
            buf169, primals_8, primals_9)
        buf183 = buf182[0]
        buf184 = buf182[1]
        del buf182
        buf185 = reinterpret_tensor(buf178, (4, 4), (4, 1), 0)
        del buf178
        extern_kernels.addmm(primals_11, buf183, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf185)
        buf186 = empty_strided_cuda((4, 13, 4), (52, 4, 1), torch.float32)
        triton_poi_fused_cat_10[grid(208)](buf143, buf157, buf171, buf185,
            buf186, 208, XBLOCK=128, num_warps=4, num_stages=1)
        del buf143
        buf187 = buf172
        del buf172
        triton_poi_fused_argmax_5[grid(4)](buf185, buf187, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf188 = buf185
        del buf185
        extern_kernels.mm(buf183, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf188)
        buf189 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf188, primals_4,
            buf189, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf190 = reinterpret_tensor(buf188, (16, 1), (1, 1), 0)
        del buf188
        extern_kernels.mm(reinterpret_tensor(buf189, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf190)
        buf191 = reinterpret_tensor(buf171, (4, 4, 1), (4, 1, 16), 0)
        del buf171
        triton_poi_fused__softmax_2[grid(16)](buf190, buf191, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf192 = reinterpret_tensor(buf157, (4, 4, 1), (4, 1, 1), 0)
        del buf157
        triton_poi_fused__softmax_3[grid(16)](buf191, buf192, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf193 = reinterpret_tensor(buf191, (4, 1, 4), (4, 4, 1), 0)
        del buf191
        extern_kernels.bmm(reinterpret_tensor(buf192, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf193)
        buf194 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf193, buf187, buf194, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf195 = buf181
        del buf181
        extern_kernels.mm(buf194, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf195)
        buf196 = buf180
        del buf180
        extern_kernels.mm(buf183, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf196)
        buf197 = torch.ops.aten._thnn_fused_gru_cell.default(buf195, buf196,
            buf183, primals_8, primals_9)
        buf198 = buf197[0]
        buf199 = buf197[1]
        del buf197
        buf200 = reinterpret_tensor(buf193, (4, 4), (4, 1), 0)
        del buf193
        extern_kernels.addmm(primals_11, buf198, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf200)
        buf201 = buf187
        del buf187
        triton_poi_fused_argmax_5[grid(4)](buf200, buf201, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf202 = reinterpret_tensor(buf192, (4, 4), (4, 1), 0)
        del buf192
        extern_kernels.mm(buf198, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf202)
        buf203 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf202, primals_4,
            buf203, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf204 = reinterpret_tensor(buf202, (16, 1), (1, 1), 0)
        del buf202
        extern_kernels.mm(reinterpret_tensor(buf203, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf204)
        buf205 = reinterpret_tensor(buf177, (4, 4, 1), (4, 1, 16), 0)
        del buf177
        triton_poi_fused__softmax_2[grid(16)](buf204, buf205, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf206 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf205, buf206, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf207 = reinterpret_tensor(buf205, (4, 1, 4), (4, 4, 1), 0)
        del buf205
        extern_kernels.bmm(reinterpret_tensor(buf206, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf207)
        buf208 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf207, buf201, buf208, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf209 = buf196
        del buf196
        extern_kernels.mm(buf208, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf209)
        buf210 = buf195
        del buf195
        extern_kernels.mm(buf198, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf210)
        buf211 = torch.ops.aten._thnn_fused_gru_cell.default(buf209, buf210,
            buf198, primals_8, primals_9)
        buf212 = buf211[0]
        buf213 = buf211[1]
        del buf211
        buf214 = reinterpret_tensor(buf207, (4, 4), (4, 1), 0)
        del buf207
        extern_kernels.addmm(primals_11, buf212, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf214)
        buf215 = buf201
        del buf201
        triton_poi_fused_argmax_5[grid(4)](buf214, buf215, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf216 = reinterpret_tensor(buf206, (4, 4), (4, 1), 0)
        del buf206
        extern_kernels.mm(buf212, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf216)
        buf217 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf216, primals_4,
            buf217, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf218 = reinterpret_tensor(buf216, (16, 1), (1, 1), 0)
        del buf216
        extern_kernels.mm(reinterpret_tensor(buf217, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf218)
        buf219 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf218, buf219, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf220 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf219, buf220, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf221 = reinterpret_tensor(buf219, (4, 1, 4), (4, 4, 1), 0)
        del buf219
        extern_kernels.bmm(reinterpret_tensor(buf220, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf221)
        buf222 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf221, buf215, buf222, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf223 = buf210
        del buf210
        extern_kernels.mm(buf222, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf223)
        buf224 = buf209
        del buf209
        extern_kernels.mm(buf212, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf224)
        buf225 = torch.ops.aten._thnn_fused_gru_cell.default(buf223, buf224,
            buf212, primals_8, primals_9)
        buf226 = buf225[0]
        buf227 = buf225[1]
        del buf225
        buf228 = reinterpret_tensor(buf221, (4, 4), (4, 1), 0)
        del buf221
        extern_kernels.addmm(primals_11, buf226, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf228)
        buf229 = empty_strided_cuda((4, 16, 4), (64, 4, 1), torch.float32)
        triton_poi_fused_cat_11[grid(256)](buf186, buf200, buf214, buf228,
            buf229, 256, XBLOCK=256, num_warps=4, num_stages=1)
        del buf186
        buf230 = buf215
        del buf215
        triton_poi_fused_argmax_5[grid(4)](buf228, buf230, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf231 = buf228
        del buf228
        extern_kernels.mm(buf226, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf231)
        buf232 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf231, primals_4,
            buf232, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf233 = reinterpret_tensor(buf231, (16, 1), (1, 1), 0)
        del buf231
        extern_kernels.mm(reinterpret_tensor(buf232, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf233)
        buf234 = reinterpret_tensor(buf214, (4, 4, 1), (4, 1, 16), 0)
        del buf214
        triton_poi_fused__softmax_2[grid(16)](buf233, buf234, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf235 = reinterpret_tensor(buf200, (4, 4, 1), (4, 1, 1), 0)
        del buf200
        triton_poi_fused__softmax_3[grid(16)](buf234, buf235, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf236 = reinterpret_tensor(buf234, (4, 1, 4), (4, 4, 1), 0)
        del buf234
        extern_kernels.bmm(reinterpret_tensor(buf235, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf236)
        buf237 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf236, buf230, buf237, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf238 = buf224
        del buf224
        extern_kernels.mm(buf237, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf238)
        buf239 = buf223
        del buf223
        extern_kernels.mm(buf226, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf239)
        buf240 = torch.ops.aten._thnn_fused_gru_cell.default(buf238, buf239,
            buf226, primals_8, primals_9)
        buf241 = buf240[0]
        buf242 = buf240[1]
        del buf240
        buf243 = reinterpret_tensor(buf236, (4, 4), (4, 1), 0)
        del buf236
        extern_kernels.addmm(primals_11, buf241, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf243)
        buf244 = buf230
        del buf230
        triton_poi_fused_argmax_5[grid(4)](buf243, buf244, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf245 = reinterpret_tensor(buf235, (4, 4), (4, 1), 0)
        del buf235
        extern_kernels.mm(buf241, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf245)
        buf246 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf245, primals_4,
            buf246, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf247 = reinterpret_tensor(buf245, (16, 1), (1, 1), 0)
        del buf245
        extern_kernels.mm(reinterpret_tensor(buf246, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf247)
        buf248 = reinterpret_tensor(buf220, (4, 4, 1), (4, 1, 16), 0)
        del buf220
        triton_poi_fused__softmax_2[grid(16)](buf247, buf248, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf249 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf248, buf249, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf250 = reinterpret_tensor(buf248, (4, 1, 4), (4, 4, 1), 0)
        del buf248
        extern_kernels.bmm(reinterpret_tensor(buf249, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf250)
        buf251 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf250, buf244, buf251, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf252 = buf239
        del buf239
        extern_kernels.mm(buf251, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf252)
        buf253 = buf238
        del buf238
        extern_kernels.mm(buf241, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf253)
        buf254 = torch.ops.aten._thnn_fused_gru_cell.default(buf252, buf253,
            buf241, primals_8, primals_9)
        buf255 = buf254[0]
        buf256 = buf254[1]
        del buf254
        buf257 = reinterpret_tensor(buf250, (4, 4), (4, 1), 0)
        del buf250
        extern_kernels.addmm(primals_11, buf255, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf257)
        buf258 = buf244
        del buf244
        triton_poi_fused_argmax_5[grid(4)](buf257, buf258, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf259 = reinterpret_tensor(buf249, (4, 4), (4, 1), 0)
        del buf249
        extern_kernels.mm(buf255, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf259)
        buf260 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf259, primals_4,
            buf260, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf261 = reinterpret_tensor(buf259, (16, 1), (1, 1), 0)
        del buf259
        extern_kernels.mm(reinterpret_tensor(buf260, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf261)
        buf262 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf261, buf262, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf263 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf262, buf263, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf264 = reinterpret_tensor(buf262, (4, 1, 4), (4, 4, 1), 0)
        del buf262
        extern_kernels.bmm(reinterpret_tensor(buf263, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf264)
        buf265 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf264, buf258, buf265, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf266 = buf253
        del buf253
        extern_kernels.mm(buf265, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf266)
        buf267 = buf252
        del buf252
        extern_kernels.mm(buf255, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf267)
        buf268 = torch.ops.aten._thnn_fused_gru_cell.default(buf266, buf267,
            buf255, primals_8, primals_9)
        buf269 = buf268[0]
        buf270 = buf268[1]
        del buf268
        buf271 = reinterpret_tensor(buf264, (4, 4), (4, 1), 0)
        del buf264
        extern_kernels.addmm(primals_11, buf269, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf271)
        buf272 = empty_strided_cuda((4, 19, 4), (76, 4, 1), torch.float32)
        triton_poi_fused_cat_12[grid(304)](buf229, buf243, buf257, buf271,
            buf272, 304, XBLOCK=256, num_warps=4, num_stages=1)
        del buf229
        buf273 = buf258
        del buf258
        triton_poi_fused_argmax_5[grid(4)](buf271, buf273, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf274 = buf271
        del buf271
        extern_kernels.mm(buf269, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf274)
        buf275 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf274, primals_4,
            buf275, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf276 = reinterpret_tensor(buf274, (16, 1), (1, 1), 0)
        del buf274
        extern_kernels.mm(reinterpret_tensor(buf275, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf276)
        buf277 = reinterpret_tensor(buf257, (4, 4, 1), (4, 1, 16), 0)
        del buf257
        triton_poi_fused__softmax_2[grid(16)](buf276, buf277, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf278 = reinterpret_tensor(buf243, (4, 4, 1), (4, 1, 1), 0)
        del buf243
        triton_poi_fused__softmax_3[grid(16)](buf277, buf278, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf279 = reinterpret_tensor(buf277, (4, 1, 4), (4, 4, 1), 0)
        del buf277
        extern_kernels.bmm(reinterpret_tensor(buf278, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf279)
        buf280 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf279, buf273, buf280, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf281 = buf267
        del buf267
        extern_kernels.mm(buf280, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf281)
        buf282 = buf266
        del buf266
        extern_kernels.mm(buf269, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf282)
        buf283 = torch.ops.aten._thnn_fused_gru_cell.default(buf281, buf282,
            buf269, primals_8, primals_9)
        buf284 = buf283[0]
        buf285 = buf283[1]
        del buf283
        buf286 = reinterpret_tensor(buf279, (4, 4), (4, 1), 0)
        del buf279
        extern_kernels.addmm(primals_11, buf284, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf286)
        buf287 = buf273
        del buf273
        triton_poi_fused_argmax_5[grid(4)](buf286, buf287, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf288 = reinterpret_tensor(buf278, (4, 4), (4, 1), 0)
        del buf278
        extern_kernels.mm(buf284, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf288)
        buf289 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf288, primals_4,
            buf289, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf290 = reinterpret_tensor(buf288, (16, 1), (1, 1), 0)
        del buf288
        extern_kernels.mm(reinterpret_tensor(buf289, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf290)
        buf291 = reinterpret_tensor(buf263, (4, 4, 1), (4, 1, 16), 0)
        del buf263
        triton_poi_fused__softmax_2[grid(16)](buf290, buf291, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf292 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf291, buf292, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf293 = reinterpret_tensor(buf291, (4, 1, 4), (4, 4, 1), 0)
        del buf291
        extern_kernels.bmm(reinterpret_tensor(buf292, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf293)
        buf294 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf293, buf287, buf294, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf295 = buf282
        del buf282
        extern_kernels.mm(buf294, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf295)
        buf296 = buf281
        del buf281
        extern_kernels.mm(buf284, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf296)
        buf297 = torch.ops.aten._thnn_fused_gru_cell.default(buf295, buf296,
            buf284, primals_8, primals_9)
        buf298 = buf297[0]
        buf299 = buf297[1]
        del buf297
        buf300 = reinterpret_tensor(buf293, (4, 4), (4, 1), 0)
        del buf293
        extern_kernels.addmm(primals_11, buf298, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf300)
        buf301 = buf287
        del buf287
        triton_poi_fused_argmax_5[grid(4)](buf300, buf301, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf302 = reinterpret_tensor(buf292, (4, 4), (4, 1), 0)
        del buf292
        extern_kernels.mm(buf298, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf302)
        buf303 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf302, primals_4,
            buf303, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf304 = reinterpret_tensor(buf302, (16, 1), (1, 1), 0)
        del buf302
        extern_kernels.mm(reinterpret_tensor(buf303, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf304)
        buf305 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf304, buf305, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf306 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf305, buf306, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf307 = reinterpret_tensor(buf305, (4, 1, 4), (4, 4, 1), 0)
        del buf305
        extern_kernels.bmm(reinterpret_tensor(buf306, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf307)
        buf308 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf307, buf301, buf308, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf309 = buf296
        del buf296
        extern_kernels.mm(buf308, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf309)
        buf310 = buf295
        del buf295
        extern_kernels.mm(buf298, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf310)
        buf311 = torch.ops.aten._thnn_fused_gru_cell.default(buf309, buf310,
            buf298, primals_8, primals_9)
        buf312 = buf311[0]
        buf313 = buf311[1]
        del buf311
        buf314 = reinterpret_tensor(buf307, (4, 4), (4, 1), 0)
        del buf307
        extern_kernels.addmm(primals_11, buf312, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf314)
        buf315 = empty_strided_cuda((4, 22, 4), (88, 4, 1), torch.float32)
        triton_poi_fused_cat_13[grid(352)](buf272, buf286, buf300, buf314,
            buf315, 352, XBLOCK=256, num_warps=4, num_stages=1)
        del buf272
        buf316 = buf301
        del buf301
        triton_poi_fused_argmax_5[grid(4)](buf314, buf316, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf317 = buf314
        del buf314
        extern_kernels.mm(buf312, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf317)
        buf318 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf317, primals_4,
            buf318, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf319 = reinterpret_tensor(buf317, (16, 1), (1, 1), 0)
        del buf317
        extern_kernels.mm(reinterpret_tensor(buf318, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf319)
        buf320 = reinterpret_tensor(buf300, (4, 4, 1), (4, 1, 16), 0)
        del buf300
        triton_poi_fused__softmax_2[grid(16)](buf319, buf320, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf321 = reinterpret_tensor(buf286, (4, 4, 1), (4, 1, 1), 0)
        del buf286
        triton_poi_fused__softmax_3[grid(16)](buf320, buf321, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf322 = reinterpret_tensor(buf320, (4, 1, 4), (4, 4, 1), 0)
        del buf320
        extern_kernels.bmm(reinterpret_tensor(buf321, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf322)
        buf323 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf322, buf316, buf323, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf324 = buf310
        del buf310
        extern_kernels.mm(buf323, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf324)
        buf325 = buf309
        del buf309
        extern_kernels.mm(buf312, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf325)
        buf326 = torch.ops.aten._thnn_fused_gru_cell.default(buf324, buf325,
            buf312, primals_8, primals_9)
        buf327 = buf326[0]
        buf328 = buf326[1]
        del buf326
        buf329 = reinterpret_tensor(buf322, (4, 4), (4, 1), 0)
        del buf322
        extern_kernels.addmm(primals_11, buf327, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf329)
        buf330 = buf316
        del buf316
        triton_poi_fused_argmax_5[grid(4)](buf329, buf330, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf331 = reinterpret_tensor(buf321, (4, 4), (4, 1), 0)
        del buf321
        extern_kernels.mm(buf327, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf331)
        buf332 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_tanh_1[grid(64)](buf1, buf331, primals_4,
            buf332, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf333 = reinterpret_tensor(buf331, (16, 1), (1, 1), 0)
        del buf331
        extern_kernels.mm(reinterpret_tensor(buf332, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf333)
        buf334 = reinterpret_tensor(buf306, (4, 4, 1), (4, 1, 16), 0)
        del buf306
        triton_poi_fused__softmax_2[grid(16)](buf333, buf334, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf335 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf334, buf335, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf336 = reinterpret_tensor(buf334, (4, 1, 4), (4, 4, 1), 0)
        del buf334
        extern_kernels.bmm(reinterpret_tensor(buf335, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf336)
        buf337 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf336, buf330, buf337, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        buf338 = buf325
        del buf325
        extern_kernels.mm(buf337, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf338)
        buf339 = buf324
        del buf324
        extern_kernels.mm(buf327, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf339)
        buf340 = torch.ops.aten._thnn_fused_gru_cell.default(buf338, buf339,
            buf327, primals_8, primals_9)
        buf341 = buf340[0]
        buf342 = buf340[1]
        del buf340
        buf343 = reinterpret_tensor(buf336, (4, 4), (4, 1), 0)
        del buf336
        extern_kernels.addmm(primals_11, buf341, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf343)
        buf344 = buf330
        del buf330
        triton_poi_fused_argmax_5[grid(4)](buf343, buf344, 4, XBLOCK=4,
            num_warps=1, num_stages=1)
        buf345 = reinterpret_tensor(buf335, (4, 4), (4, 1), 0)
        del buf335
        extern_kernels.mm(buf341, reinterpret_tensor(primals_3, (4, 4), (1,
            4), 0), out=buf345)
        buf346 = reinterpret_tensor(buf1, (4, 4, 4), (16, 4, 1), 0)
        del buf1
        triton_poi_fused_add_tanh_14[grid(64)](buf346, buf345, primals_4, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        del primals_4
        buf347 = reinterpret_tensor(buf345, (16, 1), (1, 1), 0)
        del buf345
        extern_kernels.mm(reinterpret_tensor(buf346, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_5, (4, 1), (1, 4), 0), out=buf347)
        buf348 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused__softmax_2[grid(16)](buf347, buf348, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf349 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        triton_poi_fused__softmax_3[grid(16)](buf348, buf349, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf350 = reinterpret_tensor(buf348, (4, 1, 4), (4, 4, 1), 0)
        del buf348
        extern_kernels.bmm(reinterpret_tensor(buf349, (4, 1, 4), (4, 0, 1),
            0), primals_1, out=buf350)
        del buf349
        buf351 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_6[grid(32)](buf350, buf344, buf351, 32, XBLOCK
            =32, num_warps=1, num_stages=1)
        del buf344
        buf352 = buf339
        del buf339
        extern_kernels.mm(buf351, reinterpret_tensor(primals_6, (8, 12), (1,
            8), 0), out=buf352)
        buf353 = buf338
        del buf338
        extern_kernels.mm(buf341, reinterpret_tensor(primals_7, (4, 12), (1,
            4), 0), out=buf353)
        buf354 = torch.ops.aten._thnn_fused_gru_cell.default(buf352, buf353,
            buf341, primals_8, primals_9)
        del buf352
        del buf353
        del primals_8
        del primals_9
        buf355 = buf354[0]
        buf356 = buf354[1]
        del buf354
        buf357 = reinterpret_tensor(buf350, (4, 4), (4, 1), 0)
        del buf350
        extern_kernels.addmm(primals_11, buf355, reinterpret_tensor(
            primals_10, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf357)
        del primals_11
        buf358 = empty_strided_cuda((4, 25, 4), (100, 4, 1), torch.float32)
        triton_poi_fused_cat_15[grid(400)](buf315, buf329, buf343, buf357,
            buf358, 400, XBLOCK=128, num_warps=4, num_stages=1)
        del buf315
        del buf329
        del buf343
        del buf357
    return (buf358, primals_1, buf0, buf3, buf4, buf8, buf12, buf13, buf17,
        buf18, buf22, buf26, buf27, buf31, buf32, buf36, buf40, buf41,
        buf45, buf46, buf50, buf54, buf55, buf60, buf61, buf65, buf69,
        buf70, buf74, buf75, buf79, buf83, buf84, buf88, buf89, buf93,
        buf97, buf98, buf103, buf104, buf108, buf112, buf113, buf117,
        buf118, buf122, buf126, buf127, buf131, buf132, buf136, buf140,
        buf141, buf146, buf147, buf151, buf155, buf156, buf160, buf161,
        buf165, buf169, buf170, buf174, buf175, buf179, buf183, buf184,
        buf189, buf190, buf194, buf198, buf199, buf203, buf204, buf208,
        buf212, buf213, buf217, buf218, buf222, buf226, buf227, buf232,
        buf233, buf237, buf241, buf242, buf246, buf247, buf251, buf255,
        buf256, buf260, buf261, buf265, buf269, buf270, buf275, buf276,
        buf280, buf284, buf285, buf289, buf290, buf294, buf298, buf299,
        buf303, buf304, buf308, buf312, buf313, buf318, buf319, buf323,
        buf327, buf328, buf332, buf333, buf337, buf341, buf342, buf346,
        buf347, buf351, buf355, buf356, primals_10, primals_7, primals_6,
        primals_5, primals_3)


class AttentionGRUCell(nn.Module):

    def __init__(self, input_size, hidden_size, num_embeddings, use_gru=False):
        super(AttentionGRUCell, self).__init__()
        self.i2h = nn.Linear(input_size, hidden_size, bias=False)
        self.h2h = nn.Linear(hidden_size, hidden_size)
        self.score = nn.Linear(hidden_size, 1, bias=False)
        self.rnn = nn.GRUCell(input_size=input_size + num_embeddings,
            hidden_size=hidden_size)
        self.hidden_size = hidden_size

    def forward(self, prev_hidden, batch_H, char_onehots):
        batch_H_proj = self.i2h(batch_H)
        prev_hidden_proj = torch.unsqueeze(self.h2h(prev_hidden), dim=1)
        res = torch.add(batch_H_proj, prev_hidden_proj)
        res = torch.tanh(res)
        e = self.score(res)
        alpha = F.softmax(e, dim=1)
        alpha = alpha.permute(0, 2, 1)
        context = torch.squeeze(torch.bmm(alpha, batch_H), dim=1)
        concat_context = torch.cat([context, char_onehots], 1)
        cur_hidden = self.rnn(concat_context, prev_hidden)
        return cur_hidden, alpha


class AttentionHeadNew(nn.Module):

    def __init__(self, in_channels, out_channels, hidden_size, **kwargs):
        super(AttentionHeadNew, self).__init__()
        self.input_size = in_channels
        self.hidden_size = hidden_size
        self.num_classes = out_channels
        self.attention_cell = AttentionGRUCell(in_channels, hidden_size,
            out_channels, use_gru=False)
        self.generator = nn.Linear(hidden_size, out_channels)

    def _char_to_onehot(self, input_char, onehot_dim):
        input_ont_hot = F.one_hot(input_char.long(), onehot_dim)
        return input_ont_hot

    def forward(self, input_0):
        primals_2 = self.attention_cell.i2h.weight
        primals_3 = self.attention_cell.h2h.weight
        primals_4 = self.attention_cell.h2h.bias
        primals_5 = self.attention_cell.score.weight
        primals_6 = self.attention_cell.rnn.weight_ih
        primals_7 = self.attention_cell.rnn.weight_hh
        primals_8 = self.attention_cell.rnn.bias_ih
        primals_9 = self.attention_cell.rnn.bias_hh
        primals_10 = self.generator.weight
        primals_11 = self.generator.bias
        primals_1 = 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])
        return output[0]


Measured latency_ms: 3.153238