# AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _align as align
from torch import device, empty_strided
from torch._inductor.async_compile import AsyncCompile
from torch._inductor.select_algorithm import extern_kernels
from torch._inductor.codegen.multi_kernel import MultiKernelCall
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid, split_scan_grid, grid_combo_kernels, start_graph, end_graph
from torch._C import _cuda_getCurrentRawStream as get_raw_stream

aten = torch.ops.aten
inductor_ops = torch.ops.inductor
_quantized = torch.ops._quantized
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor
alloc_from_pool = torch.ops.inductor._alloc_from_pool
async_compile = AsyncCompile()


# kernel path: runs/run_shard_1/inductor_cache/xh/cxh7nmmcrjxquhy7q5qnowpmdgqtkhmgvdcjghaw4ecbomcaskno.py
# Topologically Sorted Source Nodes: [hidden], Original ATen: [aten._to_copy]
# Source node to ATen node mapping:
#   hidden => full_default
# Graph fragment:
#   %full_default : [num_users=4] = call_function[target=torch.ops.aten.full.default](args = ([4, 4], 0.0), kwargs = {dtype: torch.float32, layout: torch.strided, device: cuda:0, pin_memory: False})
triton_poi_fused__to_copy_0 = async_compile.triton('triton_poi_fused__to_copy_0', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[16], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 0, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/qd/cqd2um76rzanttm7wf4umf54c2yegiwslyergjwu3vpi3jempkrk.py
# Topologically Sorted Source Nodes: [res, res_1], Original ATen: [aten.add, aten.tanh]
# Source node to ATen node mapping:
#   res => add
#   res_1 => tanh
# Graph fragment:
#   %add : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%view_1, %unsqueeze_1), kwargs = {})
#   %tanh : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%add,), kwargs = {})
triton_poi_fused_add_tanh_1 = async_compile.triton('triton_poi_fused_add_tanh_1', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[64], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_tanh_1', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/fp/cfp6aijow2g5is2smjrqj7kca6itit4xrxs2tseqvxiqv3qu5hs6.py
# Topologically Sorted Source Nodes: [alpha], Original ATen: [aten._softmax]
# Source node to ATen node mapping:
#   alpha => amax, exp, sub
# Graph fragment:
#   %amax : [num_users=1] = call_function[target=torch.ops.aten.amax.default](args = (%view_3, [1], True), kwargs = {})
#   %sub : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%view_3, %amax), kwargs = {})
#   %exp : [num_users=2] = call_function[target=torch.ops.aten.exp.default](args = (%sub,), kwargs = {})
triton_poi_fused__softmax_2 = async_compile.triton('triton_poi_fused__softmax_2', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[16], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__softmax_2', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/vk/cvkegrqrqvgc6l3q574j6alpmoropwpd76xcxahk7k7j2fjfbppc.py
# Topologically Sorted Source Nodes: [alpha], Original ATen: [aten._softmax]
# Source node to ATen node mapping:
#   alpha => div, sum_1
# Graph fragment:
#   %sum_1 : [num_users=1] = call_function[target=torch.ops.aten.sum.dim_IntList](args = (%exp, [1], True), kwargs = {})
#   %div : [num_users=1] = call_function[target=torch.ops.aten.div.Tensor](args = (%exp, %sum_1), kwargs = {})
triton_poi_fused__softmax_3 = async_compile.triton('triton_poi_fused__softmax_3', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[16], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__softmax_3', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/b5/cb55zn3bq5ntbzxpsxxdfmnfj22qqdj2nxmtk7o24krndl446ddz.py
# Topologically Sorted Source Nodes: [concat_context], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   concat_context => cat
# Graph fragment:
#   %cat : [num_users=2] = call_function[target=torch.ops.aten.cat.default](args = ([%squeeze, %convert_element_type_5], 1), kwargs = {})
triton_poi_fused_cat_4 = async_compile.triton('triton_poi_fused_cat_4', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[32], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_4', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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)
    tmp2 = tmp0 >= tmp1
    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
    tmp7 = tl.full([1], 8, tl.int64)
    tmp8 = tmp0 < tmp7
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/jr/cjrozw2mzi2wca2mewnz3s5r3a2ownc24twsf5squmed4davpxd7.py
# Topologically Sorted Source Nodes: [next_input], Original ATen: [aten.argmax]
# Source node to ATen node mapping:
#   next_input => argmax
# Graph fragment:
#   %argmax : [num_users=1] = call_function[target=torch.ops.aten.argmax.default](args = (%addmm_1, 1), kwargs = {})
triton_poi_fused_argmax_5 = async_compile.triton('triton_poi_fused_argmax_5', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[4], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*i64', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_argmax_5', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp45 = tl.where(tmp44, tmp30, tmp32)
    tmp46 = tl.where(tmp44, tmp31, tmp41)
    tl.store(out_ptr0 + (x0), tmp46, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/ti/ctijpnq4jfxhw2eyuxpjhowjj52geu3zhjtigtq7m6yizby6zciq.py
# Topologically Sorted Source Nodes: [concat_context_1], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   concat_context_1 => cat_1
# Graph fragment:
#   %cat_1 : [num_users=2] = call_function[target=torch.ops.aten.cat.default](args = ([%squeeze_1, %convert_element_type_6], 1), kwargs = {})
triton_poi_fused_cat_6 = async_compile.triton('triton_poi_fused_cat_6', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[32], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*i64', 2: '*fp32', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_6', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp7 = tl.full([1], 8, tl.int64)
    tmp8 = tmp0 < tmp7
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/h2/ch2kgqygiswfgeimn32pvcicwfpw4xr4ida3kruvmja6s3u6yb7b.py
# Topologically Sorted Source Nodes: [probs_3], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   probs_3 => cat_6
# Graph fragment:
#   %cat_6 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%cat_4, %unsqueeze_11], 1), kwargs = {})
triton_poi_fused_cat_7 = async_compile.triton('triton_poi_fused_cat_7', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[64], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_7', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp25 = tl.full([1], 4, tl.int64)
    tmp26 = tmp0 < tmp25
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/q6/cq67hywla2g5wtt66rysgwiudr3ita5ukjqpkt7f3khyvlxosisb.py
# Topologically Sorted Source Nodes: [probs_6], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   probs_6 => cat_12
# Graph fragment:
#   %cat_12 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%cat_10, %unsqueeze_20], 1), kwargs = {})
triton_poi_fused_cat_8 = async_compile.triton('triton_poi_fused_cat_8', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[128], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_8', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp25 = tl.full([1], 7, tl.int64)
    tmp26 = tmp0 < tmp25
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/aj/caj5cfniy2y3g4eku2kq5vnxk2sbvxla34zivjs7nh275yriey4v.py
# Topologically Sorted Source Nodes: [probs_9], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   probs_9 => cat_18
# Graph fragment:
#   %cat_18 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%cat_16, %unsqueeze_29], 1), kwargs = {})
triton_poi_fused_cat_9 = async_compile.triton('triton_poi_fused_cat_9', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_9', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp25 = tl.full([1], 10, tl.int64)
    tmp26 = tmp0 < tmp25
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/54/c54nz56irzi2n6xe2dzhujj55ei6n6b7iwkm5jc52rurvuzcinn3.py
# Topologically Sorted Source Nodes: [probs_12], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   probs_12 => cat_24
# Graph fragment:
#   %cat_24 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%cat_22, %unsqueeze_38], 1), kwargs = {})
triton_poi_fused_cat_10 = async_compile.triton('triton_poi_fused_cat_10', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_10', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp25 = tl.full([1], 13, tl.int64)
    tmp26 = tmp0 < tmp25
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/53/c53meuvzeatn6wsmyzqnlok2lfrn7klfa25amczyfuciuq647mas.py
# Topologically Sorted Source Nodes: [probs_15], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   probs_15 => cat_30
# Graph fragment:
#   %cat_30 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%cat_28, %unsqueeze_47], 1), kwargs = {})
triton_poi_fused_cat_11 = async_compile.triton('triton_poi_fused_cat_11', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_11', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp25 = tl.full([1], 16, tl.int64)
    tmp26 = tmp0 < tmp25
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/vv/cvvqtbixjxghdoerjgo4uvqoo6wjjbyd7n7vavvnm5hncqzswkmm.py
# Topologically Sorted Source Nodes: [probs_18], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   probs_18 => cat_36
# Graph fragment:
#   %cat_36 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%cat_34, %unsqueeze_56], 1), kwargs = {})
triton_poi_fused_cat_12 = async_compile.triton('triton_poi_fused_cat_12', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[512], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_12', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp25 = tl.full([1], 19, tl.int64)
    tmp26 = tmp0 < tmp25
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/cj/ccjud2ppjylaxzjxlwlqzmjrrk3y6exfjq2liqqds624ljqh5vmx.py
# Topologically Sorted Source Nodes: [probs_21], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   probs_21 => cat_42
# Graph fragment:
#   %cat_42 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%cat_40, %unsqueeze_65], 1), kwargs = {})
triton_poi_fused_cat_13 = async_compile.triton('triton_poi_fused_cat_13', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[512], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_13', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp25 = tl.full([1], 22, tl.int64)
    tmp26 = tmp0 < tmp25
    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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/si/csirworgrhb7zq6upijowsd6jlyo7oamijejt6bjv2ydnqc356ty.py
# Topologically Sorted Source Nodes: [res_48, res_49], Original ATen: [aten.add, aten.tanh]
# Source node to ATen node mapping:
#   res_48 => add_24
#   res_49 => tanh_24
# Graph fragment:
#   %add_24 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%view_1, %unsqueeze_73), kwargs = {})
#   %tanh_24 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%add_24,), kwargs = {})
triton_poi_fused_add_tanh_14 = async_compile.triton('triton_poi_fused_add_tanh_14', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[64], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_tanh_14', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/y7/cy7vyb7n2ii5vuqzchburwex2peo5xvt5wvkfoyy2bm63f3rrycs.py
# Topologically Sorted Source Nodes: [probs_24], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   probs_24 => cat_48
# Graph fragment:
#   %cat_48 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%cat_46, %unsqueeze_74], 1), kwargs = {})
triton_poi_fused_cat_15 = async_compile.triton('triton_poi_fused_cat_15', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[512], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_15', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@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
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    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
    tmp25 = tl.full([1], 25, tl.int64)
    tmp26 = tmp0 < tmp25
    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)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

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)
        # Topologically Sorted Source Nodes: [hidden], Original ATen: [aten._to_copy]
        stream0 = get_raw_stream(0)
        triton_poi_fused__to_copy_0.run(buf0, 16, grid=grid(16), stream=stream0)
        buf1 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [batch_H_proj], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res, res_1], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf2, primals_4, buf3, 64, grid=grid(64), stream=stream0)
        buf4 = reinterpret_tensor(buf2, (16, 1), (1, 1), 0); del buf2  # reuse
        # Topologically Sorted Source Nodes: [e], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf4, buf5, 16, grid=grid(16), stream=stream0)
        buf6 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf5, buf6, 16, grid=grid(16), stream=stream0)
        buf7 = reinterpret_tensor(buf5, (4, 1, 4), (4, 4, 1), 0); del buf5  # reuse
        # Topologically Sorted Source Nodes: [bmm], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context], Original ATen: [aten.cat]
        triton_poi_fused_cat_4.run(buf7, buf8, 32, grid=grid(32), stream=stream0)
        buf9 = empty_strided_cuda((4, 12), (12, 1), torch.float32)
        # Topologically Sorted Source Nodes: [ret], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [ret], Original ATen: [aten.mm]
        extern_kernels.mm(buf0, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf10)
        # Topologically Sorted Source Nodes: [ret], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [next_input], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf14, buf15, 4, grid=grid(4), stream=stream0)
        buf16 = reinterpret_tensor(buf6, (4, 4), (4, 1), 0); del buf6  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_2, res_3], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf16, primals_4, buf17, 64, grid=grid(64), stream=stream0)
        buf18 = reinterpret_tensor(buf16, (16, 1), (1, 1), 0); del buf16  # reuse
        # Topologically Sorted Source Nodes: [e_1], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_2], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf18, buf19, 16, grid=grid(16), stream=stream0)
        buf20 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_2], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf19, buf20, 16, grid=grid(16), stream=stream0)
        buf21 = reinterpret_tensor(buf19, (4, 1, 4), (4, 4, 1), 0); del buf19  # reuse
        # Topologically Sorted Source Nodes: [bmm_1], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_1], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf21, buf15, buf22, 32, grid=grid(32), stream=stream0)
        buf23 = buf9; del buf9  # reuse
        # Topologically Sorted Source Nodes: [ret_1], Original ATen: [aten.mm]
        extern_kernels.mm(buf22, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf23)
        buf24 = buf10; del buf10  # reuse
        # Topologically Sorted Source Nodes: [ret_1], Original ATen: [aten.mm]
        extern_kernels.mm(buf12, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf24)
        # Topologically Sorted Source Nodes: [ret_1], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_1], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_1], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf28, buf29, 4, grid=grid(4), stream=stream0)
        buf30 = reinterpret_tensor(buf20, (4, 4), (4, 1), 0); del buf20  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_4, res_5], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf30, primals_4, buf31, 64, grid=grid(64), stream=stream0)
        buf32 = reinterpret_tensor(buf30, (16, 1), (1, 1), 0); del buf30  # reuse
        # Topologically Sorted Source Nodes: [e_2], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_4], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf32, buf33, 16, grid=grid(16), stream=stream0)
        buf34 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_4], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf33, buf34, 16, grid=grid(16), stream=stream0)
        buf35 = reinterpret_tensor(buf33, (4, 1, 4), (4, 4, 1), 0); del buf33  # reuse
        # Topologically Sorted Source Nodes: [bmm_2], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_2], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf35, buf29, buf36, 32, grid=grid(32), stream=stream0)
        buf37 = buf24; del buf24  # reuse
        # Topologically Sorted Source Nodes: [ret_2], Original ATen: [aten.mm]
        extern_kernels.mm(buf36, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf37)
        buf38 = buf23; del buf23  # reuse
        # Topologically Sorted Source Nodes: [ret_2], Original ATen: [aten.mm]
        extern_kernels.mm(buf26, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf38)
        # Topologically Sorted Source Nodes: [ret_2], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_2], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_2], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf42, buf43, 4, grid=grid(4), stream=stream0)
        buf44 = reinterpret_tensor(buf34, (4, 4), (4, 1), 0); del buf34  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_6, res_7], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf44, primals_4, buf45, 64, grid=grid(64), stream=stream0)
        buf46 = reinterpret_tensor(buf44, (16, 1), (1, 1), 0); del buf44  # reuse
        # Topologically Sorted Source Nodes: [e_3], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_6], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf46, buf47, 16, grid=grid(16), stream=stream0)
        buf48 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_6], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf47, buf48, 16, grid=grid(16), stream=stream0)
        buf49 = reinterpret_tensor(buf47, (4, 1, 4), (4, 4, 1), 0); del buf47  # reuse
        # Topologically Sorted Source Nodes: [bmm_3], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_3], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf49, buf43, buf50, 32, grid=grid(32), stream=stream0)
        buf51 = buf38; del buf38  # reuse
        # Topologically Sorted Source Nodes: [ret_3], Original ATen: [aten.mm]
        extern_kernels.mm(buf50, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf51)
        buf52 = buf37; del buf37  # reuse
        # Topologically Sorted Source Nodes: [ret_3], Original ATen: [aten.mm]
        extern_kernels.mm(buf40, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf52)
        # Topologically Sorted Source Nodes: [ret_3], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_3], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [probs_3], Original ATen: [aten.cat]
        triton_poi_fused_cat_7.run(buf14, buf28, buf42, buf56, buf57, 64, grid=grid(64), stream=stream0)
        buf58 = buf43; del buf43  # reuse
        # Topologically Sorted Source Nodes: [next_input_3], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf56, buf58, 4, grid=grid(4), stream=stream0)
        buf59 = buf56; del buf56  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_8, res_9], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf59, primals_4, buf60, 64, grid=grid(64), stream=stream0)
        buf61 = reinterpret_tensor(buf59, (16, 1), (1, 1), 0); del buf59  # reuse
        # Topologically Sorted Source Nodes: [e_4], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_8], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf61, buf62, 16, grid=grid(16), stream=stream0)
        buf63 = reinterpret_tensor(buf28, (4, 4, 1), (4, 1, 1), 0); del buf28  # reuse
        # Topologically Sorted Source Nodes: [alpha_8], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf62, buf63, 16, grid=grid(16), stream=stream0)
        buf64 = reinterpret_tensor(buf62, (4, 1, 4), (4, 4, 1), 0); del buf62  # reuse
        # Topologically Sorted Source Nodes: [bmm_4], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_4], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf64, buf58, buf65, 32, grid=grid(32), stream=stream0)
        buf66 = buf52; del buf52  # reuse
        # Topologically Sorted Source Nodes: [ret_4], Original ATen: [aten.mm]
        extern_kernels.mm(buf65, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf66)
        buf67 = buf51; del buf51  # reuse
        # Topologically Sorted Source Nodes: [ret_4], Original ATen: [aten.mm]
        extern_kernels.mm(buf54, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf67)
        # Topologically Sorted Source Nodes: [ret_4], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_4], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_4], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf71, buf72, 4, grid=grid(4), stream=stream0)
        buf73 = reinterpret_tensor(buf63, (4, 4), (4, 1), 0); del buf63  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_10, res_11], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf73, primals_4, buf74, 64, grid=grid(64), stream=stream0)
        buf75 = reinterpret_tensor(buf73, (16, 1), (1, 1), 0); del buf73  # reuse
        # Topologically Sorted Source Nodes: [e_5], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_10], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf75, buf76, 16, grid=grid(16), stream=stream0)
        buf77 = buf48; del buf48  # reuse
        # Topologically Sorted Source Nodes: [alpha_10], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf76, buf77, 16, grid=grid(16), stream=stream0)
        buf78 = reinterpret_tensor(buf76, (4, 1, 4), (4, 4, 1), 0); del buf76  # reuse
        # Topologically Sorted Source Nodes: [bmm_5], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_5], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf78, buf72, buf79, 32, grid=grid(32), stream=stream0)
        buf80 = buf67; del buf67  # reuse
        # Topologically Sorted Source Nodes: [ret_5], Original ATen: [aten.mm]
        extern_kernels.mm(buf79, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf80)
        buf81 = buf66; del buf66  # reuse
        # Topologically Sorted Source Nodes: [ret_5], Original ATen: [aten.mm]
        extern_kernels.mm(buf69, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf81)
        # Topologically Sorted Source Nodes: [ret_5], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_5], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_5], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf85, buf86, 4, grid=grid(4), stream=stream0)
        buf87 = reinterpret_tensor(buf77, (4, 4), (4, 1), 0); del buf77  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_12, res_13], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf87, primals_4, buf88, 64, grid=grid(64), stream=stream0)
        buf89 = reinterpret_tensor(buf87, (16, 1), (1, 1), 0); del buf87  # reuse
        # Topologically Sorted Source Nodes: [e_6], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_12], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf89, buf90, 16, grid=grid(16), stream=stream0)
        buf91 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_12], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf90, buf91, 16, grid=grid(16), stream=stream0)
        buf92 = reinterpret_tensor(buf90, (4, 1, 4), (4, 4, 1), 0); del buf90  # reuse
        # Topologically Sorted Source Nodes: [bmm_6], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_6], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf92, buf86, buf93, 32, grid=grid(32), stream=stream0)
        buf94 = buf81; del buf81  # reuse
        # Topologically Sorted Source Nodes: [ret_6], Original ATen: [aten.mm]
        extern_kernels.mm(buf93, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf94)
        buf95 = buf80; del buf80  # reuse
        # Topologically Sorted Source Nodes: [ret_6], Original ATen: [aten.mm]
        extern_kernels.mm(buf83, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf95)
        # Topologically Sorted Source Nodes: [ret_6], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_6], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [probs_6], Original ATen: [aten.cat]
        triton_poi_fused_cat_8.run(buf57, buf71, buf85, buf99, buf100, 112, grid=grid(112), stream=stream0)
        buf101 = buf86; del buf86  # reuse
        # Topologically Sorted Source Nodes: [next_input_6], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf99, buf101, 4, grid=grid(4), stream=stream0)
        buf102 = buf99; del buf99  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(buf97, reinterpret_tensor(primals_3, (4, 4), (1, 4), 0), out=buf102)
        buf103 = buf57; del buf57  # reuse
        # Topologically Sorted Source Nodes: [res_14, res_15], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf102, primals_4, buf103, 64, grid=grid(64), stream=stream0)
        buf104 = reinterpret_tensor(buf102, (16, 1), (1, 1), 0); del buf102  # reuse
        # Topologically Sorted Source Nodes: [e_7], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_14], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf104, buf105, 16, grid=grid(16), stream=stream0)
        buf106 = reinterpret_tensor(buf71, (4, 4, 1), (4, 1, 1), 0); del buf71  # reuse
        # Topologically Sorted Source Nodes: [alpha_14], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf105, buf106, 16, grid=grid(16), stream=stream0)
        buf107 = reinterpret_tensor(buf105, (4, 1, 4), (4, 4, 1), 0); del buf105  # reuse
        # Topologically Sorted Source Nodes: [bmm_7], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_7], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf107, buf101, buf108, 32, grid=grid(32), stream=stream0)
        buf109 = buf95; del buf95  # reuse
        # Topologically Sorted Source Nodes: [ret_7], Original ATen: [aten.mm]
        extern_kernels.mm(buf108, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf109)
        buf110 = buf94; del buf94  # reuse
        # Topologically Sorted Source Nodes: [ret_7], Original ATen: [aten.mm]
        extern_kernels.mm(buf97, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf110)
        # Topologically Sorted Source Nodes: [ret_7], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_7], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_7], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf114, buf115, 4, grid=grid(4), stream=stream0)
        buf116 = reinterpret_tensor(buf106, (4, 4), (4, 1), 0); del buf106  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_16, res_17], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf116, primals_4, buf117, 64, grid=grid(64), stream=stream0)
        buf118 = reinterpret_tensor(buf116, (16, 1), (1, 1), 0); del buf116  # reuse
        # Topologically Sorted Source Nodes: [e_8], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_16], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf118, buf119, 16, grid=grid(16), stream=stream0)
        buf120 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_16], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf119, buf120, 16, grid=grid(16), stream=stream0)
        buf121 = reinterpret_tensor(buf119, (4, 1, 4), (4, 4, 1), 0); del buf119  # reuse
        # Topologically Sorted Source Nodes: [bmm_8], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_8], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf121, buf115, buf122, 32, grid=grid(32), stream=stream0)
        buf123 = buf110; del buf110  # reuse
        # Topologically Sorted Source Nodes: [ret_8], Original ATen: [aten.mm]
        extern_kernels.mm(buf122, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf123)
        buf124 = buf109; del buf109  # reuse
        # Topologically Sorted Source Nodes: [ret_8], Original ATen: [aten.mm]
        extern_kernels.mm(buf112, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf124)
        # Topologically Sorted Source Nodes: [ret_8], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_8], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_8], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf128, buf129, 4, grid=grid(4), stream=stream0)
        buf130 = reinterpret_tensor(buf120, (4, 4), (4, 1), 0); del buf120  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_18, res_19], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf130, primals_4, buf131, 64, grid=grid(64), stream=stream0)
        buf132 = reinterpret_tensor(buf130, (16, 1), (1, 1), 0); del buf130  # reuse
        # Topologically Sorted Source Nodes: [e_9], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_18], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf132, buf133, 16, grid=grid(16), stream=stream0)
        buf134 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_18], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf133, buf134, 16, grid=grid(16), stream=stream0)
        buf135 = reinterpret_tensor(buf133, (4, 1, 4), (4, 4, 1), 0); del buf133  # reuse
        # Topologically Sorted Source Nodes: [bmm_9], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_9], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf135, buf129, buf136, 32, grid=grid(32), stream=stream0)
        buf137 = buf124; del buf124  # reuse
        # Topologically Sorted Source Nodes: [ret_9], Original ATen: [aten.mm]
        extern_kernels.mm(buf136, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf137)
        buf138 = buf123; del buf123  # reuse
        # Topologically Sorted Source Nodes: [ret_9], Original ATen: [aten.mm]
        extern_kernels.mm(buf126, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf138)
        # Topologically Sorted Source Nodes: [ret_9], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_9], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [probs_9], Original ATen: [aten.cat]
        triton_poi_fused_cat_9.run(buf100, buf114, buf128, buf142, buf143, 160, grid=grid(160), stream=stream0)
        del buf100
        buf144 = buf129; del buf129  # reuse
        # Topologically Sorted Source Nodes: [next_input_9], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf142, buf144, 4, grid=grid(4), stream=stream0)
        buf145 = buf142; del buf142  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_20, res_21], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf145, primals_4, buf146, 64, grid=grid(64), stream=stream0)
        buf147 = reinterpret_tensor(buf145, (16, 1), (1, 1), 0); del buf145  # reuse
        # Topologically Sorted Source Nodes: [e_10], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_20], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf147, buf148, 16, grid=grid(16), stream=stream0)
        buf149 = reinterpret_tensor(buf114, (4, 4, 1), (4, 1, 1), 0); del buf114  # reuse
        # Topologically Sorted Source Nodes: [alpha_20], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf148, buf149, 16, grid=grid(16), stream=stream0)
        buf150 = reinterpret_tensor(buf148, (4, 1, 4), (4, 4, 1), 0); del buf148  # reuse
        # Topologically Sorted Source Nodes: [bmm_10], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_10], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf150, buf144, buf151, 32, grid=grid(32), stream=stream0)
        buf152 = buf138; del buf138  # reuse
        # Topologically Sorted Source Nodes: [ret_10], Original ATen: [aten.mm]
        extern_kernels.mm(buf151, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf152)
        buf153 = buf137; del buf137  # reuse
        # Topologically Sorted Source Nodes: [ret_10], Original ATen: [aten.mm]
        extern_kernels.mm(buf140, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf153)
        # Topologically Sorted Source Nodes: [ret_10], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_10], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_10], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf157, buf158, 4, grid=grid(4), stream=stream0)
        buf159 = reinterpret_tensor(buf149, (4, 4), (4, 1), 0); del buf149  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_22, res_23], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf159, primals_4, buf160, 64, grid=grid(64), stream=stream0)
        buf161 = reinterpret_tensor(buf159, (16, 1), (1, 1), 0); del buf159  # reuse
        # Topologically Sorted Source Nodes: [e_11], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_22], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf161, buf162, 16, grid=grid(16), stream=stream0)
        buf163 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_22], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf162, buf163, 16, grid=grid(16), stream=stream0)
        buf164 = reinterpret_tensor(buf162, (4, 1, 4), (4, 4, 1), 0); del buf162  # reuse
        # Topologically Sorted Source Nodes: [bmm_11], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_11], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf164, buf158, buf165, 32, grid=grid(32), stream=stream0)
        buf166 = buf153; del buf153  # reuse
        # Topologically Sorted Source Nodes: [ret_11], Original ATen: [aten.mm]
        extern_kernels.mm(buf165, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf166)
        buf167 = buf152; del buf152  # reuse
        # Topologically Sorted Source Nodes: [ret_11], Original ATen: [aten.mm]
        extern_kernels.mm(buf155, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf167)
        # Topologically Sorted Source Nodes: [ret_11], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_11], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_11], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf171, buf172, 4, grid=grid(4), stream=stream0)
        buf173 = reinterpret_tensor(buf163, (4, 4), (4, 1), 0); del buf163  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_24, res_25], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf173, primals_4, buf174, 64, grid=grid(64), stream=stream0)
        buf175 = reinterpret_tensor(buf173, (16, 1), (1, 1), 0); del buf173  # reuse
        # Topologically Sorted Source Nodes: [e_12], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_24], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf175, buf176, 16, grid=grid(16), stream=stream0)
        buf177 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_24], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf176, buf177, 16, grid=grid(16), stream=stream0)
        buf178 = reinterpret_tensor(buf176, (4, 1, 4), (4, 4, 1), 0); del buf176  # reuse
        # Topologically Sorted Source Nodes: [bmm_12], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_12], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf178, buf172, buf179, 32, grid=grid(32), stream=stream0)
        buf180 = buf167; del buf167  # reuse
        # Topologically Sorted Source Nodes: [ret_12], Original ATen: [aten.mm]
        extern_kernels.mm(buf179, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf180)
        buf181 = buf166; del buf166  # reuse
        # Topologically Sorted Source Nodes: [ret_12], Original ATen: [aten.mm]
        extern_kernels.mm(buf169, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf181)
        # Topologically Sorted Source Nodes: [ret_12], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_12], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [probs_12], Original ATen: [aten.cat]
        triton_poi_fused_cat_10.run(buf143, buf157, buf171, buf185, buf186, 208, grid=grid(208), stream=stream0)
        del buf143
        buf187 = buf172; del buf172  # reuse
        # Topologically Sorted Source Nodes: [next_input_12], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf185, buf187, 4, grid=grid(4), stream=stream0)
        buf188 = buf185; del buf185  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_26, res_27], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf188, primals_4, buf189, 64, grid=grid(64), stream=stream0)
        buf190 = reinterpret_tensor(buf188, (16, 1), (1, 1), 0); del buf188  # reuse
        # Topologically Sorted Source Nodes: [e_13], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_26], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf190, buf191, 16, grid=grid(16), stream=stream0)
        buf192 = reinterpret_tensor(buf157, (4, 4, 1), (4, 1, 1), 0); del buf157  # reuse
        # Topologically Sorted Source Nodes: [alpha_26], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf191, buf192, 16, grid=grid(16), stream=stream0)
        buf193 = reinterpret_tensor(buf191, (4, 1, 4), (4, 4, 1), 0); del buf191  # reuse
        # Topologically Sorted Source Nodes: [bmm_13], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_13], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf193, buf187, buf194, 32, grid=grid(32), stream=stream0)
        buf195 = buf181; del buf181  # reuse
        # Topologically Sorted Source Nodes: [ret_13], Original ATen: [aten.mm]
        extern_kernels.mm(buf194, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf195)
        buf196 = buf180; del buf180  # reuse
        # Topologically Sorted Source Nodes: [ret_13], Original ATen: [aten.mm]
        extern_kernels.mm(buf183, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf196)
        # Topologically Sorted Source Nodes: [ret_13], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_13], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_13], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf200, buf201, 4, grid=grid(4), stream=stream0)
        buf202 = reinterpret_tensor(buf192, (4, 4), (4, 1), 0); del buf192  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_28, res_29], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf202, primals_4, buf203, 64, grid=grid(64), stream=stream0)
        buf204 = reinterpret_tensor(buf202, (16, 1), (1, 1), 0); del buf202  # reuse
        # Topologically Sorted Source Nodes: [e_14], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_28], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf204, buf205, 16, grid=grid(16), stream=stream0)
        buf206 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_28], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf205, buf206, 16, grid=grid(16), stream=stream0)
        buf207 = reinterpret_tensor(buf205, (4, 1, 4), (4, 4, 1), 0); del buf205  # reuse
        # Topologically Sorted Source Nodes: [bmm_14], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_14], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf207, buf201, buf208, 32, grid=grid(32), stream=stream0)
        buf209 = buf196; del buf196  # reuse
        # Topologically Sorted Source Nodes: [ret_14], Original ATen: [aten.mm]
        extern_kernels.mm(buf208, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf209)
        buf210 = buf195; del buf195  # reuse
        # Topologically Sorted Source Nodes: [ret_14], Original ATen: [aten.mm]
        extern_kernels.mm(buf198, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf210)
        # Topologically Sorted Source Nodes: [ret_14], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_14], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_14], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf214, buf215, 4, grid=grid(4), stream=stream0)
        buf216 = reinterpret_tensor(buf206, (4, 4), (4, 1), 0); del buf206  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_30, res_31], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf216, primals_4, buf217, 64, grid=grid(64), stream=stream0)
        buf218 = reinterpret_tensor(buf216, (16, 1), (1, 1), 0); del buf216  # reuse
        # Topologically Sorted Source Nodes: [e_15], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_30], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf218, buf219, 16, grid=grid(16), stream=stream0)
        buf220 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_30], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf219, buf220, 16, grid=grid(16), stream=stream0)
        buf221 = reinterpret_tensor(buf219, (4, 1, 4), (4, 4, 1), 0); del buf219  # reuse
        # Topologically Sorted Source Nodes: [bmm_15], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_15], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf221, buf215, buf222, 32, grid=grid(32), stream=stream0)
        buf223 = buf210; del buf210  # reuse
        # Topologically Sorted Source Nodes: [ret_15], Original ATen: [aten.mm]
        extern_kernels.mm(buf222, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf223)
        buf224 = buf209; del buf209  # reuse
        # Topologically Sorted Source Nodes: [ret_15], Original ATen: [aten.mm]
        extern_kernels.mm(buf212, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf224)
        # Topologically Sorted Source Nodes: [ret_15], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_15], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [probs_15], Original ATen: [aten.cat]
        triton_poi_fused_cat_11.run(buf186, buf200, buf214, buf228, buf229, 256, grid=grid(256), stream=stream0)
        del buf186
        buf230 = buf215; del buf215  # reuse
        # Topologically Sorted Source Nodes: [next_input_15], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf228, buf230, 4, grid=grid(4), stream=stream0)
        buf231 = buf228; del buf228  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_32, res_33], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf231, primals_4, buf232, 64, grid=grid(64), stream=stream0)
        buf233 = reinterpret_tensor(buf231, (16, 1), (1, 1), 0); del buf231  # reuse
        # Topologically Sorted Source Nodes: [e_16], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_32], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf233, buf234, 16, grid=grid(16), stream=stream0)
        buf235 = reinterpret_tensor(buf200, (4, 4, 1), (4, 1, 1), 0); del buf200  # reuse
        # Topologically Sorted Source Nodes: [alpha_32], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf234, buf235, 16, grid=grid(16), stream=stream0)
        buf236 = reinterpret_tensor(buf234, (4, 1, 4), (4, 4, 1), 0); del buf234  # reuse
        # Topologically Sorted Source Nodes: [bmm_16], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_16], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf236, buf230, buf237, 32, grid=grid(32), stream=stream0)
        buf238 = buf224; del buf224  # reuse
        # Topologically Sorted Source Nodes: [ret_16], Original ATen: [aten.mm]
        extern_kernels.mm(buf237, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf238)
        buf239 = buf223; del buf223  # reuse
        # Topologically Sorted Source Nodes: [ret_16], Original ATen: [aten.mm]
        extern_kernels.mm(buf226, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf239)
        # Topologically Sorted Source Nodes: [ret_16], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_16], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_16], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf243, buf244, 4, grid=grid(4), stream=stream0)
        buf245 = reinterpret_tensor(buf235, (4, 4), (4, 1), 0); del buf235  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_34, res_35], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf245, primals_4, buf246, 64, grid=grid(64), stream=stream0)
        buf247 = reinterpret_tensor(buf245, (16, 1), (1, 1), 0); del buf245  # reuse
        # Topologically Sorted Source Nodes: [e_17], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_34], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf247, buf248, 16, grid=grid(16), stream=stream0)
        buf249 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_34], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf248, buf249, 16, grid=grid(16), stream=stream0)
        buf250 = reinterpret_tensor(buf248, (4, 1, 4), (4, 4, 1), 0); del buf248  # reuse
        # Topologically Sorted Source Nodes: [bmm_17], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_17], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf250, buf244, buf251, 32, grid=grid(32), stream=stream0)
        buf252 = buf239; del buf239  # reuse
        # Topologically Sorted Source Nodes: [ret_17], Original ATen: [aten.mm]
        extern_kernels.mm(buf251, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf252)
        buf253 = buf238; del buf238  # reuse
        # Topologically Sorted Source Nodes: [ret_17], Original ATen: [aten.mm]
        extern_kernels.mm(buf241, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf253)
        # Topologically Sorted Source Nodes: [ret_17], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_17], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_17], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf257, buf258, 4, grid=grid(4), stream=stream0)
        buf259 = reinterpret_tensor(buf249, (4, 4), (4, 1), 0); del buf249  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_36, res_37], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf259, primals_4, buf260, 64, grid=grid(64), stream=stream0)
        buf261 = reinterpret_tensor(buf259, (16, 1), (1, 1), 0); del buf259  # reuse
        # Topologically Sorted Source Nodes: [e_18], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_36], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf261, buf262, 16, grid=grid(16), stream=stream0)
        buf263 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_36], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf262, buf263, 16, grid=grid(16), stream=stream0)
        buf264 = reinterpret_tensor(buf262, (4, 1, 4), (4, 4, 1), 0); del buf262  # reuse
        # Topologically Sorted Source Nodes: [bmm_18], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_18], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf264, buf258, buf265, 32, grid=grid(32), stream=stream0)
        buf266 = buf253; del buf253  # reuse
        # Topologically Sorted Source Nodes: [ret_18], Original ATen: [aten.mm]
        extern_kernels.mm(buf265, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf266)
        buf267 = buf252; del buf252  # reuse
        # Topologically Sorted Source Nodes: [ret_18], Original ATen: [aten.mm]
        extern_kernels.mm(buf255, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf267)
        # Topologically Sorted Source Nodes: [ret_18], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_18], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [probs_18], Original ATen: [aten.cat]
        triton_poi_fused_cat_12.run(buf229, buf243, buf257, buf271, buf272, 304, grid=grid(304), stream=stream0)
        del buf229
        buf273 = buf258; del buf258  # reuse
        # Topologically Sorted Source Nodes: [next_input_18], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf271, buf273, 4, grid=grid(4), stream=stream0)
        buf274 = buf271; del buf271  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_38, res_39], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf274, primals_4, buf275, 64, grid=grid(64), stream=stream0)
        buf276 = reinterpret_tensor(buf274, (16, 1), (1, 1), 0); del buf274  # reuse
        # Topologically Sorted Source Nodes: [e_19], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_38], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf276, buf277, 16, grid=grid(16), stream=stream0)
        buf278 = reinterpret_tensor(buf243, (4, 4, 1), (4, 1, 1), 0); del buf243  # reuse
        # Topologically Sorted Source Nodes: [alpha_38], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf277, buf278, 16, grid=grid(16), stream=stream0)
        buf279 = reinterpret_tensor(buf277, (4, 1, 4), (4, 4, 1), 0); del buf277  # reuse
        # Topologically Sorted Source Nodes: [bmm_19], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_19], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf279, buf273, buf280, 32, grid=grid(32), stream=stream0)
        buf281 = buf267; del buf267  # reuse
        # Topologically Sorted Source Nodes: [ret_19], Original ATen: [aten.mm]
        extern_kernels.mm(buf280, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf281)
        buf282 = buf266; del buf266  # reuse
        # Topologically Sorted Source Nodes: [ret_19], Original ATen: [aten.mm]
        extern_kernels.mm(buf269, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf282)
        # Topologically Sorted Source Nodes: [ret_19], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_19], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_19], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf286, buf287, 4, grid=grid(4), stream=stream0)
        buf288 = reinterpret_tensor(buf278, (4, 4), (4, 1), 0); del buf278  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_40, res_41], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf288, primals_4, buf289, 64, grid=grid(64), stream=stream0)
        buf290 = reinterpret_tensor(buf288, (16, 1), (1, 1), 0); del buf288  # reuse
        # Topologically Sorted Source Nodes: [e_20], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_40], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf290, buf291, 16, grid=grid(16), stream=stream0)
        buf292 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_40], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf291, buf292, 16, grid=grid(16), stream=stream0)
        buf293 = reinterpret_tensor(buf291, (4, 1, 4), (4, 4, 1), 0); del buf291  # reuse
        # Topologically Sorted Source Nodes: [bmm_20], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_20], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf293, buf287, buf294, 32, grid=grid(32), stream=stream0)
        buf295 = buf282; del buf282  # reuse
        # Topologically Sorted Source Nodes: [ret_20], Original ATen: [aten.mm]
        extern_kernels.mm(buf294, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf295)
        buf296 = buf281; del buf281  # reuse
        # Topologically Sorted Source Nodes: [ret_20], Original ATen: [aten.mm]
        extern_kernels.mm(buf284, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf296)
        # Topologically Sorted Source Nodes: [ret_20], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_20], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_20], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf300, buf301, 4, grid=grid(4), stream=stream0)
        buf302 = reinterpret_tensor(buf292, (4, 4), (4, 1), 0); del buf292  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_42, res_43], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf302, primals_4, buf303, 64, grid=grid(64), stream=stream0)
        buf304 = reinterpret_tensor(buf302, (16, 1), (1, 1), 0); del buf302  # reuse
        # Topologically Sorted Source Nodes: [e_21], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_42], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf304, buf305, 16, grid=grid(16), stream=stream0)
        buf306 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_42], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf305, buf306, 16, grid=grid(16), stream=stream0)
        buf307 = reinterpret_tensor(buf305, (4, 1, 4), (4, 4, 1), 0); del buf305  # reuse
        # Topologically Sorted Source Nodes: [bmm_21], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_21], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf307, buf301, buf308, 32, grid=grid(32), stream=stream0)
        buf309 = buf296; del buf296  # reuse
        # Topologically Sorted Source Nodes: [ret_21], Original ATen: [aten.mm]
        extern_kernels.mm(buf308, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf309)
        buf310 = buf295; del buf295  # reuse
        # Topologically Sorted Source Nodes: [ret_21], Original ATen: [aten.mm]
        extern_kernels.mm(buf298, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf310)
        # Topologically Sorted Source Nodes: [ret_21], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_21], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [probs_21], Original ATen: [aten.cat]
        triton_poi_fused_cat_13.run(buf272, buf286, buf300, buf314, buf315, 352, grid=grid(352), stream=stream0)
        del buf272
        buf316 = buf301; del buf301  # reuse
        # Topologically Sorted Source Nodes: [next_input_21], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf314, buf316, 4, grid=grid(4), stream=stream0)
        buf317 = buf314; del buf314  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_44, res_45], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf317, primals_4, buf318, 64, grid=grid(64), stream=stream0)
        buf319 = reinterpret_tensor(buf317, (16, 1), (1, 1), 0); del buf317  # reuse
        # Topologically Sorted Source Nodes: [e_22], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_44], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf319, buf320, 16, grid=grid(16), stream=stream0)
        buf321 = reinterpret_tensor(buf286, (4, 4, 1), (4, 1, 1), 0); del buf286  # reuse
        # Topologically Sorted Source Nodes: [alpha_44], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf320, buf321, 16, grid=grid(16), stream=stream0)
        buf322 = reinterpret_tensor(buf320, (4, 1, 4), (4, 4, 1), 0); del buf320  # reuse
        # Topologically Sorted Source Nodes: [bmm_22], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_22], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf322, buf316, buf323, 32, grid=grid(32), stream=stream0)
        buf324 = buf310; del buf310  # reuse
        # Topologically Sorted Source Nodes: [ret_22], Original ATen: [aten.mm]
        extern_kernels.mm(buf323, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf324)
        buf325 = buf309; del buf309  # reuse
        # Topologically Sorted Source Nodes: [ret_22], Original ATen: [aten.mm]
        extern_kernels.mm(buf312, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf325)
        # Topologically Sorted Source Nodes: [ret_22], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_22], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_22], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf329, buf330, 4, grid=grid(4), stream=stream0)
        buf331 = reinterpret_tensor(buf321, (4, 4), (4, 1), 0); del buf321  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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)
        # Topologically Sorted Source Nodes: [res_46, res_47], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_1.run(buf1, buf331, primals_4, buf332, 64, grid=grid(64), stream=stream0)
        buf333 = reinterpret_tensor(buf331, (16, 1), (1, 1), 0); del buf331  # reuse
        # Topologically Sorted Source Nodes: [e_23], Original ATen: [aten.mm]
        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  # reuse
        # Topologically Sorted Source Nodes: [alpha_46], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf333, buf334, 16, grid=grid(16), stream=stream0)
        buf335 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_46], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf334, buf335, 16, grid=grid(16), stream=stream0)
        buf336 = reinterpret_tensor(buf334, (4, 1, 4), (4, 4, 1), 0); del buf334  # reuse
        # Topologically Sorted Source Nodes: [bmm_23], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_23], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf336, buf330, buf337, 32, grid=grid(32), stream=stream0)
        buf338 = buf325; del buf325  # reuse
        # Topologically Sorted Source Nodes: [ret_23], Original ATen: [aten.mm]
        extern_kernels.mm(buf337, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf338)
        buf339 = buf324; del buf324  # reuse
        # Topologically Sorted Source Nodes: [ret_23], Original ATen: [aten.mm]
        extern_kernels.mm(buf327, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf339)
        # Topologically Sorted Source Nodes: [ret_23], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_23], Original ATen: [aten.addmm]
        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  # reuse
        # Topologically Sorted Source Nodes: [next_input_23], Original ATen: [aten.argmax]
        triton_poi_fused_argmax_5.run(buf343, buf344, 4, grid=grid(4), stream=stream0)
        buf345 = reinterpret_tensor(buf335, (4, 4), (4, 1), 0); del buf335  # reuse
        # Topologically Sorted Source Nodes: [], Original ATen: []
        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  # reuse
        # Topologically Sorted Source Nodes: [res_48, res_49], Original ATen: [aten.add, aten.tanh]
        triton_poi_fused_add_tanh_14.run(buf346, buf345, primals_4, 64, grid=grid(64), stream=stream0)
        del primals_4
        buf347 = reinterpret_tensor(buf345, (16, 1), (1, 1), 0); del buf345  # reuse
        # Topologically Sorted Source Nodes: [e_24], Original ATen: [aten.mm]
        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)
        # Topologically Sorted Source Nodes: [alpha_48], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf347, buf348, 16, grid=grid(16), stream=stream0)
        buf349 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [alpha_48], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf348, buf349, 16, grid=grid(16), stream=stream0)
        buf350 = reinterpret_tensor(buf348, (4, 1, 4), (4, 4, 1), 0); del buf348  # reuse
        # Topologically Sorted Source Nodes: [bmm_24], Original ATen: [aten.bmm]
        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)
        # Topologically Sorted Source Nodes: [concat_context_24], Original ATen: [aten.cat]
        triton_poi_fused_cat_6.run(buf350, buf344, buf351, 32, grid=grid(32), stream=stream0)
        del buf344
        buf352 = buf339; del buf339  # reuse
        # Topologically Sorted Source Nodes: [ret_24], Original ATen: [aten.mm]
        extern_kernels.mm(buf351, reinterpret_tensor(primals_6, (8, 12), (1, 8), 0), out=buf352)
        buf353 = buf338; del buf338  # reuse
        # Topologically Sorted Source Nodes: [ret_24], Original ATen: [aten.mm]
        extern_kernels.mm(buf341, reinterpret_tensor(primals_7, (4, 12), (1, 4), 0), out=buf353)
        # Topologically Sorted Source Nodes: [ret_24], Original ATen: [aten._thnn_fused_gru_cell]
        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  # reuse
        # Topologically Sorted Source Nodes: [probs_step_24], Original ATen: [aten.addmm]
        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)
        # Topologically Sorted Source Nodes: [probs_24], Original ATen: [aten.cat]
        triton_poi_fused_cat_15.run(buf315, buf329, buf343, buf357, buf358, 400, grid=grid(400), stream=stream0)
        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, )


