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]


Measured latency_ms: 0.444247