# 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/dh/cdhwwkkwwalf3fekd34n4w7urr47fv5kpqakc24ioadnboe5irlo.py
# Topologically Sorted Source Nodes: [hf], Original ATen: [aten.clone]
# Source node to ATen node mapping:
#   hf => clone_2
# Graph fragment:
#   %clone_2 : [num_users=1] = call_function[target=torch.ops.aten.clone.default](args = (%permute,), kwargs = {memory_format: torch.contiguous_format})
triton_poi_fused_clone_0 = async_compile.triton('triton_poi_fused_clone_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, 4], tile_hint=TileHint.SQUARE,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32', 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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_clone_0', '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_clone_0(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 16
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 4
    y1 = (yindex // 4)
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + (4*x2) + (16*y1)), xmask & ymask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + (4*y3)), tmp0, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/iv/civlcl6dr4hxv3h37b66u75jadydavin2nqftyffnz35kihwpnuf.py
# Topologically Sorted Source Nodes: [gates], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   gates => sigmoid
# Graph fragment:
#   %sigmoid : [num_users=4] = call_function[target=torch.ops.aten.sigmoid.default](args = (%slice_4,), kwargs = {})
triton_poi_fused_sigmoid_1 = async_compile.triton('triton_poi_fused_sigmoid_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_sigmoid_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_sigmoid_1(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 48
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x3 = (xindex // 4)
    x2 = (xindex // 16)
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + (16*x3)), xmask)
    tmp1 = tl.load(in_ptr1 + (x0 + (4*x2)), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x0 + (4*x2)), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x4), tmp5, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/p2/cp2d4sc2imujujs5jxu7vliwd4n4hrdk3qxz53uhi5aefsvztafv.py
# Topologically Sorted Source Nodes: [cell_, mul, mul_1, cell_f, tanh_1, hidden_f_, eq, hidden_f_2], Original ATen: [aten.tanh, aten.mul, aten.add, aten.eq, aten.where]
# Source node to ATen node mapping:
#   cell_ => tanh
#   cell_f => add_2
#   eq => eq
#   hidden_f_ => mul_2
#   hidden_f_2 => where
#   mul => mul
#   mul_1 => mul_1
#   tanh_1 => tanh_1
# Graph fragment:
#   %tanh : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%select_4,), kwargs = {})
#   %mul : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_1, %primals_5), kwargs = {})
#   %mul_1 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_2, %tanh), kwargs = {})
#   %add_2 : [num_users=2] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_1), kwargs = {})
#   %tanh_1 : [num_users=1] = call_function[target=torch.ops.aten.tanh.default](args = (%add_2,), kwargs = {})
#   %mul_2 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_3, %tanh_1), kwargs = {})
#   %eq : [num_users=2] = call_function[target=torch.ops.aten.eq.Scalar](args = (%select_5, 0.0), kwargs = {})
#   %where : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%eq, %view_9, %mul_2), kwargs = {})
triton_poi_fused_add_eq_mul_tanh_where_2 = async_compile.triton('triton_poi_fused_add_eq_mul_tanh_where_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: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp32', 9: '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, 6, 7, 8, 9), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_eq_mul_tanh_where_2', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 9, '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_eq_mul_tanh_where_2(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = (xindex // 4)
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (192 + x0 + (16*x1)), xmask)
    tmp1 = tl.load(in_ptr1 + (12 + x0), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (12 + x0), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr3 + (4*x1), xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr4 + (x0), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr5 + (32 + x2), xmask)
    tmp11 = tl.load(in_ptr5 + (x2), xmask)
    tmp12 = tl.load(in_ptr6 + (x0), xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr5 + (16 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp7 = 0.0
    tmp8 = tmp6 == tmp7
    tmp13 = tmp11 * tmp12
    tmp15 = tmp14 * tmp5
    tmp16 = tmp13 + tmp15
    tmp17 = libdevice.tanh(tmp16)
    tmp18 = tmp10 * tmp17
    tmp19 = tl.where(tmp8, tmp9, tmp18)
    tl.store(out_ptr0 + (x2), tmp5, xmask)
    tl.store(out_ptr1 + (x2), tmp19, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/qc/cqck52v65u7tj7hlredfj4weo7bnwbaw66siuewilgokmjri5aug.py
# Topologically Sorted Source Nodes: [hb], Original ATen: [aten.clone]
# Source node to ATen node mapping:
#   hb => clone_3
# Graph fragment:
#   %clone_3 : [num_users=1] = call_function[target=torch.ops.aten.clone.default](args = (%permute_3,), kwargs = {memory_format: torch.contiguous_format})
triton_poi_fused_clone_3 = async_compile.triton('triton_poi_fused_clone_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, 4], tile_hint=TileHint.SQUARE,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32', 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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_clone_3', '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_clone_3(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 16
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 4
    y1 = (yindex // 4)
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (64 + y0 + (4*x2) + (16*y1)), xmask & ymask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + (4*y3)), tmp0, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/qq/cqqwxk6z5fq3pukv6dxohb3t5bbezcl7yryq4nktksqhgmacu43q.py
# Topologically Sorted Source Nodes: [gates_1], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   gates_1 => sigmoid_1
# Graph fragment:
#   %sigmoid_1 : [num_users=4] = call_function[target=torch.ops.aten.sigmoid.default](args = (%slice_9,), kwargs = {})
triton_poi_fused_sigmoid_4 = async_compile.triton('triton_poi_fused_sigmoid_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=[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_sigmoid_4', '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_sigmoid_4(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 48
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x3 = (xindex // 4)
    x2 = (xindex // 16)
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (268 + x0 + (16*x3)), xmask)
    tmp1 = tl.load(in_ptr1 + (16 + x0 + (4*x2)), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x0 + (4*x2)), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x4), tmp5, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/oc/coc4ueo6l4uzrrtj3acri3icmolona4fwciopr6bx23ya3cvfgzr.py
# Topologically Sorted Source Nodes: [cell__1, mul_3, mul_4, cell_b, tanh_3, hidden_b_, eq_1, hidden_b_2], Original ATen: [aten.tanh, aten.mul, aten.add, aten.eq, aten.where]
# Source node to ATen node mapping:
#   cell__1 => tanh_2
#   cell_b => add_4
#   eq_1 => eq_1
#   hidden_b_ => mul_5
#   hidden_b_2 => where_1
#   mul_3 => mul_3
#   mul_4 => mul_4
#   tanh_3 => tanh_3
# Graph fragment:
#   %tanh_2 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%select_10,), kwargs = {})
#   %mul_3 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_7, %primals_6), kwargs = {})
#   %mul_4 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_8, %tanh_2), kwargs = {})
#   %add_4 : [num_users=2] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_3, %mul_4), kwargs = {})
#   %tanh_3 : [num_users=1] = call_function[target=torch.ops.aten.tanh.default](args = (%add_4,), kwargs = {})
#   %mul_5 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_9, %tanh_3), kwargs = {})
#   %eq_1 : [num_users=2] = call_function[target=torch.ops.aten.eq.Scalar](args = (%select_11, 0.0), kwargs = {})
#   %where_1 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%eq_1, %view_14, %mul_5), kwargs = {})
triton_poi_fused_add_eq_mul_tanh_where_5 = async_compile.triton('triton_poi_fused_add_eq_mul_tanh_where_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=[16], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp32', 9: '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, 6, 7, 8, 9), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_eq_mul_tanh_where_5', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 9, '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_eq_mul_tanh_where_5(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = (xindex // 4)
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (460 + x0 + (16*x1)), xmask)
    tmp1 = tl.load(in_ptr1 + (28 + x0), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (12 + x0), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr3 + (3 + (4*x1)), xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr4 + (x0), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr5 + (32 + x2), xmask)
    tmp11 = tl.load(in_ptr5 + (x2), xmask)
    tmp12 = tl.load(in_ptr6 + (x0), xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr5 + (16 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp7 = 0.0
    tmp8 = tmp6 == tmp7
    tmp13 = tmp11 * tmp12
    tmp15 = tmp14 * tmp5
    tmp16 = tmp13 + tmp15
    tmp17 = libdevice.tanh(tmp16)
    tmp18 = tmp10 * tmp17
    tmp19 = tl.where(tmp8, tmp9, tmp18)
    tl.store(out_ptr0 + (x2), tmp5, xmask)
    tl.store(out_ptr1 + (x2), tmp19, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/si/csibkryuhv6h3nawkdghbrfgrtcaccduopyaueehig7z2sdu55a3.py
# Topologically Sorted Source Nodes: [gates_2], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   gates_2 => sigmoid_2
# Graph fragment:
#   %sigmoid_2 : [num_users=4] = call_function[target=torch.ops.aten.sigmoid.default](args = (%slice_14,), kwargs = {})
triton_poi_fused_sigmoid_6 = async_compile.triton('triton_poi_fused_sigmoid_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=[16, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_6', '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_sigmoid_6(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = (yindex // 4)
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (4 + x2 + (16*y3)), xmask & ymask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2 + (4*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + (4*x2) + (16*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + (4*y3)), tmp5, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/gs/cgs3m7o6htt3nb65vukdrpof4dno7i6mchgolpbwwhye5r4hyzyo.py
# Topologically Sorted Source Nodes: [mul, mul_1, cell_f, cell__2, mul_6, mul_7, cell_f_1, tanh_5, hidden_f__1, eq_2, hidden_f_5], Original ATen: [aten.mul, aten.add, aten.tanh, aten.eq, aten.where]
# Source node to ATen node mapping:
#   cell__2 => tanh_4
#   cell_f => add_2
#   cell_f_1 => add_6
#   eq_2 => eq_2
#   hidden_f_5 => where_2
#   hidden_f__1 => mul_8
#   mul => mul
#   mul_1 => mul_1
#   mul_6 => mul_6
#   mul_7 => mul_7
#   tanh_5 => tanh_5
# Graph fragment:
#   %mul : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_1, %primals_5), kwargs = {})
#   %mul_1 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_2, %tanh), kwargs = {})
#   %add_2 : [num_users=2] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_1), kwargs = {})
#   %tanh_4 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%select_16,), kwargs = {})
#   %mul_6 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_13, %add_2), kwargs = {})
#   %mul_7 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_14, %tanh_4), kwargs = {})
#   %add_6 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_6, %mul_7), kwargs = {})
#   %tanh_5 : [num_users=1] = call_function[target=torch.ops.aten.tanh.default](args = (%add_6,), kwargs = {})
#   %mul_8 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_15, %tanh_5), kwargs = {})
#   %eq_2 : [num_users=2] = call_function[target=torch.ops.aten.eq.Scalar](args = (%select_17, 0.0), kwargs = {})
#   %where_2 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%eq_2, %view_19, %mul_8), kwargs = {})
triton_poi_fused_add_eq_mul_tanh_where_7 = async_compile.triton('triton_poi_fused_add_eq_mul_tanh_where_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=[4, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp32', 9: '*fp32', 10: '*fp32', 11: '*fp32', 12: 'i32', 13: '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, 6, 7, 8, 9, 10, 11), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_eq_mul_tanh_where_7', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 12, '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_eq_mul_tanh_where_7(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8, out_ptr0, out_ptr1, out_ptr2, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (196 + x1 + (16*y0)), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (12 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + (4*x1)), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + (4*y0)), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + (4*y0)), xmask & ymask)
    tmp8 = tl.load(in_ptr5 + (x1), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr4 + (16 + x1 + (4*y0)), xmask & ymask)
    tmp11 = tl.load(in_ptr6 + (x1 + (4*y0)), xmask & ymask)
    tmp15 = tl.load(in_ptr3 + (16 + x1 + (4*y0)), xmask & ymask)
    tmp18 = tl.load(in_ptr7 + (1 + (4*y0)), ymask, eviction_policy='evict_last')
    tmp21 = tl.load(in_ptr8 + (x1 + (4*y0)), xmask & ymask)
    tmp22 = tl.load(in_ptr3 + (32 + x1 + (4*y0)), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp9 = tmp7 * tmp8
    tmp12 = tmp10 * tmp11
    tmp13 = tmp9 + tmp12
    tmp14 = tmp6 * tmp13
    tmp16 = tmp15 * tmp5
    tmp17 = tmp14 + tmp16
    tmp19 = 0.0
    tmp20 = tmp18 == tmp19
    tmp23 = libdevice.tanh(tmp17)
    tmp24 = tmp22 * tmp23
    tmp25 = tl.where(tmp20, tmp21, tmp24)
    tl.store(out_ptr0 + (x1 + (4*y0)), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + (4*y0)), tmp17, xmask & ymask)
    tl.store(out_ptr2 + (x1 + (4*y0)), tmp25, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/4v/c4vg75eipp5wv5so4ljmk5fxtnirbmxplvh3yujhdzpi5emniaul.py
# Topologically Sorted Source Nodes: [gates_3], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   gates_3 => sigmoid_3
# Graph fragment:
#   %sigmoid_3 : [num_users=4] = call_function[target=torch.ops.aten.sigmoid.default](args = (%slice_19,), kwargs = {})
triton_poi_fused_sigmoid_8 = async_compile.triton('triton_poi_fused_sigmoid_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=[16, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_8', '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_sigmoid_8(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = (yindex // 4)
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (264 + x2 + (16*y3)), xmask & ymask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (16 + x2 + (4*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + (4*x2) + (16*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + (4*y3)), tmp5, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/w6/cw645xrs46k5fwfgq6lzkugzdcizudqyqipp3q7mrjuzqjxmcbf4.py
# Topologically Sorted Source Nodes: [gates_4], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   gates_4 => sigmoid_4
# Graph fragment:
#   %sigmoid_4 : [num_users=4] = call_function[target=torch.ops.aten.sigmoid.default](args = (%slice_24,), kwargs = {})
triton_poi_fused_sigmoid_9 = async_compile.triton('triton_poi_fused_sigmoid_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=[16, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_9', '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_sigmoid_9(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = (yindex // 4)
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (8 + x2 + (16*y3)), xmask & ymask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2 + (4*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + (4*x2) + (16*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + (4*y3)), tmp5, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/v7/cv7iyki3pgci6wtqww3aa4lcxry6yaa3dyo5fjerr2rvwnnb6ptp.py
# Topologically Sorted Source Nodes: [mul_3, mul_4, cell_b, cell__3, mul_9, mul_10, cell_b_1, tanh_7, hidden_b__1, eq_3, hidden_b_5, cell__4, mul_12, mul_13, cell_f_2, tanh_9, hidden_f__2, hidden_f_8], Original ATen: [aten.mul, aten.add, aten.tanh, aten.eq, aten.where]
# Source node to ATen node mapping:
#   cell__3 => tanh_6
#   cell__4 => tanh_8
#   cell_b => add_4
#   cell_b_1 => add_8
#   cell_f_2 => add_10
#   eq_3 => eq_3
#   hidden_b_5 => where_3
#   hidden_b__1 => mul_11
#   hidden_f_8 => where_4
#   hidden_f__2 => mul_14
#   mul_10 => mul_10
#   mul_12 => mul_12
#   mul_13 => mul_13
#   mul_3 => mul_3
#   mul_4 => mul_4
#   mul_9 => mul_9
#   tanh_7 => tanh_7
#   tanh_9 => tanh_9
# Graph fragment:
#   %mul_3 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_7, %primals_6), kwargs = {})
#   %mul_4 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_8, %tanh_2), kwargs = {})
#   %add_4 : [num_users=2] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_3, %mul_4), kwargs = {})
#   %tanh_6 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%select_22,), kwargs = {})
#   %mul_9 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_19, %add_4), kwargs = {})
#   %mul_10 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_20, %tanh_6), kwargs = {})
#   %add_8 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_9, %mul_10), kwargs = {})
#   %tanh_7 : [num_users=1] = call_function[target=torch.ops.aten.tanh.default](args = (%add_8,), kwargs = {})
#   %mul_11 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_21, %tanh_7), kwargs = {})
#   %eq_3 : [num_users=2] = call_function[target=torch.ops.aten.eq.Scalar](args = (%select_23, 0.0), kwargs = {})
#   %where_3 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%eq_3, %view_24, %mul_11), kwargs = {})
#   %tanh_8 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%select_28,), kwargs = {})
#   %mul_12 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_25, %add_6), kwargs = {})
#   %mul_13 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_26, %tanh_8), kwargs = {})
#   %add_10 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_12, %mul_13), kwargs = {})
#   %tanh_9 : [num_users=1] = call_function[target=torch.ops.aten.tanh.default](args = (%add_10,), kwargs = {})
#   %mul_14 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_27, %tanh_9), kwargs = {})
#   %where_4 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%eq_3, %view_29, %mul_14), kwargs = {})
triton_poi_fused_add_eq_mul_tanh_where_10 = async_compile.triton('triton_poi_fused_add_eq_mul_tanh_where_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=[4, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp32', 9: '*fp32', 10: '*fp32', 11: '*fp32', 12: '*fp32', 13: '*fp32', 14: '*fp32', 15: '*fp32', 16: '*fp32', 17: '*fp32', 18: '*fp32', 19: 'i32', 20: '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, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_eq_mul_tanh_where_10', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 20, '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_eq_mul_tanh_where_10(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8, in_ptr9, in_ptr10, in_ptr11, in_ptr12, out_ptr0, out_ptr1, out_ptr2, out_ptr3, out_ptr4, out_ptr5, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (456 + x1 + (16*y0)), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (28 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + (4*x1)), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + (4*y0)), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + (4*y0)), xmask & ymask)
    tmp8 = tl.load(in_ptr5 + (x1), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr4 + (16 + x1 + (4*y0)), xmask & ymask)
    tmp11 = tl.load(in_ptr6 + (x1 + (4*y0)), xmask & ymask)
    tmp15 = tl.load(in_ptr3 + (16 + x1 + (4*y0)), xmask & ymask)
    tmp18 = tl.load(in_ptr7 + (2 + (4*y0)), ymask, eviction_policy='evict_last')
    tmp21 = tl.load(in_ptr8 + (x1 + (4*y0)), xmask & ymask)
    tmp22 = tl.load(in_ptr3 + (32 + x1 + (4*y0)), xmask & ymask)
    tmp26 = tl.load(in_ptr0 + (200 + x1 + (16*y0)), xmask & ymask)
    tmp27 = tl.load(in_ptr1 + (12 + x1), xmask, eviction_policy='evict_last')
    tmp29 = tl.load(in_ptr9 + (48 + y0 + (4*x1)), xmask & ymask)
    tmp32 = tl.load(in_ptr10 + (x1 + (4*y0)), xmask & ymask)
    tmp33 = tl.load(in_ptr11 + (x1 + (4*y0)), xmask & ymask)
    tmp35 = tl.load(in_ptr10 + (16 + x1 + (4*y0)), xmask & ymask)
    tmp38 = tl.load(in_ptr12 + (x1 + (4*y0)), xmask & ymask)
    tmp39 = tl.load(in_ptr10 + (32 + x1 + (4*y0)), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp9 = tmp7 * tmp8
    tmp12 = tmp10 * tmp11
    tmp13 = tmp9 + tmp12
    tmp14 = tmp6 * tmp13
    tmp16 = tmp15 * tmp5
    tmp17 = tmp14 + tmp16
    tmp19 = 0.0
    tmp20 = tmp18 == tmp19
    tmp23 = libdevice.tanh(tmp17)
    tmp24 = tmp22 * tmp23
    tmp25 = tl.where(tmp20, tmp21, tmp24)
    tmp28 = tmp26 + tmp27
    tmp30 = tmp28 + tmp29
    tmp31 = libdevice.tanh(tmp30)
    tmp34 = tmp32 * tmp33
    tmp36 = tmp35 * tmp31
    tmp37 = tmp34 + tmp36
    tmp40 = libdevice.tanh(tmp37)
    tmp41 = tmp39 * tmp40
    tmp42 = tl.where(tmp20, tmp38, tmp41)
    tl.store(out_ptr0 + (x1 + (4*y0)), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + (4*y0)), tmp17, xmask & ymask)
    tl.store(out_ptr2 + (x1 + (4*y0)), tmp25, xmask & ymask)
    tl.store(out_ptr3 + (x1 + (4*y0)), tmp31, xmask & ymask)
    tl.store(out_ptr4 + (x1 + (4*y0)), tmp37, xmask & ymask)
    tl.store(out_ptr5 + (x1 + (4*y0)), tmp42, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/vc/cvcvser4w6g4xoepqoaxb6a4yedoqazwa5tz2xwcktcdvcs7yb3l.py
# Topologically Sorted Source Nodes: [gates_5], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   gates_5 => sigmoid_5
# Graph fragment:
#   %sigmoid_5 : [num_users=4] = call_function[target=torch.ops.aten.sigmoid.default](args = (%slice_29,), kwargs = {})
triton_poi_fused_sigmoid_11 = async_compile.triton('triton_poi_fused_sigmoid_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=[16, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_11', '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_sigmoid_11(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = (yindex // 4)
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (260 + x2 + (16*y3)), xmask & ymask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (16 + x2 + (4*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + (4*x2) + (16*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + (4*y3)), tmp5, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/q4/cq45bovwn56aajgw53wsabclxvddvdnxs5t3axyhhknd3yw2mxt5.py
# Topologically Sorted Source Nodes: [eq_2, cell__5, mul_15, mul_16, cell_b_2, tanh_11, hidden_b__2, hidden_b_8], Original ATen: [aten.eq, aten.tanh, aten.mul, aten.add, aten.where]
# Source node to ATen node mapping:
#   cell__5 => tanh_10
#   cell_b_2 => add_12
#   eq_2 => eq_2
#   hidden_b_8 => where_5
#   hidden_b__2 => mul_17
#   mul_15 => mul_15
#   mul_16 => mul_16
#   tanh_11 => tanh_11
# Graph fragment:
#   %eq_2 : [num_users=2] = call_function[target=torch.ops.aten.eq.Scalar](args = (%select_17, 0.0), kwargs = {})
#   %tanh_10 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%select_34,), kwargs = {})
#   %mul_15 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_31, %add_8), kwargs = {})
#   %mul_16 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_32, %tanh_10), kwargs = {})
#   %add_12 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_15, %mul_16), kwargs = {})
#   %tanh_11 : [num_users=1] = call_function[target=torch.ops.aten.tanh.default](args = (%add_12,), kwargs = {})
#   %mul_17 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_33, %tanh_11), kwargs = {})
#   %where_5 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%eq_2, %view_34, %mul_17), kwargs = {})
triton_poi_fused_add_eq_mul_tanh_where_12 = async_compile.triton('triton_poi_fused_add_eq_mul_tanh_where_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=[4, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp32', 9: '*fp32', 10: 'i32', 11: '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, 6, 7, 8, 9), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_eq_mul_tanh_where_12', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 9, '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_eq_mul_tanh_where_12(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, out_ptr1, out_ptr2, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (452 + x1 + (16*y0)), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (28 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + (4*x1)), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + (4*y0)), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + (4*y0)), xmask & ymask)
    tmp9 = tl.load(in_ptr3 + (16 + x1 + (4*y0)), xmask & ymask)
    tmp12 = tl.load(in_ptr5 + (1 + (4*y0)), ymask, eviction_policy='evict_last')
    tmp15 = tl.load(in_ptr6 + (x1 + (4*y0)), xmask & ymask)
    tmp16 = tl.load(in_ptr3 + (32 + x1 + (4*y0)), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp8 = tmp6 * tmp7
    tmp10 = tmp9 * tmp5
    tmp11 = tmp8 + tmp10
    tmp13 = 0.0
    tmp14 = tmp12 == tmp13
    tmp17 = libdevice.tanh(tmp11)
    tmp18 = tmp16 * tmp17
    tmp19 = tl.where(tmp14, tmp15, tmp18)
    tl.store(out_ptr0 + (x1 + (4*y0)), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + (4*y0)), tmp11, xmask & ymask)
    tl.store(out_ptr2 + (x1 + (4*y0)), tmp19, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/7i/c7ivqwhwvzp6wkjhgfgr3g6sfvvrbjh5i4vz4clc43uafja4m27s.py
# Topologically Sorted Source Nodes: [gates_6], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   gates_6 => sigmoid_6
# Graph fragment:
#   %sigmoid_6 : [num_users=4] = call_function[target=torch.ops.aten.sigmoid.default](args = (%slice_34,), kwargs = {})
triton_poi_fused_sigmoid_13 = async_compile.triton('triton_poi_fused_sigmoid_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=[16, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_13', '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_sigmoid_13(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = (yindex // 4)
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (12 + x2 + (16*y3)), xmask & ymask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2 + (4*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + (4*x2) + (16*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + (4*y3)), tmp5, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/4c/c4c7wkd6wz2zp3fulrfggm36urin2l7i56ztaquupqwae2s45g6p.py
# Topologically Sorted Source Nodes: [cell__6, mul_18, mul_19, cell_f_3, tanh_13], Original ATen: [aten.tanh, aten.mul, aten.add]
# Source node to ATen node mapping:
#   cell__6 => tanh_12
#   cell_f_3 => add_14
#   mul_18 => mul_18
#   mul_19 => mul_19
#   tanh_13 => tanh_13
# Graph fragment:
#   %tanh_12 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%select_40,), kwargs = {})
#   %mul_18 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_37, %add_10), kwargs = {})
#   %mul_19 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_38, %tanh_12), kwargs = {})
#   %add_14 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_18, %mul_19), kwargs = {})
#   %tanh_13 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%add_14,), kwargs = {})
triton_poi_fused_add_mul_tanh_14 = async_compile.triton('triton_poi_fused_add_mul_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=[4, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: '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, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_mul_tanh_14', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, '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_mul_tanh_14(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (204 + x1 + (16*y0)), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (12 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + (4*x1)), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + (4*y0)), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + (4*y0)), xmask & ymask)
    tmp9 = tl.load(in_ptr3 + (16 + x1 + (4*y0)), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp8 = tmp6 * tmp7
    tmp10 = tmp9 * tmp5
    tmp11 = tmp8 + tmp10
    tmp12 = libdevice.tanh(tmp11)
    tl.store(out_ptr0 + (x1 + (4*y0)), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + (4*y0)), tmp12, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/bq/cbqfvole2ysq4qdzvywtzzpljwuu2bzfbb2w26oskoiu7ue57mxx.py
# Topologically Sorted Source Nodes: [gates_7], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   gates_7 => sigmoid_7
# Graph fragment:
#   %sigmoid_7 : [num_users=4] = call_function[target=torch.ops.aten.sigmoid.default](args = (%slice_39,), kwargs = {})
triton_poi_fused_sigmoid_15 = async_compile.triton('triton_poi_fused_sigmoid_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=[16, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_15', '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_sigmoid_15(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = (yindex // 4)
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (256 + x2 + (16*y3)), xmask & ymask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (16 + x2 + (4*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + (4*x2) + (16*y1)), xmask & ymask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + (4*y3)), tmp5, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/7r/c7r4u7m3aiotucn5yrkylskm5pv5345z73edmfso7e6otlkqng5j.py
# Topologically Sorted Source Nodes: [cell__7, mul_21, mul_22, cell_b_3, tanh_15], Original ATen: [aten.tanh, aten.mul, aten.add]
# Source node to ATen node mapping:
#   cell__7 => tanh_14
#   cell_b_3 => add_16
#   mul_21 => mul_21
#   mul_22 => mul_22
#   tanh_15 => tanh_15
# Graph fragment:
#   %tanh_14 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%select_46,), kwargs = {})
#   %mul_21 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_43, %add_12), kwargs = {})
#   %mul_22 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%select_44, %tanh_14), kwargs = {})
#   %add_16 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_21, %mul_22), kwargs = {})
#   %tanh_15 : [num_users=2] = call_function[target=torch.ops.aten.tanh.default](args = (%add_16,), kwargs = {})
triton_poi_fused_add_mul_tanh_16 = async_compile.triton('triton_poi_fused_add_mul_tanh_16', '''
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, 4], tile_hint=TileHint.DEFAULT,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: '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, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_mul_tanh_16', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, '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_mul_tanh_16(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (448 + x1 + (16*y0)), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (28 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + (4*x1)), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + (4*y0)), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + (4*y0)), xmask & ymask)
    tmp9 = tl.load(in_ptr3 + (16 + x1 + (4*y0)), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp8 = tmp6 * tmp7
    tmp10 = tmp9 * tmp5
    tmp11 = tmp8 + tmp10
    tmp12 = libdevice.tanh(tmp11)
    tl.store(out_ptr0 + (x1 + (4*y0)), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + (4*y0)), tmp12, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/64/c64yikwy2latso2m5b7qux2wlhh6qn3r352nneytq24qjrfv5nac.py
# Topologically Sorted Source Nodes: [hidden_states_f], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   hidden_states_f => cat
# Graph fragment:
#   %cat : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%view_10, %view_20, %view_30, %view_40],), kwargs = {})
triton_poi_fused_cat_17 = async_compile.triton('triton_poi_fused_cat_17', '''
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: '*fp32', 6: '*fp32', 7: '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, 6, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_17', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 7, '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_17(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = (xindex // 16)
    x3 = xindex % 16
    x1 = (xindex // 4) % 4
    x4 = xindex
    tmp0 = x2
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 2, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x3), tmp9 & xmask, eviction_policy='evict_last', other=0.0)
    tmp11 = tmp0 >= tmp7
    tmp12 = tl.full([1], 3, tl.int64)
    tmp13 = tmp0 < tmp12
    tmp14 = tmp11 & tmp13
    tmp15 = tl.load(in_ptr2 + (x3), tmp14 & xmask, eviction_policy='evict_last', other=0.0)
    tmp16 = tmp0 >= tmp12
    tmp17 = tl.full([1], 4, tl.int64)
    tmp18 = tmp0 < tmp17
    tmp19 = tl.load(in_ptr3 + (3 + (4*x1)), tmp16 & xmask, eviction_policy='evict_last', other=0.0)
    tmp20 = 0.0
    tmp21 = tmp19 == tmp20
    tmp22 = tl.load(in_ptr2 + (x3), tmp16 & xmask, eviction_policy='evict_last', other=0.0)
    tmp23 = tl.load(in_ptr4 + (32 + x3), tmp16 & xmask, eviction_policy='evict_last', other=0.0)
    tmp24 = tl.load(in_ptr5 + (x3), tmp16 & xmask, eviction_policy='evict_last', other=0.0)
    tmp25 = tmp23 * tmp24
    tmp26 = tl.where(tmp21, tmp22, tmp25)
    tmp27 = tl.full(tmp26.shape, 0.0, tmp26.dtype)
    tmp28 = tl.where(tmp16, tmp26, tmp27)
    tmp29 = tl.where(tmp14, tmp15, tmp28)
    tmp30 = tl.where(tmp9, tmp10, tmp29)
    tmp31 = tl.where(tmp4, tmp5, tmp30)
    tl.store(out_ptr0 + (x4), tmp31, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/p5/cp5qmaogify3dqrnqntwmg5pzec3q2hdfbe3ctxcixemfoejk5xv.py
# Topologically Sorted Source Nodes: [hidden_states_b], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   hidden_states_b => cat_1
# Graph fragment:
#   %cat_1 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%view_45, %view_35, %view_25, %view_15],), kwargs = {})
triton_poi_fused_cat_18 = async_compile.triton('triton_poi_fused_cat_18', '''
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: '*fp32', 6: '*fp32', 7: '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, 6, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_18', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 7, '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_18(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = (xindex // 16)
    x1 = (xindex // 4) % 4
    x3 = xindex % 16
    x4 = xindex
    tmp0 = x2
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (4*x1), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = 0.0
    tmp7 = tmp5 == tmp6
    tmp8 = tl.load(in_ptr1 + (x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp9 = tl.load(in_ptr2 + (32 + x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp10 = tl.load(in_ptr3 + (x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp11 = tmp9 * tmp10
    tmp12 = tl.where(tmp7, tmp8, tmp11)
    tmp13 = tl.full(tmp12.shape, 0.0, tmp12.dtype)
    tmp14 = tl.where(tmp4, tmp12, tmp13)
    tmp15 = tmp0 >= tmp3
    tmp16 = tl.full([1], 2, tl.int64)
    tmp17 = tmp0 < tmp16
    tmp18 = tmp15 & tmp17
    tmp19 = tl.load(in_ptr1 + (x3), tmp18 & xmask, eviction_policy='evict_last', other=0.0)
    tmp20 = tmp0 >= tmp16
    tmp21 = tl.full([1], 3, tl.int64)
    tmp22 = tmp0 < tmp21
    tmp23 = tmp20 & tmp22
    tmp24 = tl.load(in_ptr4 + (x3), tmp23 & xmask, eviction_policy='evict_last', other=0.0)
    tmp25 = tmp0 >= tmp21
    tmp26 = tl.full([1], 4, tl.int64)
    tmp27 = tmp0 < tmp26
    tmp28 = tl.load(in_ptr5 + (x3), tmp25 & xmask, eviction_policy='evict_last', other=0.0)
    tmp29 = tl.where(tmp23, tmp24, tmp28)
    tmp30 = tl.where(tmp18, tmp19, tmp29)
    tmp31 = tl.where(tmp4, tmp14, tmp30)
    tl.store(out_ptr0 + (x4), tmp31, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/wz/cwzmjlei6ri7xikhyfkqfvjnlkqbkj6muv5ihes2pvkphx62eb4o.py
# Topologically Sorted Source Nodes: [cat_2, hidden_states], Original ATen: [aten.cat, aten.mul]
# Source node to ATen node mapping:
#   cat_2 => cat_2
#   hidden_states => mul_24
# Graph fragment:
#   %cat_2 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%permute_24, %permute_25], -1), kwargs = {})
#   %mul_24 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%cat_2, %primals_2), kwargs = {})
triton_poi_fused_cat_mul_19 = async_compile.triton('triton_poi_fused_cat_mul_19', '''
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: '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_cat_mul_19', '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_cat_mul_19(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 8
    x1 = (xindex // 8) % 4
    x2 = (xindex // 32)
    x3 = (xindex // 8)
    x4 = xindex
    tmp11 = tl.load(in_ptr2 + (x3), xmask, eviction_policy='evict_last')
    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*x2) + (16*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 + ((4*x2) + (16*x1) + ((-4) + x0)), tmp6 & xmask, eviction_policy='evict_last', other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tmp12 = tmp10 * tmp11
    tl.store(out_ptr0 + (x4), tmp12, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/lp/clpa4szqezldbpyk23alqc3bcorbjzy37bykf2funritwlrsnonx.py
# Topologically Sorted Source Nodes: [final_state], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   final_state => cat_3
# Graph fragment:
#   %cat_3 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%select_48, %select_49], -1), kwargs = {})
triton_poi_fused_cat_20 = async_compile.triton('triton_poi_fused_cat_20', '''
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: '*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_20', '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_20(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 + (48 + (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 + ((4*x1) + ((-4) + x0)), tmp6 & xmask, eviction_policy='evict_last', other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tl.store(out_ptr0 + (x2), tmp10, 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 = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4), (16, 4, 1))
    assert_size_stride(primals_2, (4, 4, 1), (4, 1, 1))
    assert_size_stride(primals_3, (1, 4), (4, 1))
    assert_size_stride(primals_4, (1, 4), (4, 1))
    assert_size_stride(primals_5, (1, 4), (4, 1))
    assert_size_stride(primals_6, (1, 4), (4, 1))
    assert_size_stride(primals_7, (8, 4, 4), (16, 4, 1))
    assert_size_stride(primals_8, (8, 4, 4), (16, 4, 1))
    assert_size_stride(primals_9, (8, 1, 4), (4, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((8, 16, 4), (64, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [matmul], Original ATen: [aten.bmm]
        extern_kernels.bmm(reinterpret_tensor(primals_1, (8, 16, 4), (0, 4, 1), 0), primals_7, out=buf0)
        del primals_7
        buf1 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [hf], Original ATen: [aten.clone]
        stream0 = get_raw_stream(0)
        triton_poi_fused_clone_0.run(primals_8, buf1, 16, 4, grid=grid(16, 4), stream=stream0)
        buf2 = empty_strided_cuda((16, 1), (1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [hf], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(buf1, (16, 4), (4, 1), 0), reinterpret_tensor(primals_3, (4, 1), (1, 4), 0), out=buf2)
        buf3 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [gates], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_1.run(buf0, primals_9, buf2, buf3, 48, grid=grid(48), stream=stream0)
        buf4 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf5 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cell_, mul, mul_1, cell_f, tanh_1, hidden_f_, eq, hidden_f_2], Original ATen: [aten.tanh, aten.mul, aten.add, aten.eq, aten.where]
        triton_poi_fused_add_eq_mul_tanh_where_2.run(buf0, primals_9, buf2, primals_2, primals_3, buf3, primals_5, buf4, buf5, 16, grid=grid(16), stream=stream0)
        buf6 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [hb], Original ATen: [aten.clone]
        triton_poi_fused_clone_3.run(primals_8, buf6, 16, 4, grid=grid(16, 4), stream=stream0)
        del primals_8
        buf7 = buf2; del buf2  # reuse
        # Topologically Sorted Source Nodes: [hb], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(buf6, (16, 4), (4, 1), 0), reinterpret_tensor(primals_4, (4, 1), (1, 4), 0), out=buf7)
        buf8 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [gates_1], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_4.run(buf0, primals_9, buf7, buf8, 48, grid=grid(48), stream=stream0)
        buf9 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf10 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cell__1, mul_3, mul_4, cell_b, tanh_3, hidden_b_, eq_1, hidden_b_2], Original ATen: [aten.tanh, aten.mul, aten.add, aten.eq, aten.where]
        triton_poi_fused_add_eq_mul_tanh_where_5.run(buf0, primals_9, buf7, primals_2, primals_4, buf8, primals_6, buf9, buf10, 16, grid=grid(16), stream=stream0)
        buf11 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [hf_1], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(buf1, (16, 4), (4, 1), 0), reinterpret_tensor(buf5, (4, 4), (1, 4), 0), out=buf11)
        buf12 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [gates_2], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_6.run(buf0, primals_9, buf11, buf12, 12, 4, grid=grid(12, 4), stream=stream0)
        buf13 = reinterpret_tensor(buf7, (4, 4), (4, 1), 0); del buf7  # reuse
        buf14 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf19 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [mul, mul_1, cell_f, cell__2, mul_6, mul_7, cell_f_1, tanh_5, hidden_f__1, eq_2, hidden_f_5], Original ATen: [aten.mul, aten.add, aten.tanh, aten.eq, aten.where]
        triton_poi_fused_add_eq_mul_tanh_where_7.run(buf0, primals_9, buf11, buf12, buf3, primals_5, buf4, primals_2, buf5, buf13, buf14, buf19, 4, 4, grid=grid(4, 4), stream=stream0)
        buf15 = buf11; del buf11  # reuse
        # Topologically Sorted Source Nodes: [hb_1], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(buf6, (16, 4), (4, 1), 0), reinterpret_tensor(buf10, (4, 4), (1, 4), 0), out=buf15)
        buf16 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [gates_3], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_8.run(buf0, primals_9, buf15, buf16, 12, 4, grid=grid(12, 4), stream=stream0)
        buf20 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [hf_2], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(buf1, (16, 4), (4, 1), 0), reinterpret_tensor(buf19, (4, 4), (1, 4), 0), out=buf20)
        buf21 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [gates_4], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_9.run(buf0, primals_9, buf20, buf21, 12, 4, grid=grid(12, 4), stream=stream0)
        buf17 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf18 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf24 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf22 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf23 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf29 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [mul_3, mul_4, cell_b, cell__3, mul_9, mul_10, cell_b_1, tanh_7, hidden_b__1, eq_3, hidden_b_5, cell__4, mul_12, mul_13, cell_f_2, tanh_9, hidden_f__2, hidden_f_8], Original ATen: [aten.mul, aten.add, aten.tanh, aten.eq, aten.where]
        triton_poi_fused_add_eq_mul_tanh_where_10.run(buf0, primals_9, buf15, buf16, buf8, primals_6, buf9, primals_2, buf10, buf20, buf21, buf14, buf19, buf17, buf18, buf24, buf22, buf23, buf29, 4, 4, grid=grid(4, 4), stream=stream0)
        buf25 = buf20; del buf20  # reuse
        # Topologically Sorted Source Nodes: [hb_2], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(buf6, (16, 4), (4, 1), 0), reinterpret_tensor(buf24, (4, 4), (1, 4), 0), out=buf25)
        buf26 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [gates_5], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_11.run(buf0, primals_9, buf25, buf26, 12, 4, grid=grid(12, 4), stream=stream0)
        buf27 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf28 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf34 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [eq_2, cell__5, mul_15, mul_16, cell_b_2, tanh_11, hidden_b__2, hidden_b_8], Original ATen: [aten.eq, aten.tanh, aten.mul, aten.add, aten.where]
        triton_poi_fused_add_eq_mul_tanh_where_12.run(buf0, primals_9, buf25, buf26, buf18, primals_2, buf24, buf27, buf28, buf34, 4, 4, grid=grid(4, 4), stream=stream0)
        buf30 = buf25; del buf25  # reuse
        # Topologically Sorted Source Nodes: [hf_3], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(buf1, (16, 4), (4, 1), 0), reinterpret_tensor(buf29, (4, 4), (1, 4), 0), out=buf30)
        buf31 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [gates_6], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_13.run(buf0, primals_9, buf30, buf31, 12, 4, grid=grid(12, 4), stream=stream0)
        buf32 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf33 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cell__6, mul_18, mul_19, cell_f_3, tanh_13], Original ATen: [aten.tanh, aten.mul, aten.add]
        triton_poi_fused_add_mul_tanh_14.run(buf0, primals_9, buf30, buf31, buf23, buf32, buf33, 4, 4, grid=grid(4, 4), stream=stream0)
        buf35 = buf30; del buf30  # reuse
        # Topologically Sorted Source Nodes: [hb_3], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(buf6, (16, 4), (4, 1), 0), reinterpret_tensor(buf34, (4, 4), (1, 4), 0), out=buf35)
        buf36 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [gates_7], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_15.run(buf0, primals_9, buf35, buf36, 12, 4, grid=grid(12, 4), stream=stream0)
        buf37 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf38 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cell__7, mul_21, mul_22, cell_b_3, tanh_15], Original ATen: [aten.tanh, aten.mul, aten.add]
        triton_poi_fused_add_mul_tanh_16.run(buf0, primals_9, buf35, buf36, buf28, buf37, buf38, 4, 4, grid=grid(4, 4), stream=stream0)
        del buf0
        del primals_9
        buf39 = reinterpret_tensor(buf35, (4, 4, 4), (16, 4, 1), 0); del buf35  # reuse
        # Topologically Sorted Source Nodes: [hidden_states_f], Original ATen: [aten.cat]
        triton_poi_fused_cat_17.run(buf5, buf19, buf29, primals_2, buf31, buf33, buf39, 64, grid=grid(64), stream=stream0)
        buf40 = reinterpret_tensor(buf15, (4, 4, 4), (16, 4, 1), 0); del buf15  # reuse
        # Topologically Sorted Source Nodes: [hidden_states_b], Original ATen: [aten.cat]
        triton_poi_fused_cat_18.run(primals_2, buf34, buf36, buf38, buf24, buf10, buf40, 64, grid=grid(64), stream=stream0)
        buf41 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_2, hidden_states], Original ATen: [aten.cat, aten.mul]
        triton_poi_fused_cat_mul_19.run(buf39, buf40, primals_2, buf41, 128, grid=grid(128), stream=stream0)
        buf42 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [final_state], Original ATen: [aten.cat]
        triton_poi_fused_cat_20.run(buf39, buf40, buf42, 32, grid=grid(32), stream=stream0)
        del buf39
        del buf40
    return (buf41, buf42, primals_1, primals_2, primals_5, primals_6, reinterpret_tensor(buf1, (16, 4), (4, 1), 0), buf3, buf4, reinterpret_tensor(buf6, (16, 4), (4, 1), 0), buf8, buf9, buf12, buf13, buf14, buf16, buf17, buf18, buf21, buf22, buf23, buf26, buf27, buf28, buf31, buf32, buf33, buf36, buf37, buf38, buf34, buf29, buf24, buf19, buf10, buf5, primals_4, 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, 1), (4, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((1, 4), (4, 1), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((1, 4), (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((1, 4), (4, 1), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((8, 4, 4), (16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((8, 4, 4), (16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((8, 1, 4), (4, 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])
    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
import torch as T
import torch.nn as nn


class BiLSTM_Encoder(nn.Module):

    def __init__(self, D: 'int', hidden_size: 'int', dropout: 'float'):
        super(BiLSTM_Encoder, self).__init__()
        self.D = D
        self.hidden_size = hidden_size
        self.initial_hidden_f = nn.Parameter(T.randn(1, hidden_size))
        self.initial_hidden_b = nn.Parameter(T.randn(1, hidden_size))
        self.initial_cell_f = nn.Parameter(T.randn(1, hidden_size))
        self.initial_cell_b = nn.Parameter(T.randn(1, hidden_size))
        self.dropout = nn.Dropout(dropout)
        self.weight_ih = nn.Parameter(T.randn(8, D, hidden_size))
        self.weight_hh = nn.Parameter(T.randn(8, hidden_size, hidden_size))
        self.bias = nn.Parameter(T.zeros(8, 1, hidden_size))
        self.init_weights()

    def init_weights(self):
        for name, param in self.named_parameters():
            if 'bias' in name.lower():
                nn.init.zeros_(param.data)
            elif 'hidden_state' or 'cell' in name.lower():
                nn.init.zeros_(param.data)
            else:
                nn.init.xavier_uniform_(param.data)

    def forward(self, x, mask):
        N, S, D = x.size()
        mask = mask.view(N, S, 1)
        hidden_f = self.initial_hidden_f
        hidden_b = self.initial_hidden_b
        cell_f = self.initial_cell_f
        cell_b = self.initial_cell_b
        hidden_states_f = []
        hidden_states_b = []
        self.dropout(self.weight_ih)
        weight_hh = self.dropout(self.weight_hh)
        x = x.view(1, N * S, D)
        x_h = T.matmul(x, self.weight_ih) + self.bias
        x_h = x_h.view(8, N, S, self.hidden_size)
        for t in range(S):
            hidden_f = hidden_f.view(1, -1, self.hidden_size)
            xf = x_h[0:4, :, t]
            hf = T.matmul(hidden_f, weight_hh[0:4])
            preacts = xf + hf
            gates = T.sigmoid(preacts[0:3])
            f = gates[0]
            i = gates[1]
            o = gates[2]
            cell_ = T.tanh(preacts[3])
            cell_f = f * cell_f + i * cell_
            hidden_f_ = o * T.tanh(cell_f)
            hidden_f = hidden_f.view(-1, self.hidden_size)
            hidden_f = T.where(mask[:, t] == 0.0, hidden_f, hidden_f_)
            hidden_states_f.append(hidden_f.view(1, N, self.hidden_size))
            hidden_b = hidden_b.view(1, -1, self.hidden_size)
            xb = x_h[4:, :, S - t - 1]
            hb = T.matmul(hidden_b, weight_hh[4:])
            preacts = xb + hb
            gates = T.sigmoid(preacts[0:3])
            f = gates[0]
            i = gates[1]
            o = gates[2]
            cell_ = T.tanh(preacts[3])
            cell_b = f * cell_b + i * cell_
            hidden_b_ = o * T.tanh(cell_b)
            hidden_b = hidden_b.view(-1, self.hidden_size)
            hidden_b = T.where(mask[:, S - t - 1] == 0.0, hidden_b, hidden_b_)
            hidden_states_b.append(hidden_b.view(1, N, self.hidden_size))
        hidden_states_f = T.cat(hidden_states_f, dim=0)
        hidden_states_f = T.transpose(hidden_states_f, 0, 1)
        hidden_states_b.reverse()
        hidden_states_b = T.cat(hidden_states_b, dim=0)
        hidden_states_b = T.transpose(hidden_states_b, 0, 1)
        hidden_states = T.cat([hidden_states_f, hidden_states_b], dim=-1
            ) * mask
        final_state = T.cat([hidden_states_f[:, -1, :], hidden_states_b[:, 
            0, :]], dim=-1)
        return hidden_states, final_state


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


def get_init_inputs():
    return [[], {'D': 4, 'hidden_size': 4, 'dropout': 0.5}]

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.triton_helpers import libdevice
import torch as T
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_poi_fused_clone_0(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 16
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 4
    y1 = yindex // 4
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 4 * x2 + 16 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


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


@triton.jit
def triton_poi_fused_add_eq_mul_tanh_where_2(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, out_ptr1, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = xindex // 4
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (192 + x0 + 16 * x1), xmask)
    tmp1 = tl.load(in_ptr1 + (12 + x0), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (12 + x0), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr3 + 4 * x1, xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr4 + x0, xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr5 + (32 + x2), xmask)
    tmp11 = tl.load(in_ptr5 + x2, xmask)
    tmp12 = tl.load(in_ptr6 + x0, xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr5 + (16 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp7 = 0.0
    tmp8 = tmp6 == tmp7
    tmp13 = tmp11 * tmp12
    tmp15 = tmp14 * tmp5
    tmp16 = tmp13 + tmp15
    tmp17 = libdevice.tanh(tmp16)
    tmp18 = tmp10 * tmp17
    tmp19 = tl.where(tmp8, tmp9, tmp18)
    tl.store(out_ptr0 + x2, tmp5, xmask)
    tl.store(out_ptr1 + x2, tmp19, xmask)


@triton.jit
def triton_poi_fused_clone_3(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 16
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 4
    y1 = yindex // 4
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (64 + y0 + 4 * x2 + 16 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


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


@triton.jit
def triton_poi_fused_add_eq_mul_tanh_where_5(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, out_ptr1, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = xindex // 4
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (460 + x0 + 16 * x1), xmask)
    tmp1 = tl.load(in_ptr1 + (28 + x0), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (12 + x0), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr3 + (3 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr4 + x0, xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr5 + (32 + x2), xmask)
    tmp11 = tl.load(in_ptr5 + x2, xmask)
    tmp12 = tl.load(in_ptr6 + x0, xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr5 + (16 + x2), xmask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp7 = 0.0
    tmp8 = tmp6 == tmp7
    tmp13 = tmp11 * tmp12
    tmp15 = tmp14 * tmp5
    tmp16 = tmp13 + tmp15
    tmp17 = libdevice.tanh(tmp16)
    tmp18 = tmp10 * tmp17
    tmp19 = tl.where(tmp8, tmp9, tmp18)
    tl.store(out_ptr0 + x2, tmp5, xmask)
    tl.store(out_ptr1 + x2, tmp19, xmask)


@triton.jit
def triton_poi_fused_sigmoid_6(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel,
    xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = yindex // 4
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (4 + x2 + 16 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2 + 4 * y1), xmask & ymask, eviction_policy=
        'evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + 4 * x2 + 16 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp5, xmask & ymask)


@triton.jit
def triton_poi_fused_add_eq_mul_tanh_where_7(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8, out_ptr0,
    out_ptr1, out_ptr2, ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.
    constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (196 + x1 + 16 * y0), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (12 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + 4 * x1), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + 4 * y0), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + 4 * y0), xmask & ymask)
    tmp8 = tl.load(in_ptr5 + x1, xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr4 + (16 + x1 + 4 * y0), xmask & ymask)
    tmp11 = tl.load(in_ptr6 + (x1 + 4 * y0), xmask & ymask)
    tmp15 = tl.load(in_ptr3 + (16 + x1 + 4 * y0), xmask & ymask)
    tmp18 = tl.load(in_ptr7 + (1 + 4 * y0), ymask, eviction_policy='evict_last'
        )
    tmp21 = tl.load(in_ptr8 + (x1 + 4 * y0), xmask & ymask)
    tmp22 = tl.load(in_ptr3 + (32 + x1 + 4 * y0), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp9 = tmp7 * tmp8
    tmp12 = tmp10 * tmp11
    tmp13 = tmp9 + tmp12
    tmp14 = tmp6 * tmp13
    tmp16 = tmp15 * tmp5
    tmp17 = tmp14 + tmp16
    tmp19 = 0.0
    tmp20 = tmp18 == tmp19
    tmp23 = libdevice.tanh(tmp17)
    tmp24 = tmp22 * tmp23
    tmp25 = tl.where(tmp20, tmp21, tmp24)
    tl.store(out_ptr0 + (x1 + 4 * y0), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + 4 * y0), tmp17, xmask & ymask)
    tl.store(out_ptr2 + (x1 + 4 * y0), tmp25, xmask & ymask)


@triton.jit
def triton_poi_fused_sigmoid_8(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel,
    xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = yindex // 4
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (264 + x2 + 16 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (16 + x2 + 4 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + 4 * x2 + 16 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp5, xmask & ymask)


@triton.jit
def triton_poi_fused_sigmoid_9(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel,
    xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = yindex // 4
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (8 + x2 + 16 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2 + 4 * y1), xmask & ymask, eviction_policy=
        'evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + 4 * x2 + 16 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp5, xmask & ymask)


@triton.jit
def triton_poi_fused_add_eq_mul_tanh_where_10(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8, in_ptr9, in_ptr10,
    in_ptr11, in_ptr12, out_ptr0, out_ptr1, out_ptr2, out_ptr3, out_ptr4,
    out_ptr5, ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (456 + x1 + 16 * y0), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (28 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + 4 * x1), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + 4 * y0), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + 4 * y0), xmask & ymask)
    tmp8 = tl.load(in_ptr5 + x1, xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr4 + (16 + x1 + 4 * y0), xmask & ymask)
    tmp11 = tl.load(in_ptr6 + (x1 + 4 * y0), xmask & ymask)
    tmp15 = tl.load(in_ptr3 + (16 + x1 + 4 * y0), xmask & ymask)
    tmp18 = tl.load(in_ptr7 + (2 + 4 * y0), ymask, eviction_policy='evict_last'
        )
    tmp21 = tl.load(in_ptr8 + (x1 + 4 * y0), xmask & ymask)
    tmp22 = tl.load(in_ptr3 + (32 + x1 + 4 * y0), xmask & ymask)
    tmp26 = tl.load(in_ptr0 + (200 + x1 + 16 * y0), xmask & ymask)
    tmp27 = tl.load(in_ptr1 + (12 + x1), xmask, eviction_policy='evict_last')
    tmp29 = tl.load(in_ptr9 + (48 + y0 + 4 * x1), xmask & ymask)
    tmp32 = tl.load(in_ptr10 + (x1 + 4 * y0), xmask & ymask)
    tmp33 = tl.load(in_ptr11 + (x1 + 4 * y0), xmask & ymask)
    tmp35 = tl.load(in_ptr10 + (16 + x1 + 4 * y0), xmask & ymask)
    tmp38 = tl.load(in_ptr12 + (x1 + 4 * y0), xmask & ymask)
    tmp39 = tl.load(in_ptr10 + (32 + x1 + 4 * y0), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp9 = tmp7 * tmp8
    tmp12 = tmp10 * tmp11
    tmp13 = tmp9 + tmp12
    tmp14 = tmp6 * tmp13
    tmp16 = tmp15 * tmp5
    tmp17 = tmp14 + tmp16
    tmp19 = 0.0
    tmp20 = tmp18 == tmp19
    tmp23 = libdevice.tanh(tmp17)
    tmp24 = tmp22 * tmp23
    tmp25 = tl.where(tmp20, tmp21, tmp24)
    tmp28 = tmp26 + tmp27
    tmp30 = tmp28 + tmp29
    tmp31 = libdevice.tanh(tmp30)
    tmp34 = tmp32 * tmp33
    tmp36 = tmp35 * tmp31
    tmp37 = tmp34 + tmp36
    tmp40 = libdevice.tanh(tmp37)
    tmp41 = tmp39 * tmp40
    tmp42 = tl.where(tmp20, tmp38, tmp41)
    tl.store(out_ptr0 + (x1 + 4 * y0), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + 4 * y0), tmp17, xmask & ymask)
    tl.store(out_ptr2 + (x1 + 4 * y0), tmp25, xmask & ymask)
    tl.store(out_ptr3 + (x1 + 4 * y0), tmp31, xmask & ymask)
    tl.store(out_ptr4 + (x1 + 4 * y0), tmp37, xmask & ymask)
    tl.store(out_ptr5 + (x1 + 4 * y0), tmp42, xmask & ymask)


@triton.jit
def triton_poi_fused_sigmoid_11(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel,
    xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = yindex // 4
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (260 + x2 + 16 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (16 + x2 + 4 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + 4 * x2 + 16 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp5, xmask & ymask)


@triton.jit
def triton_poi_fused_add_eq_mul_tanh_where_12(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, out_ptr1, out_ptr2,
    ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (452 + x1 + 16 * y0), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (28 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + 4 * x1), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + 4 * y0), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + 4 * y0), xmask & ymask)
    tmp9 = tl.load(in_ptr3 + (16 + x1 + 4 * y0), xmask & ymask)
    tmp12 = tl.load(in_ptr5 + (1 + 4 * y0), ymask, eviction_policy='evict_last'
        )
    tmp15 = tl.load(in_ptr6 + (x1 + 4 * y0), xmask & ymask)
    tmp16 = tl.load(in_ptr3 + (32 + x1 + 4 * y0), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp8 = tmp6 * tmp7
    tmp10 = tmp9 * tmp5
    tmp11 = tmp8 + tmp10
    tmp13 = 0.0
    tmp14 = tmp12 == tmp13
    tmp17 = libdevice.tanh(tmp11)
    tmp18 = tmp16 * tmp17
    tmp19 = tl.where(tmp14, tmp15, tmp18)
    tl.store(out_ptr0 + (x1 + 4 * y0), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + 4 * y0), tmp11, xmask & ymask)
    tl.store(out_ptr2 + (x1 + 4 * y0), tmp19, xmask & ymask)


@triton.jit
def triton_poi_fused_sigmoid_13(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel,
    xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = yindex // 4
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (12 + x2 + 16 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2 + 4 * y1), xmask & ymask, eviction_policy=
        'evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + 4 * x2 + 16 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp5, xmask & ymask)


@triton.jit
def triton_poi_fused_add_mul_tanh_14(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK: tl.constexpr,
    XBLOCK: tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (204 + x1 + 16 * y0), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (12 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + 4 * x1), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + 4 * y0), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + 4 * y0), xmask & ymask)
    tmp9 = tl.load(in_ptr3 + (16 + x1 + 4 * y0), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp8 = tmp6 * tmp7
    tmp10 = tmp9 * tmp5
    tmp11 = tmp8 + tmp10
    tmp12 = libdevice.tanh(tmp11)
    tl.store(out_ptr0 + (x1 + 4 * y0), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + 4 * y0), tmp12, xmask & ymask)


@triton.jit
def triton_poi_fused_sigmoid_15(in_ptr0, in_ptr1, in_ptr2, out_ptr0, ynumel,
    xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 12
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y1 = yindex // 4
    y0 = yindex % 4
    tmp0 = tl.load(in_ptr0 + (256 + x2 + 16 * y3), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (16 + x2 + 4 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (y0 + 4 * x2 + 16 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = tl.sigmoid(tmp4)
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp5, xmask & ymask)


@triton.jit
def triton_poi_fused_add_mul_tanh_16(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK: tl.constexpr,
    XBLOCK: tl.constexpr):
    ynumel = 4
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x1 = xindex
    y0 = yindex
    tmp0 = tl.load(in_ptr0 + (448 + x1 + 16 * y0), xmask & ymask)
    tmp1 = tl.load(in_ptr1 + (28 + x1), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (48 + y0 + 4 * x1), xmask & ymask)
    tmp6 = tl.load(in_ptr3 + (x1 + 4 * y0), xmask & ymask)
    tmp7 = tl.load(in_ptr4 + (x1 + 4 * y0), xmask & ymask)
    tmp9 = tl.load(in_ptr3 + (16 + x1 + 4 * y0), xmask & ymask)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = libdevice.tanh(tmp4)
    tmp8 = tmp6 * tmp7
    tmp10 = tmp9 * tmp5
    tmp11 = tmp8 + tmp10
    tmp12 = libdevice.tanh(tmp11)
    tl.store(out_ptr0 + (x1 + 4 * y0), tmp5, xmask & ymask)
    tl.store(out_ptr1 + (x1 + 4 * y0), tmp12, xmask & ymask)


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


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


@triton.jit
def triton_poi_fused_cat_mul_19(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 8
    x1 = xindex // 8 % 4
    x2 = xindex // 32
    x3 = xindex // 8
    x4 = xindex
    tmp11 = tl.load(in_ptr2 + x3, xmask, eviction_policy='evict_last')
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (4 * x2 + 16 * x1 + x0), tmp4 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 8, tl.int64)
    tmp9 = tl.load(in_ptr1 + (4 * x2 + 16 * x1 + (-4 + x0)), tmp6 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tmp12 = tmp10 * tmp11
    tl.store(out_ptr0 + x4, tmp12, xmask)


@triton.jit
def triton_poi_fused_cat_20(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 + (48 + 4 * x1 + x0), tmp4 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 8, tl.int64)
    tmp9 = tl.load(in_ptr1 + (4 * x1 + (-4 + x0)), tmp6 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tl.store(out_ptr0 + x2, tmp10, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9) = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4), (16, 4, 1))
    assert_size_stride(primals_2, (4, 4, 1), (4, 1, 1))
    assert_size_stride(primals_3, (1, 4), (4, 1))
    assert_size_stride(primals_4, (1, 4), (4, 1))
    assert_size_stride(primals_5, (1, 4), (4, 1))
    assert_size_stride(primals_6, (1, 4), (4, 1))
    assert_size_stride(primals_7, (8, 4, 4), (16, 4, 1))
    assert_size_stride(primals_8, (8, 4, 4), (16, 4, 1))
    assert_size_stride(primals_9, (8, 1, 4), (4, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((8, 16, 4), (64, 4, 1), torch.float32)
        extern_kernels.bmm(reinterpret_tensor(primals_1, (8, 16, 4), (0, 4,
            1), 0), primals_7, out=buf0)
        del primals_7
        buf1 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_clone_0[grid(16, 4)](primals_8, buf1, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf2 = empty_strided_cuda((16, 1), (1, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf1, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_3, (4, 1), (1, 4), 0), out=buf2)
        buf3 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_sigmoid_1[grid(48)](buf0, primals_9, buf2, buf3, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf4 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf5 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        triton_poi_fused_add_eq_mul_tanh_where_2[grid(16)](buf0, primals_9,
            buf2, primals_2, primals_3, buf3, primals_5, buf4, buf5, 16,
            XBLOCK=16, num_warps=1, num_stages=1)
        buf6 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_clone_3[grid(16, 4)](primals_8, buf6, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        del primals_8
        buf7 = buf2
        del buf2
        extern_kernels.mm(reinterpret_tensor(buf6, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_4, (4, 1), (1, 4), 0), out=buf7)
        buf8 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_sigmoid_4[grid(48)](buf0, primals_9, buf7, buf8, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf9 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf10 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        triton_poi_fused_add_eq_mul_tanh_where_5[grid(16)](buf0, primals_9,
            buf7, primals_2, primals_4, buf8, primals_6, buf9, buf10, 16,
            XBLOCK=16, num_warps=1, num_stages=1)
        buf11 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf1, (16, 4), (4, 1), 0),
            reinterpret_tensor(buf5, (4, 4), (1, 4), 0), out=buf11)
        buf12 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_sigmoid_6[grid(12, 4)](buf0, primals_9, buf11,
            buf12, 12, 4, XBLOCK=4, YBLOCK=8, num_warps=1, num_stages=1)
        buf13 = reinterpret_tensor(buf7, (4, 4), (4, 1), 0)
        del buf7
        buf14 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf19 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        triton_poi_fused_add_eq_mul_tanh_where_7[grid(4, 4)](buf0,
            primals_9, buf11, buf12, buf3, primals_5, buf4, primals_2, buf5,
            buf13, buf14, buf19, 4, 4, XBLOCK=4, YBLOCK=4, num_warps=1,
            num_stages=1)
        buf15 = buf11
        del buf11
        extern_kernels.mm(reinterpret_tensor(buf6, (16, 4), (4, 1), 0),
            reinterpret_tensor(buf10, (4, 4), (1, 4), 0), out=buf15)
        buf16 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_sigmoid_8[grid(12, 4)](buf0, primals_9, buf15,
            buf16, 12, 4, XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf20 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf1, (16, 4), (4, 1), 0),
            reinterpret_tensor(buf19, (4, 4), (1, 4), 0), out=buf20)
        buf21 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_sigmoid_9[grid(12, 4)](buf0, primals_9, buf20,
            buf21, 12, 4, XBLOCK=4, YBLOCK=8, num_warps=1, num_stages=1)
        buf17 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf18 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf24 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf22 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf23 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf29 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        triton_poi_fused_add_eq_mul_tanh_where_10[grid(4, 4)](buf0,
            primals_9, buf15, buf16, buf8, primals_6, buf9, primals_2,
            buf10, buf20, buf21, buf14, buf19, buf17, buf18, buf24, buf22,
            buf23, buf29, 4, 4, XBLOCK=4, YBLOCK=4, num_warps=1, num_stages=1)
        buf25 = buf20
        del buf20
        extern_kernels.mm(reinterpret_tensor(buf6, (16, 4), (4, 1), 0),
            reinterpret_tensor(buf24, (4, 4), (1, 4), 0), out=buf25)
        buf26 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_sigmoid_11[grid(12, 4)](buf0, primals_9, buf25,
            buf26, 12, 4, XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf27 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf28 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf34 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        triton_poi_fused_add_eq_mul_tanh_where_12[grid(4, 4)](buf0,
            primals_9, buf25, buf26, buf18, primals_2, buf24, buf27, buf28,
            buf34, 4, 4, XBLOCK=4, YBLOCK=4, num_warps=1, num_stages=1)
        buf30 = buf25
        del buf25
        extern_kernels.mm(reinterpret_tensor(buf1, (16, 4), (4, 1), 0),
            reinterpret_tensor(buf29, (4, 4), (1, 4), 0), out=buf30)
        buf31 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_sigmoid_13[grid(12, 4)](buf0, primals_9, buf30,
            buf31, 12, 4, XBLOCK=4, YBLOCK=8, num_warps=1, num_stages=1)
        buf32 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf33 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        triton_poi_fused_add_mul_tanh_14[grid(4, 4)](buf0, primals_9, buf30,
            buf31, buf23, buf32, buf33, 4, 4, XBLOCK=4, YBLOCK=4, num_warps
            =1, num_stages=1)
        buf35 = buf30
        del buf30
        extern_kernels.mm(reinterpret_tensor(buf6, (16, 4), (4, 1), 0),
            reinterpret_tensor(buf34, (4, 4), (1, 4), 0), out=buf35)
        buf36 = empty_strided_cuda((3, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_sigmoid_15[grid(12, 4)](buf0, primals_9, buf35,
            buf36, 12, 4, XBLOCK=4, YBLOCK=8, num_warps=1, num_stages=1)
        buf37 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        buf38 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        triton_poi_fused_add_mul_tanh_16[grid(4, 4)](buf0, primals_9, buf35,
            buf36, buf28, buf37, buf38, 4, 4, XBLOCK=4, YBLOCK=4, num_warps
            =1, num_stages=1)
        del buf0
        del primals_9
        buf39 = reinterpret_tensor(buf35, (4, 4, 4), (16, 4, 1), 0)
        del buf35
        triton_poi_fused_cat_17[grid(64)](buf5, buf19, buf29, primals_2,
            buf31, buf33, buf39, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf40 = reinterpret_tensor(buf15, (4, 4, 4), (16, 4, 1), 0)
        del buf15
        triton_poi_fused_cat_18[grid(64)](primals_2, buf34, buf36, buf38,
            buf24, buf10, buf40, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf41 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        triton_poi_fused_cat_mul_19[grid(128)](buf39, buf40, primals_2,
            buf41, 128, XBLOCK=128, num_warps=4, num_stages=1)
        buf42 = empty_strided_cuda((4, 8), (8, 1), torch.float32)
        triton_poi_fused_cat_20[grid(32)](buf39, buf40, buf42, 32, XBLOCK=
            32, num_warps=1, num_stages=1)
        del buf39
        del buf40
    return (buf41, buf42, primals_1, primals_2, primals_5, primals_6,
        reinterpret_tensor(buf1, (16, 4), (4, 1), 0), buf3, buf4,
        reinterpret_tensor(buf6, (16, 4), (4, 1), 0), buf8, buf9, buf12,
        buf13, buf14, buf16, buf17, buf18, buf21, buf22, buf23, buf26,
        buf27, buf28, buf31, buf32, buf33, buf36, buf37, buf38, buf34,
        buf29, buf24, buf19, buf10, buf5, primals_4, primals_3)


class BiLSTM_EncoderNew(nn.Module):

    def __init__(self, D: 'int', hidden_size: 'int', dropout: 'float'):
        super(BiLSTM_EncoderNew, self).__init__()
        self.D = D
        self.hidden_size = hidden_size
        self.initial_hidden_f = nn.Parameter(T.randn(1, hidden_size))
        self.initial_hidden_b = nn.Parameter(T.randn(1, hidden_size))
        self.initial_cell_f = nn.Parameter(T.randn(1, hidden_size))
        self.initial_cell_b = nn.Parameter(T.randn(1, hidden_size))
        self.dropout = nn.Dropout(dropout)
        self.weight_ih = nn.Parameter(T.randn(8, D, hidden_size))
        self.weight_hh = nn.Parameter(T.randn(8, hidden_size, hidden_size))
        self.bias = nn.Parameter(T.zeros(8, 1, hidden_size))
        self.init_weights()

    def init_weights(self):
        for name, param in self.named_parameters():
            if 'bias' in name.lower():
                nn.init.zeros_(param.data)
            elif 'hidden_state' or 'cell' in name.lower():
                nn.init.zeros_(param.data)
            else:
                nn.init.xavier_uniform_(param.data)

    def forward(self, input_0, input_1):
        primals_3 = self.initial_hidden_f
        primals_4 = self.initial_hidden_b
        primals_5 = self.initial_cell_f
        primals_6 = self.initial_cell_b
        primals_7 = self.weight_ih
        primals_8 = self.weight_hh
        primals_9 = self.bias
        primals_1 = input_0
        primals_2 = input_1
        output = call([primals_1, primals_2, primals_3, primals_4,
            primals_5, primals_6, primals_7, primals_8, primals_9])
        return output[0], output[1]