def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    primals_1 = rand_strided((4, 4, 4), (16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((4, 4), (4, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((4, 4), (4, 1), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((1, 4), (4, 1), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((12, 8), (8, 1), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((12, 4), (4, 1), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((12, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((12, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((4, 4), (4, 1), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11])
    return print_performance(fn, times=times, repeat=repeat)


if __name__ == "__main__":
    from torch._inductor.wrapper_benchmark import compiled_module_main
    compiled_module_main('None', benchmark_compiled_module)

import torch
from torch import nn
import torch.nn.functional as F


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 AttentionHead(nn.Module):

    def __init__(self, in_channels, out_channels, hidden_size, **kwargs):
        super(AttentionHead, 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, inputs, targets=None, batch_max_length=25):
        batch_size = inputs.shape[0]
        num_steps = batch_max_length
        hidden = torch.zeros((batch_size, self.hidden_size)).type_as(inputs)
        output_hiddens = torch.zeros((batch_size, num_steps, self.hidden_size)
            ).type_as(inputs)
        if targets is not None:
            for i in range(num_steps):
                char_onehots = self._char_to_onehot(targets[:, i],
                    onehot_dim=self.num_classes)
                hidden, _alpha = self.attention_cell(hidden, inputs,
                    char_onehots)
                output_hiddens[:, i, :] = hidden[0]
            probs = self.generator(output_hiddens)
        else:
            targets = torch.zeros(batch_size).int().type_as(inputs)
            probs = None
            char_onehots = None
            for i in range(num_steps):
                char_onehots = self._char_to_onehot(targets, onehot_dim=
                    self.num_classes)
                hidden, _alpha = self.attention_cell(hidden, inputs,
                    char_onehots)
                probs_step = self.generator(hidden)
                if probs is None:
                    probs = torch.unsqueeze(probs_step, dim=1)
                else:
                    probs = torch.cat([probs, torch.unsqueeze(probs_step,
                        dim=1)], dim=1)
                next_input = probs_step.argmax(dim=1)
                targets = next_input
        return probs


def get_inputs():
    return [torch.rand([4, 4, 4])]


def get_init_inputs():
    return [[], {'in_channels': 4, 'out_channels': 4, 'hidden_size': 4}]

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]
