import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_poi_fused_cat_relu_0(in_out_ptr0, in_ptr0, 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
    x0 = xindex % 4
    x1 = xindex // 4
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x2, tmp4, xmask)
    tl.store(out_ptr0 + (x0 + 8 * x1), tmp4, xmask)


@triton.jit
def triton_poi_fused_relu_threshold_backward_1(in_out_ptr0, in_ptr0,
    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
    x0 = xindex % 4
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp5 = 0.0
    tmp6 = tmp4 <= tmp5
    tl.store(in_out_ptr0 + x2, tmp4, xmask)
    tl.store(out_ptr0 + x2, tmp6, xmask)


@triton.jit
def triton_poi_fused_relu_threshold_backward_2(in_out_ptr0, in_ptr0,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 8
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp5 = 0.0
    tmp6 = tmp4 <= tmp5
    tl.store(in_out_ptr0 + x2, tmp4, xmask)
    tl.store(out_ptr0 + x2, tmp6, xmask)


@triton.jit
def triton_poi_fused_bmm_3(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + 4 * x0, xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_bmm_4(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + 8 * x0, xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused__softmax_5(in_ptr0, 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
    x1 = xindex // 4
    tmp0 = tl.load(in_ptr0 + x2, xmask)
    tmp3 = tl.load(in_ptr0 + 4 * x1, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (1 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr0 + (2 + 4 * x1), xmask, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr0 + (3 + 4 * x1), xmask, eviction_policy='evict_last'
        )
    tmp1 = 1.0
    tmp2 = tmp0 * tmp1
    tmp4 = tmp3 * tmp1
    tmp6 = tmp5 * tmp1
    tmp7 = triton_helpers.maximum(tmp4, tmp6)
    tmp9 = tmp8 * tmp1
    tmp10 = triton_helpers.maximum(tmp7, tmp9)
    tmp12 = tmp11 * tmp1
    tmp13 = triton_helpers.maximum(tmp10, tmp12)
    tmp14 = tmp2 - tmp13
    tmp15 = tmp14 * tmp1
    tmp16 = tl_math.exp(tmp15)
    tl.store(out_ptr0 + x2, tmp16, xmask)


@triton.jit
def triton_poi_fused_bmm_6(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (1 + 4 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_bmm_7(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (1 + 8 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_cat_8(in_ptr0, in_ptr1, in_ptr2, 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 % 2
    x3 = xindex // 2
    x2 = xindex // 8
    x5 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + 4 * x3, tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tl.load(in_ptr0 + (1 + 4 * x3), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.load(in_ptr0 + (2 + 4 * x3), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp9 = tmp7 + tmp8
    tmp10 = tl.load(in_ptr0 + (3 + 4 * x3), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp11 = tmp9 + tmp10
    tmp12 = tmp5 / tmp11
    tmp13 = tl.load(in_ptr1 + (4 + 32 * x2), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp14 = tmp12 * tmp13
    tmp15 = tmp6 / tmp11
    tmp16 = tl.load(in_ptr1 + (12 + 32 * x2), tmp4 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp17 = tmp15 * tmp16
    tmp18 = tmp14 + tmp17
    tmp19 = tmp8 / tmp11
    tmp20 = tl.load(in_ptr1 + (20 + 32 * x2), tmp4 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tmp19 * tmp20
    tmp22 = tmp18 + tmp21
    tmp23 = tmp10 / tmp11
    tmp24 = tl.load(in_ptr1 + (28 + 32 * x2), tmp4 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp25 = tmp23 * tmp24
    tmp26 = tmp22 + tmp25
    tmp27 = tl.full(tmp26.shape, 0.0, tmp26.dtype)
    tmp28 = tl.where(tmp4, tmp26, tmp27)
    tmp29 = tmp0 >= tmp3
    tl.full([1], 2, tl.int64)
    tmp32 = tl.load(in_ptr2 + 4 * x3, tmp29 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp33 = tl.load(in_ptr2 + (1 + 4 * x3), tmp29 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp34 = tmp32 + tmp33
    tmp35 = tl.load(in_ptr2 + (2 + 4 * x3), tmp29 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp36 = tmp34 + tmp35
    tmp37 = tl.load(in_ptr2 + (3 + 4 * x3), tmp29 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp38 = tmp36 + tmp37
    tmp39 = tmp32 / tmp38
    tmp40 = tl.load(in_ptr1 + (5 + 32 * x2), tmp29 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp41 = tmp39 * tmp40
    tmp42 = tmp33 / tmp38
    tmp43 = tl.load(in_ptr1 + (13 + 32 * x2), tmp29 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp44 = tmp42 * tmp43
    tmp45 = tmp41 + tmp44
    tmp46 = tmp35 / tmp38
    tmp47 = tl.load(in_ptr1 + (21 + 32 * x2), tmp29 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp48 = tmp46 * tmp47
    tmp49 = tmp45 + tmp48
    tmp50 = tmp37 / tmp38
    tmp51 = tl.load(in_ptr1 + (29 + 32 * x2), tmp29 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp52 = tmp50 * tmp51
    tmp53 = tmp49 + tmp52
    tmp54 = tl.full(tmp53.shape, 0.0, tmp53.dtype)
    tmp55 = tl.where(tmp29, tmp53, tmp54)
    tmp56 = tl.where(tmp4, tmp28, tmp55)
    tl.store(out_ptr0 + x5, tmp56, xmask)


@triton.jit
def triton_poi_fused_bmm_9(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (2 + 4 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_bmm_10(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (2 + 8 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_cat_11(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 % 3
    x3 = xindex // 3
    x2 = xindex // 12
    x5 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 2, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (2 * x3 + x0), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 3, tl.int64)
    tmp9 = tl.load(in_ptr1 + 4 * x3, tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp10 = tl.load(in_ptr1 + (1 + 4 * x3), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp11 = tmp9 + tmp10
    tmp12 = tl.load(in_ptr1 + (2 + 4 * x3), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp13 = tmp11 + tmp12
    tmp14 = tl.load(in_ptr1 + (3 + 4 * x3), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp15 = tmp13 + tmp14
    tmp16 = tmp9 / tmp15
    tmp17 = tl.load(in_ptr2 + (6 + 32 * x2), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp18 = tmp16 * tmp17
    tmp19 = tmp10 / tmp15
    tmp20 = tl.load(in_ptr2 + (14 + 32 * x2), tmp6 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp21 = tmp19 * tmp20
    tmp22 = tmp18 + tmp21
    tmp23 = tmp12 / tmp15
    tmp24 = tl.load(in_ptr2 + (22 + 32 * x2), tmp6 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp25 = tmp23 * tmp24
    tmp26 = tmp22 + tmp25
    tmp27 = tmp14 / tmp15
    tmp28 = tl.load(in_ptr2 + (30 + 32 * x2), tmp6 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp29 = tmp27 * tmp28
    tmp30 = tmp26 + tmp29
    tmp31 = tl.full(tmp30.shape, 0.0, tmp30.dtype)
    tmp32 = tl.where(tmp6, tmp30, tmp31)
    tmp33 = tl.where(tmp4, tmp5, tmp32)
    tl.store(out_ptr0 + x5, tmp33, xmask)


@triton.jit
def triton_poi_fused_bmm_12(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (3 + 4 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_bmm_13(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (3 + 8 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


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


@triton.jit
def triton_poi_fused_add_relu_15(in_out_ptr0, in_ptr0, in_ptr1, 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
    x0 = xindex % 4
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x2, xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = tmp4 + tmp5
    tl.store(in_out_ptr0 + x2, tmp4, xmask)
    tl.store(out_ptr0 + x2, tmp6, xmask)


@triton.jit
def triton_poi_fused_add_div_relu_sum_16(in_out_ptr0, in_ptr0, in_ptr1,
    in_ptr2, 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 + (x0 + 16 * x1), xmask)
    tmp1 = tl.load(in_ptr1 + x0, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr2 + (x0 + 16 * x1), xmask)
    tmp7 = tl.load(in_ptr0 + (4 + x0 + 16 * x1), xmask)
    tmp10 = tl.load(in_ptr2 + (4 + x0 + 16 * x1), xmask)
    tmp13 = tl.load(in_ptr0 + (8 + x0 + 16 * x1), xmask)
    tmp16 = tl.load(in_ptr2 + (8 + x0 + 16 * x1), xmask)
    tmp19 = tl.load(in_ptr0 + (12 + x0 + 16 * x1), xmask)
    tmp22 = tl.load(in_ptr2 + (12 + x0 + 16 * x1), xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = tmp4 + tmp5
    tmp8 = tmp7 + tmp1
    tmp9 = triton_helpers.maximum(tmp3, tmp8)
    tmp11 = tmp9 + tmp10
    tmp12 = tmp6 + tmp11
    tmp14 = tmp13 + tmp1
    tmp15 = triton_helpers.maximum(tmp3, tmp14)
    tmp17 = tmp15 + tmp16
    tmp18 = tmp12 + tmp17
    tmp20 = tmp19 + tmp1
    tmp21 = triton_helpers.maximum(tmp3, tmp20)
    tmp23 = tmp21 + tmp22
    tmp24 = tmp18 + tmp23
    tmp25 = 0.25
    tmp26 = tmp24 * tmp25
    tl.store(in_out_ptr0 + x2, tmp26, xmask)


@triton.jit
def triton_poi_fused_add_div_sum_17(in_ptr0, in_ptr1, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = xindex // 4
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 16 * x1), xmask)
    tmp1 = tl.load(in_ptr1 + (x0 + 16 * x1), xmask)
    tmp3 = tl.load(in_ptr0 + (4 + x0 + 16 * x1), xmask)
    tmp4 = tl.load(in_ptr1 + (4 + x0 + 16 * x1), xmask)
    tmp7 = tl.load(in_ptr0 + (8 + x0 + 16 * x1), xmask)
    tmp8 = tl.load(in_ptr1 + (8 + x0 + 16 * x1), xmask)
    tmp11 = tl.load(in_ptr0 + (12 + x0 + 16 * x1), xmask)
    tmp12 = tl.load(in_ptr1 + (12 + x0 + 16 * x1), xmask)
    tmp2 = tmp0 + tmp1
    tmp5 = tmp3 + tmp4
    tmp6 = tmp2 + tmp5
    tmp9 = tmp7 + tmp8
    tmp10 = tmp6 + tmp9
    tmp13 = tmp11 + tmp12
    tmp14 = tmp10 + tmp13
    tmp15 = 0.25
    tmp16 = tmp14 * tmp15
    tl.store(out_ptr0 + x2, tmp16, xmask)


@triton.jit
def triton_poi_fused_add_relu_18(in_ptr0, in_ptr1, in_ptr2, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    tmp0 = tl.load(in_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr1 + x0, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr2 + x2, xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = tmp4 + tmp5
    tl.store(out_ptr0 + x2, tmp6, xmask)


@triton.jit
def triton_poi_fused_relu_threshold_backward_19(in_out_ptr0, in_ptr0,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 12
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp5 = 0.0
    tmp6 = tmp4 <= tmp5
    tl.store(in_out_ptr0 + x2, tmp4, xmask)
    tl.store(out_ptr0 + x2, tmp6, xmask)


@triton.jit
def triton_poi_fused_add_mul_20(in_ptr0, in_ptr1, out_ptr0, out_ptr1,
    out_ptr2, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x2 = xindex // 16
    x3 = xindex // 4
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 4 * x2), xmask, eviction_policy='evict_last'
        )
    tmp4 = tl.load(in_ptr1 + (4 + x0 + 12 * x3), xmask)
    tmp6 = tl.load(in_ptr1 + (x0 + 12 * x3), xmask)
    tmp8 = tl.load(in_ptr1 + (8 + x0 + 12 * x3), xmask)
    tmp1 = tl.sigmoid(tmp0)
    tmp2 = 1.0
    tmp3 = tmp1 + tmp2
    tmp5 = tmp3 * tmp4
    tmp7 = tmp3 * tmp6
    tmp9 = tmp3 * tmp8
    tl.store(out_ptr0 + x4, tmp5, xmask)
    tl.store(out_ptr1 + x4, tmp7, xmask)
    tl.store(out_ptr2 + x4, tmp9, xmask)


@triton.jit
def triton_poi_fused_cat_21(in_ptr0, in_ptr1, in_ptr2, 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 % 2
    x3 = xindex // 2
    x2 = xindex // 8
    x5 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + 4 * x3, tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tl.load(in_ptr0 + (1 + 4 * x3), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.load(in_ptr0 + (2 + 4 * x3), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp9 = tmp7 + tmp8
    tmp10 = tl.load(in_ptr0 + (3 + 4 * x3), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp11 = tmp9 + tmp10
    tmp12 = tmp5 / tmp11
    tmp13 = tl.load(in_ptr1 + 16 * x2, tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp14 = tmp12 * tmp13
    tmp15 = tmp6 / tmp11
    tmp16 = tl.load(in_ptr1 + (4 + 16 * x2), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp17 = tmp15 * tmp16
    tmp18 = tmp14 + tmp17
    tmp19 = tmp8 / tmp11
    tmp20 = tl.load(in_ptr1 + (8 + 16 * x2), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp21 = tmp19 * tmp20
    tmp22 = tmp18 + tmp21
    tmp23 = tmp10 / tmp11
    tmp24 = tl.load(in_ptr1 + (12 + 16 * x2), tmp4 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp25 = tmp23 * tmp24
    tmp26 = tmp22 + tmp25
    tmp27 = tl.full(tmp26.shape, 0.0, tmp26.dtype)
    tmp28 = tl.where(tmp4, tmp26, tmp27)
    tmp29 = tmp0 >= tmp3
    tl.full([1], 2, tl.int64)
    tmp32 = tl.load(in_ptr2 + 4 * x3, tmp29 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp33 = tl.load(in_ptr2 + (1 + 4 * x3), tmp29 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp34 = tmp32 + tmp33
    tmp35 = tl.load(in_ptr2 + (2 + 4 * x3), tmp29 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp36 = tmp34 + tmp35
    tmp37 = tl.load(in_ptr2 + (3 + 4 * x3), tmp29 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp38 = tmp36 + tmp37
    tmp39 = tmp32 / tmp38
    tmp40 = tl.load(in_ptr1 + (1 + 16 * x2), tmp29 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp41 = tmp39 * tmp40
    tmp42 = tmp33 / tmp38
    tmp43 = tl.load(in_ptr1 + (5 + 16 * x2), tmp29 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp44 = tmp42 * tmp43
    tmp45 = tmp41 + tmp44
    tmp46 = tmp35 / tmp38
    tmp47 = tl.load(in_ptr1 + (9 + 16 * x2), tmp29 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp48 = tmp46 * tmp47
    tmp49 = tmp45 + tmp48
    tmp50 = tmp37 / tmp38
    tmp51 = tl.load(in_ptr1 + (13 + 16 * x2), tmp29 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp52 = tmp50 * tmp51
    tmp53 = tmp49 + tmp52
    tmp54 = tl.full(tmp53.shape, 0.0, tmp53.dtype)
    tmp55 = tl.where(tmp29, tmp53, tmp54)
    tmp56 = tl.where(tmp4, tmp28, tmp55)
    tl.store(out_ptr0 + x5, tmp56, xmask)


@triton.jit
def triton_poi_fused_cat_22(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 % 3
    x3 = xindex // 3
    x2 = xindex // 12
    x5 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 2, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (2 * x3 + x0), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 3, tl.int64)
    tmp9 = tl.load(in_ptr1 + 4 * x3, tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp10 = tl.load(in_ptr1 + (1 + 4 * x3), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp11 = tmp9 + tmp10
    tmp12 = tl.load(in_ptr1 + (2 + 4 * x3), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp13 = tmp11 + tmp12
    tmp14 = tl.load(in_ptr1 + (3 + 4 * x3), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp15 = tmp13 + tmp14
    tmp16 = tmp9 / tmp15
    tmp17 = tl.load(in_ptr2 + (2 + 16 * x2), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp18 = tmp16 * tmp17
    tmp19 = tmp10 / tmp15
    tmp20 = tl.load(in_ptr2 + (6 + 16 * x2), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp21 = tmp19 * tmp20
    tmp22 = tmp18 + tmp21
    tmp23 = tmp12 / tmp15
    tmp24 = tl.load(in_ptr2 + (10 + 16 * x2), tmp6 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp25 = tmp23 * tmp24
    tmp26 = tmp22 + tmp25
    tmp27 = tmp14 / tmp15
    tmp28 = tl.load(in_ptr2 + (14 + 16 * x2), tmp6 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp29 = tmp27 * tmp28
    tmp30 = tmp26 + tmp29
    tmp31 = tl.full(tmp30.shape, 0.0, tmp30.dtype)
    tmp32 = tl.where(tmp6, tmp30, tmp31)
    tmp33 = tl.where(tmp4, tmp5, tmp32)
    tl.store(out_ptr0 + x5, tmp33, xmask)


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


@triton.jit
def triton_poi_fused_add_cat_relu_24(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    x1 = xindex // 4
    tmp0 = tl.load(in_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr1 + x0, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr2 + x2, xmask)
    tmp6 = tl.load(in_ptr3 + x0, xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr4 + x2, xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp7 = tmp5 + tmp6
    tmp8 = triton_helpers.maximum(tmp3, tmp7)
    tmp9 = tmp4 + tmp8
    tmp11 = tmp9 + tmp10
    tl.store(out_ptr0 + x2, tmp11, xmask)
    tl.store(out_ptr1 + (x0 + 8 * x1), tmp11, xmask)


@triton.jit
def triton_poi_fused_add_cat_relu_25(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    x1 = xindex // 4
    tmp0 = tl.load(in_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr1 + x0, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr2 + x2, xmask)
    tmp7 = tl.load(in_ptr3 + x2, xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = tmp4 + tmp5
    tmp8 = tmp6 + tmp7
    tl.store(out_ptr0 + x2, tmp8, xmask)
    tl.store(out_ptr1 + (x0 + 8 * x1), tmp8, xmask)


@triton.jit
def triton_poi_fused_add_relu_threshold_backward_26(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8,
    in_ptr9, in_ptr10, out_ptr0, out_ptr1, out_ptr2, out_ptr3, out_ptr4,
    out_ptr5, out_ptr6, out_ptr7, out_ptr8, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    tmp0 = tl.load(in_ptr0 + x2, xmask)
    tmp3 = tl.load(in_ptr1 + x2, xmask)
    tmp4 = tl.load(in_ptr2 + x0, xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr3 + x2, xmask)
    tmp10 = tl.load(in_ptr4 + x0, xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr5 + x2, xmask)
    tmp18 = tl.load(in_ptr6 + x2, xmask)
    tmp22 = tl.load(in_ptr7 + x2, xmask)
    tmp26 = tl.load(in_ptr8 + x2, xmask)
    tmp30 = tl.load(in_ptr9 + x2, xmask)
    tmp34 = tl.load(in_ptr10 + x2, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 + tmp1
    tmp5 = tmp3 + tmp4
    tmp6 = tl.full([1], 0, tl.int32)
    tmp7 = triton_helpers.maximum(tmp6, tmp5)
    tmp8 = tmp2 + tmp7
    tmp11 = tmp9 + tmp10
    tmp12 = triton_helpers.maximum(tmp6, tmp11)
    tmp13 = tmp8 + tmp12
    tmp15 = tmp14 + tmp4
    tmp16 = triton_helpers.maximum(tmp6, tmp15)
    tmp17 = tmp13 + tmp16
    tmp19 = tmp18 + tmp10
    tmp20 = triton_helpers.maximum(tmp6, tmp19)
    tmp21 = tmp17 + tmp20
    tmp23 = tmp22 + tmp4
    tmp24 = triton_helpers.maximum(tmp6, tmp23)
    tmp25 = tmp21 + tmp24
    tmp27 = tmp26 + tmp10
    tmp28 = triton_helpers.maximum(tmp6, tmp27)
    tmp29 = tmp25 + tmp28
    tmp31 = tmp30 + tmp4
    tmp32 = triton_helpers.maximum(tmp6, tmp31)
    tmp33 = tmp29 + tmp32
    tmp35 = tmp34 + tmp10
    tmp36 = triton_helpers.maximum(tmp6, tmp35)
    tmp37 = tmp33 + tmp36
    tmp38 = tmp36 <= tmp1
    tmp39 = tmp32 <= tmp1
    tmp40 = tmp28 <= tmp1
    tmp41 = tmp24 <= tmp1
    tmp42 = tmp20 <= tmp1
    tmp43 = tmp16 <= tmp1
    tmp44 = tmp12 <= tmp1
    tmp45 = tmp7 <= tmp1
    tmp46 = tmp0 <= tmp1
    tl.store(in_out_ptr0 + x2, tmp37, xmask)
    tl.store(out_ptr0 + x2, tmp38, xmask)
    tl.store(out_ptr1 + x2, tmp39, xmask)
    tl.store(out_ptr2 + x2, tmp40, xmask)
    tl.store(out_ptr3 + x2, tmp41, xmask)
    tl.store(out_ptr4 + x2, tmp42, xmask)
    tl.store(out_ptr5 + x2, tmp43, xmask)
    tl.store(out_ptr6 + x2, tmp44, xmask)
    tl.store(out_ptr7 + x2, tmp45, xmask)
    tl.store(out_ptr8 + x2, tmp46, xmask)


@triton.jit
def triton_poi_fused_add_relu_threshold_backward_27(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8,
    in_ptr9, out_ptr0, out_ptr1, out_ptr2, out_ptr3, out_ptr4, out_ptr5,
    out_ptr6, out_ptr7, out_ptr8, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    tmp0 = tl.load(in_ptr0 + x2, xmask)
    tmp3 = tl.load(in_ptr1 + x2, xmask)
    tmp5 = tl.load(in_ptr2 + x2, xmask)
    tmp6 = tl.load(in_ptr3 + x0, xmask, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr4 + x2, xmask)
    tmp13 = tl.load(in_ptr5 + x2, xmask)
    tmp17 = tl.load(in_ptr6 + x2, xmask)
    tmp19 = tl.load(in_ptr7 + x2, xmask)
    tmp23 = tl.load(in_ptr8 + x2, xmask)
    tmp25 = tl.load(in_ptr9 + x2, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp7 = tmp5 + tmp6
    tmp8 = tl.full([1], 0, tl.int32)
    tmp9 = triton_helpers.maximum(tmp8, tmp7)
    tmp10 = tmp4 + tmp9
    tmp12 = tmp10 + tmp11
    tmp14 = tmp13 + tmp6
    tmp15 = triton_helpers.maximum(tmp8, tmp14)
    tmp16 = tmp12 + tmp15
    tmp18 = tmp16 + tmp17
    tmp20 = tmp19 + tmp6
    tmp21 = triton_helpers.maximum(tmp8, tmp20)
    tmp22 = tmp18 + tmp21
    tmp24 = tmp22 + tmp23
    tmp26 = tmp25 + tmp6
    tmp27 = triton_helpers.maximum(tmp8, tmp26)
    tmp28 = tmp24 + tmp27
    tmp29 = tmp27 <= tmp1
    tmp30 = tmp21 <= tmp1
    tmp31 = tmp15 <= tmp1
    tmp32 = tmp9 <= tmp1
    tmp33 = tmp23 <= tmp1
    tmp34 = tmp17 <= tmp1
    tmp35 = tmp11 <= tmp1
    tmp36 = tmp3 <= tmp1
    tmp37 = tmp0 <= tmp1
    tl.store(in_out_ptr0 + x2, tmp28, xmask)
    tl.store(out_ptr0 + x2, tmp29, xmask)
    tl.store(out_ptr1 + x2, tmp30, xmask)
    tl.store(out_ptr2 + x2, tmp31, xmask)
    tl.store(out_ptr3 + x2, tmp32, xmask)
    tl.store(out_ptr4 + x2, tmp33, xmask)
    tl.store(out_ptr5 + x2, tmp34, xmask)
    tl.store(out_ptr6 + x2, tmp35, xmask)
    tl.store(out_ptr7 + x2, tmp36, xmask)
    tl.store(out_ptr8 + x2, tmp37, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_23, primals_24, primals_25, primals_26, primals_27,
        primals_28, primals_29, primals_30) = args
    args.clear()
    assert_size_stride(primals_1, (4, 4), (4, 1))
    assert_size_stride(primals_2, (4,), (1,))
    assert_size_stride(primals_3, (4, 4, 4), (16, 4, 1))
    assert_size_stride(primals_4, (4, 4), (4, 1))
    assert_size_stride(primals_5, (4,), (1,))
    assert_size_stride(primals_6, (4, 4, 4), (16, 4, 1))
    assert_size_stride(primals_7, (8, 4), (4, 1))
    assert_size_stride(primals_8, (8,), (1,))
    assert_size_stride(primals_9, (4, 4), (4, 1))
    assert_size_stride(primals_10, (4,), (1,))
    assert_size_stride(primals_11, (4, 8), (8, 1))
    assert_size_stride(primals_12, (4,), (1,))
    assert_size_stride(primals_13, (8, 4), (4, 1))
    assert_size_stride(primals_14, (8,), (1,))
    assert_size_stride(primals_15, (4, 4), (4, 1))
    assert_size_stride(primals_16, (4,), (1,))
    assert_size_stride(primals_17, (4, 8), (8, 1))
    assert_size_stride(primals_18, (4,), (1,))
    assert_size_stride(primals_19, (4, 4), (4, 1))
    assert_size_stride(primals_20, (4,), (1,))
    assert_size_stride(primals_21, (4, 4), (4, 1))
    assert_size_stride(primals_22, (4,), (1,))
    assert_size_stride(primals_23, (12, 4), (4, 1))
    assert_size_stride(primals_24, (12,), (1,))
    assert_size_stride(primals_25, (12, 4), (4, 1))
    assert_size_stride(primals_26, (12,), (1,))
    assert_size_stride(primals_27, (4, 4), (4, 1))
    assert_size_stride(primals_28, (4,), (1,))
    assert_size_stride(primals_29, (4, 4), (4, 1))
    assert_size_stride(primals_30, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(primals_3, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_1, (4, 4), (1, 4), 0), out=buf0)
        del primals_1
        buf1 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(primals_6, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_4, (4, 4), (1, 4), 0), out=buf1)
        del primals_4
        buf2 = reinterpret_tensor(buf0, (4, 4, 4), (16, 4, 1), 0)
        del buf0
        buf55 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        buf54 = reinterpret_tensor(buf55, (4, 4, 4), (32, 8, 1), 0)
        get_raw_stream(0)
        triton_poi_fused_cat_relu_0[grid(64)](buf2, primals_2, buf54, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        del primals_2
        buf3 = empty_strided_cuda((16, 8), (8, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf2, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_7, (4, 8), (1, 4), 0), out=buf3)
        buf4 = reinterpret_tensor(buf1, (4, 4, 4), (16, 4, 1), 0)
        del buf1
        buf28 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        buf27 = reinterpret_tensor(buf28, (4, 4, 4), (32, 8, 1), 0)
        triton_poi_fused_cat_relu_0[grid(64)](buf4, primals_5, buf27, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        del primals_5
        buf5 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf4, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_9, (4, 4), (1, 4), 0), out=buf5)
        buf6 = reinterpret_tensor(buf5, (4, 4, 4), (16, 4, 1), 0)
        del buf5
        buf500 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_1[grid(64)](buf6,
            primals_10, buf500, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf7 = reinterpret_tensor(buf3, (4, 4, 8), (32, 8, 1), 0)
        del buf3
        buf501 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_2[grid(128)](buf7,
            primals_8, buf501, 128, XBLOCK=128, num_warps=4, num_stages=1)
        buf8 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf6, buf8, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf9 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        triton_poi_fused_bmm_4[grid(16)](buf7, buf9, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf10 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf8, buf9, out=buf10)
        buf11 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf10, buf11, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf12 = reinterpret_tensor(buf9, (4, 4, 1), (4, 1, 16), 0)
        del buf9
        triton_poi_fused_bmm_6[grid(16)](buf6, buf12, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf13 = reinterpret_tensor(buf8, (4, 1, 4), (4, 16, 1), 0)
        del buf8
        triton_poi_fused_bmm_7[grid(16)](buf7, buf13, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf14 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf12, buf13, out=buf14)
        buf15 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf14, buf15, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf16 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        triton_poi_fused_cat_8[grid(32)](buf11, buf7, buf15, buf16, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf17 = reinterpret_tensor(buf13, (4, 4, 1), (4, 1, 16), 0)
        del buf13
        triton_poi_fused_bmm_9[grid(16)](buf6, buf17, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf18 = reinterpret_tensor(buf12, (4, 1, 4), (4, 16, 1), 0)
        del buf12
        triton_poi_fused_bmm_10[grid(16)](buf7, buf18, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf19 = buf15
        del buf15
        extern_kernels.bmm(buf17, buf18, out=buf19)
        buf20 = buf11
        del buf11
        triton_poi_fused__softmax_5[grid(64)](buf19, buf20, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf21 = empty_strided_cuda((4, 4, 3), (12, 3, 1), torch.float32)
        triton_poi_fused_cat_11[grid(48)](buf16, buf20, buf7, buf21, 48,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf22 = reinterpret_tensor(buf18, (4, 4, 1), (4, 1, 16), 0)
        del buf18
        triton_poi_fused_bmm_12[grid(16)](buf6, buf22, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf23 = reinterpret_tensor(buf17, (4, 1, 4), (4, 16, 1), 0)
        del buf17
        triton_poi_fused_bmm_13[grid(16)](buf7, buf23, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf24 = buf20
        del buf20
        extern_kernels.bmm(buf22, buf23, out=buf24)
        buf25 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf24, buf25, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf26 = reinterpret_tensor(buf28, (4, 4, 4), (32, 8, 1), 4)
        triton_poi_fused_cat_14[grid(64)](buf21, buf25, buf7, buf26, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf29 = reinterpret_tensor(buf25, (16, 4), (4, 1), 0)
        del buf25
        extern_kernels.mm(reinterpret_tensor(buf28, (16, 8), (8, 1), 0),
            reinterpret_tensor(primals_11, (8, 4), (1, 8), 0), out=buf29)
        buf30 = reinterpret_tensor(buf29, (4, 4, 4), (16, 4, 1), 0)
        del buf29
        buf64 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_relu_15[grid(64)](buf30, primals_12, buf4,
            buf64, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf31 = empty_strided_cuda((16, 8), (8, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf30, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_13, (4, 8), (1, 4), 0), out=buf31)
        buf32 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf2, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_15, (4, 4), (1, 4), 0), out=buf32)
        buf33 = reinterpret_tensor(buf32, (4, 4, 4), (16, 4, 1), 0)
        del buf32
        buf497 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_1[grid(64)](buf33,
            primals_16, buf497, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf34 = reinterpret_tensor(buf31, (4, 4, 8), (32, 8, 1), 0)
        del buf31
        buf498 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_2[grid(128)](buf34,
            primals_14, buf498, 128, XBLOCK=128, num_warps=4, num_stages=1)
        buf35 = reinterpret_tensor(buf23, (4, 4, 1), (4, 1, 16), 0)
        del buf23
        triton_poi_fused_bmm_3[grid(16)](buf33, buf35, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf36 = reinterpret_tensor(buf22, (4, 1, 4), (4, 16, 1), 0)
        del buf22
        triton_poi_fused_bmm_4[grid(16)](buf34, buf36, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf37 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf35, buf36, out=buf37)
        buf38 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf37, buf38, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf39 = reinterpret_tensor(buf36, (4, 4, 1), (4, 1, 16), 0)
        del buf36
        triton_poi_fused_bmm_6[grid(16)](buf33, buf39, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf40 = reinterpret_tensor(buf35, (4, 1, 4), (4, 16, 1), 0)
        del buf35
        triton_poi_fused_bmm_7[grid(16)](buf34, buf40, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf41 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf39, buf40, out=buf41)
        buf42 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf41, buf42, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf43 = buf16
        del buf16
        triton_poi_fused_cat_8[grid(32)](buf38, buf34, buf42, buf43, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf44 = reinterpret_tensor(buf40, (4, 4, 1), (4, 1, 16), 0)
        del buf40
        triton_poi_fused_bmm_9[grid(16)](buf33, buf44, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf45 = reinterpret_tensor(buf39, (4, 1, 4), (4, 16, 1), 0)
        del buf39
        triton_poi_fused_bmm_10[grid(16)](buf34, buf45, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf46 = buf42
        del buf42
        extern_kernels.bmm(buf44, buf45, out=buf46)
        buf47 = buf38
        del buf38
        triton_poi_fused__softmax_5[grid(64)](buf46, buf47, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf48 = buf21
        del buf21
        triton_poi_fused_cat_11[grid(48)](buf43, buf47, buf34, buf48, 48,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf49 = reinterpret_tensor(buf45, (4, 4, 1), (4, 1, 16), 0)
        del buf45
        triton_poi_fused_bmm_12[grid(16)](buf33, buf49, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf50 = reinterpret_tensor(buf44, (4, 1, 4), (4, 16, 1), 0)
        del buf44
        triton_poi_fused_bmm_13[grid(16)](buf34, buf50, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf51 = buf47
        del buf47
        extern_kernels.bmm(buf49, buf50, out=buf51)
        buf52 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf51, buf52, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf53 = reinterpret_tensor(buf55, (4, 4, 4), (32, 8, 1), 4)
        triton_poi_fused_cat_14[grid(64)](buf48, buf52, buf34, buf53, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf56 = reinterpret_tensor(buf52, (16, 4), (4, 1), 0)
        del buf52
        extern_kernels.mm(reinterpret_tensor(buf55, (16, 8), (8, 1), 0),
            reinterpret_tensor(primals_17, (8, 4), (1, 8), 0), out=buf56)
        buf57 = reinterpret_tensor(buf50, (4, 4), (4, 1), 0)
        del buf50
        buf58 = buf57
        del buf57
        triton_poi_fused_add_div_relu_sum_16[grid(16)](buf58, buf56,
            primals_18, buf2, 16, XBLOCK=16, num_warps=1, num_stages=1)
        buf59 = reinterpret_tensor(buf49, (4, 4), (4, 1), 0)
        del buf49
        triton_poi_fused_add_div_sum_17[grid(16)](buf30, buf4, buf59, 16,
            XBLOCK=16, num_warps=1, num_stages=1)
        buf60 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_20, buf58, reinterpret_tensor(
            primals_19, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf60)
        buf61 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_22, buf59, reinterpret_tensor(
            primals_21, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf61)
        buf62 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_relu_18[grid(64)](buf56, primals_18, buf2,
            buf62, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf63 = empty_strided_cuda((16, 12), (12, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf62, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_23, (4, 12), (1, 4), 0), out=buf63)
        buf65 = empty_strided_cuda((16, 12), (12, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf64, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_25, (4, 12), (1, 4), 0), out=buf65)
        buf66 = reinterpret_tensor(buf63, (4, 4, 12), (48, 12, 1), 0)
        del buf63
        buf495 = empty_strided_cuda((4, 4, 12), (48, 12, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_19[grid(192)](buf66,
            primals_24, buf495, 192, XBLOCK=128, num_warps=4, num_stages=1)
        buf67 = reinterpret_tensor(buf65, (4, 4, 12), (48, 12, 1), 0)
        del buf65
        buf494 = empty_strided_cuda((4, 4, 12), (48, 12, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_19[grid(192)](buf67,
            primals_26, buf494, 192, XBLOCK=128, num_warps=4, num_stages=1)
        buf68 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf69 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf80 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_20[grid(64)](buf61, buf66, buf68, buf69,
            buf80, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf70 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf68, buf70, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf71 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf69, buf71, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf72 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf70, buf71, out=buf72)
        buf73 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf74 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf81 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_20[grid(64)](buf60, buf67, buf73, buf74,
            buf81, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf75 = reinterpret_tensor(buf71, (4, 4, 1), (4, 1, 16), 0)
        del buf71
        triton_poi_fused_bmm_3[grid(16)](buf73, buf75, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf76 = reinterpret_tensor(buf70, (4, 1, 4), (4, 16, 1), 0)
        del buf70
        triton_poi_fused_bmm_3[grid(16)](buf74, buf76, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf77 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf75, buf76, out=buf77)
        buf78 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf72, buf78, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf79 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf77, buf79, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf82 = reinterpret_tensor(buf76, (4, 4, 1), (4, 1, 16), 0)
        del buf76
        triton_poi_fused_bmm_6[grid(16)](buf68, buf82, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf83 = reinterpret_tensor(buf75, (4, 1, 4), (4, 16, 1), 0)
        del buf75
        triton_poi_fused_bmm_6[grid(16)](buf69, buf83, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf84 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf82, buf83, out=buf84)
        buf85 = reinterpret_tensor(buf83, (4, 4, 1), (4, 1, 16), 0)
        del buf83
        triton_poi_fused_bmm_6[grid(16)](buf73, buf85, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf86 = reinterpret_tensor(buf82, (4, 1, 4), (4, 16, 1), 0)
        del buf82
        triton_poi_fused_bmm_6[grid(16)](buf74, buf86, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf87 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf85, buf86, out=buf87)
        buf88 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf84, buf88, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf89 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf87, buf89, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf90 = buf43
        del buf43
        triton_poi_fused_cat_21[grid(32)](buf78, buf80, buf88, buf90, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf91 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        triton_poi_fused_cat_21[grid(32)](buf79, buf81, buf89, buf91, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf92 = reinterpret_tensor(buf86, (4, 4, 1), (4, 1, 16), 0)
        del buf86
        triton_poi_fused_bmm_9[grid(16)](buf68, buf92, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf93 = reinterpret_tensor(buf85, (4, 1, 4), (4, 16, 1), 0)
        del buf85
        triton_poi_fused_bmm_9[grid(16)](buf69, buf93, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf94 = buf89
        del buf89
        extern_kernels.bmm(buf92, buf93, out=buf94)
        buf95 = reinterpret_tensor(buf93, (4, 4, 1), (4, 1, 16), 0)
        del buf93
        triton_poi_fused_bmm_9[grid(16)](buf73, buf95, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf96 = reinterpret_tensor(buf92, (4, 1, 4), (4, 16, 1), 0)
        del buf92
        triton_poi_fused_bmm_9[grid(16)](buf74, buf96, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf97 = buf79
        del buf79
        extern_kernels.bmm(buf95, buf96, out=buf97)
        buf98 = buf88
        del buf88
        triton_poi_fused__softmax_5[grid(64)](buf94, buf98, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf99 = buf78
        del buf78
        triton_poi_fused__softmax_5[grid(64)](buf97, buf99, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf100 = buf48
        del buf48
        triton_poi_fused_cat_22[grid(48)](buf90, buf98, buf80, buf100, 48,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf101 = empty_strided_cuda((4, 4, 3), (12, 3, 1), torch.float32)
        triton_poi_fused_cat_22[grid(48)](buf91, buf99, buf81, buf101, 48,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf102 = reinterpret_tensor(buf96, (4, 4, 1), (4, 1, 16), 0)
        del buf96
        triton_poi_fused_bmm_12[grid(16)](buf68, buf102, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf103 = reinterpret_tensor(buf95, (4, 1, 4), (4, 16, 1), 0)
        del buf95
        triton_poi_fused_bmm_12[grid(16)](buf69, buf103, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf104 = buf99
        del buf99
        extern_kernels.bmm(buf102, buf103, out=buf104)
        buf105 = reinterpret_tensor(buf103, (4, 4, 1), (4, 1, 16), 0)
        del buf103
        triton_poi_fused_bmm_12[grid(16)](buf73, buf105, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf106 = reinterpret_tensor(buf102, (4, 1, 4), (4, 16, 1), 0)
        del buf102
        triton_poi_fused_bmm_12[grid(16)](buf74, buf106, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf107 = buf98
        del buf98
        extern_kernels.bmm(buf105, buf106, out=buf107)
        buf108 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf104, buf108, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf109 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf107, buf109, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf110 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf112 = buf110
        del buf110
        triton_poi_fused_add_cat_23[grid(64)](buf112, buf100, buf108, buf80,
            buf62, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf111 = buf108
        del buf108
        buf114 = buf111
        del buf111
        triton_poi_fused_add_cat_23[grid(64)](buf114, buf101, buf109, buf81,
            buf64, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf113 = reinterpret_tensor(buf109, (16, 4), (4, 1), 0)
        del buf109
        extern_kernels.mm(reinterpret_tensor(buf112, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_27, (4, 4), (1, 4), 0), out=buf113)
        buf115 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf114, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_29, (4, 4), (1, 4), 0), out=buf115)
        buf116 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf169 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        buf168 = reinterpret_tensor(buf169, (4, 4, 4), (32, 8, 1), 0)
        triton_poi_fused_add_cat_relu_24[grid(64)](buf113, primals_28,
            buf56, primals_18, buf2, buf116, buf168, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf117 = empty_strided_cuda((16, 8), (8, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf116, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_7, (4, 8), (1, 4), 0), out=buf117)
        buf118 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf142 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        buf141 = reinterpret_tensor(buf142, (4, 4, 4), (32, 8, 1), 0)
        triton_poi_fused_add_cat_relu_25[grid(64)](buf115, primals_30,
            buf30, buf4, buf118, buf141, 64, XBLOCK=64, num_warps=1,
            num_stages=1)
        buf119 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf118, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_9, (4, 4), (1, 4), 0), out=buf119)
        buf120 = reinterpret_tensor(buf119, (4, 4, 4), (16, 4, 1), 0)
        del buf119
        buf490 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_1[grid(64)](buf120,
            primals_10, buf490, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf121 = reinterpret_tensor(buf117, (4, 4, 8), (32, 8, 1), 0)
        del buf117
        buf491 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_2[grid(128)](buf121,
            primals_8, buf491, 128, XBLOCK=128, num_warps=4, num_stages=1)
        buf122 = reinterpret_tensor(buf106, (4, 4, 1), (4, 1, 16), 0)
        del buf106
        triton_poi_fused_bmm_3[grid(16)](buf120, buf122, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf123 = reinterpret_tensor(buf105, (4, 1, 4), (4, 16, 1), 0)
        del buf105
        triton_poi_fused_bmm_4[grid(16)](buf121, buf123, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf124 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf122, buf123, out=buf124)
        buf125 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf124, buf125, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf126 = reinterpret_tensor(buf123, (4, 4, 1), (4, 1, 16), 0)
        del buf123
        triton_poi_fused_bmm_6[grid(16)](buf120, buf126, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf127 = reinterpret_tensor(buf122, (4, 1, 4), (4, 16, 1), 0)
        del buf122
        triton_poi_fused_bmm_7[grid(16)](buf121, buf127, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf128 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf126, buf127, out=buf128)
        buf129 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf128, buf129, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf130 = buf91
        del buf91
        triton_poi_fused_cat_8[grid(32)](buf125, buf121, buf129, buf130, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf131 = reinterpret_tensor(buf127, (4, 4, 1), (4, 1, 16), 0)
        del buf127
        triton_poi_fused_bmm_9[grid(16)](buf120, buf131, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf132 = reinterpret_tensor(buf126, (4, 1, 4), (4, 16, 1), 0)
        del buf126
        triton_poi_fused_bmm_10[grid(16)](buf121, buf132, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf133 = buf129
        del buf129
        extern_kernels.bmm(buf131, buf132, out=buf133)
        buf134 = buf125
        del buf125
        triton_poi_fused__softmax_5[grid(64)](buf133, buf134, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf135 = buf101
        del buf101
        triton_poi_fused_cat_11[grid(48)](buf130, buf134, buf121, buf135, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf136 = reinterpret_tensor(buf132, (4, 4, 1), (4, 1, 16), 0)
        del buf132
        triton_poi_fused_bmm_12[grid(16)](buf120, buf136, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf137 = reinterpret_tensor(buf131, (4, 1, 4), (4, 16, 1), 0)
        del buf131
        triton_poi_fused_bmm_13[grid(16)](buf121, buf137, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf138 = buf134
        del buf134
        extern_kernels.bmm(buf136, buf137, out=buf138)
        buf139 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf138, buf139, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf140 = reinterpret_tensor(buf142, (4, 4, 4), (32, 8, 1), 4)
        triton_poi_fused_cat_14[grid(64)](buf135, buf139, buf121, buf140, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf143 = reinterpret_tensor(buf139, (16, 4), (4, 1), 0)
        del buf139
        extern_kernels.mm(reinterpret_tensor(buf142, (16, 8), (8, 1), 0),
            reinterpret_tensor(primals_11, (8, 4), (1, 8), 0), out=buf143)
        buf144 = reinterpret_tensor(buf143, (4, 4, 4), (16, 4, 1), 0)
        del buf143
        buf178 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_relu_15[grid(64)](buf144, primals_12, buf118,
            buf178, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf145 = empty_strided_cuda((16, 8), (8, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf144, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_13, (4, 8), (1, 4), 0), out=buf145)
        buf146 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf116, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_15, (4, 4), (1, 4), 0), out=buf146)
        buf147 = reinterpret_tensor(buf146, (4, 4, 4), (16, 4, 1), 0)
        del buf146
        buf487 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_1[grid(64)](buf147,
            primals_16, buf487, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf148 = reinterpret_tensor(buf145, (4, 4, 8), (32, 8, 1), 0)
        del buf145
        buf488 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_2[grid(128)](buf148,
            primals_14, buf488, 128, XBLOCK=128, num_warps=4, num_stages=1)
        buf149 = reinterpret_tensor(buf137, (4, 4, 1), (4, 1, 16), 0)
        del buf137
        triton_poi_fused_bmm_3[grid(16)](buf147, buf149, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf150 = reinterpret_tensor(buf136, (4, 1, 4), (4, 16, 1), 0)
        del buf136
        triton_poi_fused_bmm_4[grid(16)](buf148, buf150, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf151 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf149, buf150, out=buf151)
        buf152 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf151, buf152, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf153 = reinterpret_tensor(buf150, (4, 4, 1), (4, 1, 16), 0)
        del buf150
        triton_poi_fused_bmm_6[grid(16)](buf147, buf153, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf154 = reinterpret_tensor(buf149, (4, 1, 4), (4, 16, 1), 0)
        del buf149
        triton_poi_fused_bmm_7[grid(16)](buf148, buf154, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf155 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf153, buf154, out=buf155)
        buf156 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf155, buf156, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf157 = buf130
        del buf130
        triton_poi_fused_cat_8[grid(32)](buf152, buf148, buf156, buf157, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf158 = reinterpret_tensor(buf154, (4, 4, 1), (4, 1, 16), 0)
        del buf154
        triton_poi_fused_bmm_9[grid(16)](buf147, buf158, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf159 = reinterpret_tensor(buf153, (4, 1, 4), (4, 16, 1), 0)
        del buf153
        triton_poi_fused_bmm_10[grid(16)](buf148, buf159, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf160 = buf156
        del buf156
        extern_kernels.bmm(buf158, buf159, out=buf160)
        buf161 = buf152
        del buf152
        triton_poi_fused__softmax_5[grid(64)](buf160, buf161, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf162 = buf135
        del buf135
        triton_poi_fused_cat_11[grid(48)](buf157, buf161, buf148, buf162, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf163 = reinterpret_tensor(buf159, (4, 4, 1), (4, 1, 16), 0)
        del buf159
        triton_poi_fused_bmm_12[grid(16)](buf147, buf163, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf164 = reinterpret_tensor(buf158, (4, 1, 4), (4, 16, 1), 0)
        del buf158
        triton_poi_fused_bmm_13[grid(16)](buf148, buf164, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf165 = buf161
        del buf161
        extern_kernels.bmm(buf163, buf164, out=buf165)
        buf166 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf165, buf166, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf167 = reinterpret_tensor(buf169, (4, 4, 4), (32, 8, 1), 4)
        triton_poi_fused_cat_14[grid(64)](buf162, buf166, buf148, buf167, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf170 = reinterpret_tensor(buf166, (16, 4), (4, 1), 0)
        del buf166
        extern_kernels.mm(reinterpret_tensor(buf169, (16, 8), (8, 1), 0),
            reinterpret_tensor(primals_17, (8, 4), (1, 8), 0), out=buf170)
        buf171 = reinterpret_tensor(buf164, (4, 4), (4, 1), 0)
        del buf164
        buf172 = buf171
        del buf171
        triton_poi_fused_add_div_relu_sum_16[grid(16)](buf172, buf170,
            primals_18, buf116, 16, XBLOCK=16, num_warps=1, num_stages=1)
        buf173 = reinterpret_tensor(buf163, (4, 4), (4, 1), 0)
        del buf163
        triton_poi_fused_add_div_sum_17[grid(16)](buf144, buf118, buf173, 
            16, XBLOCK=16, num_warps=1, num_stages=1)
        buf174 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_20, buf172, reinterpret_tensor(
            primals_19, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf174)
        buf175 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_22, buf173, reinterpret_tensor(
            primals_21, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf175)
        buf176 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_relu_18[grid(64)](buf170, primals_18, buf116,
            buf176, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf177 = empty_strided_cuda((16, 12), (12, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf176, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_23, (4, 12), (1, 4), 0), out=buf177)
        buf179 = empty_strided_cuda((16, 12), (12, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf178, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_25, (4, 12), (1, 4), 0), out=buf179)
        buf180 = reinterpret_tensor(buf177, (4, 4, 12), (48, 12, 1), 0)
        del buf177
        buf485 = empty_strided_cuda((4, 4, 12), (48, 12, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_19[grid(192)](buf180,
            primals_24, buf485, 192, XBLOCK=128, num_warps=4, num_stages=1)
        buf181 = reinterpret_tensor(buf179, (4, 4, 12), (48, 12, 1), 0)
        del buf179
        buf484 = empty_strided_cuda((4, 4, 12), (48, 12, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_19[grid(192)](buf181,
            primals_26, buf484, 192, XBLOCK=128, num_warps=4, num_stages=1)
        buf182 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf183 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf194 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_20[grid(64)](buf175, buf180, buf182,
            buf183, buf194, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf184 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf182, buf184, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf185 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf183, buf185, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf186 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf184, buf185, out=buf186)
        buf187 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf188 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf195 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_20[grid(64)](buf174, buf181, buf187,
            buf188, buf195, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf189 = reinterpret_tensor(buf185, (4, 4, 1), (4, 1, 16), 0)
        del buf185
        triton_poi_fused_bmm_3[grid(16)](buf187, buf189, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf190 = reinterpret_tensor(buf184, (4, 1, 4), (4, 16, 1), 0)
        del buf184
        triton_poi_fused_bmm_3[grid(16)](buf188, buf190, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf191 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf189, buf190, out=buf191)
        buf192 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf186, buf192, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf193 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf191, buf193, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf196 = reinterpret_tensor(buf190, (4, 4, 1), (4, 1, 16), 0)
        del buf190
        triton_poi_fused_bmm_6[grid(16)](buf182, buf196, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf197 = reinterpret_tensor(buf189, (4, 1, 4), (4, 16, 1), 0)
        del buf189
        triton_poi_fused_bmm_6[grid(16)](buf183, buf197, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf198 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf196, buf197, out=buf198)
        buf199 = reinterpret_tensor(buf197, (4, 4, 1), (4, 1, 16), 0)
        del buf197
        triton_poi_fused_bmm_6[grid(16)](buf187, buf199, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf200 = reinterpret_tensor(buf196, (4, 1, 4), (4, 16, 1), 0)
        del buf196
        triton_poi_fused_bmm_6[grid(16)](buf188, buf200, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf201 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf199, buf200, out=buf201)
        buf202 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf198, buf202, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf203 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf201, buf203, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf204 = buf157
        del buf157
        triton_poi_fused_cat_21[grid(32)](buf192, buf194, buf202, buf204, 
            32, XBLOCK=32, num_warps=1, num_stages=1)
        buf205 = buf90
        del buf90
        triton_poi_fused_cat_21[grid(32)](buf193, buf195, buf203, buf205, 
            32, XBLOCK=32, num_warps=1, num_stages=1)
        buf206 = reinterpret_tensor(buf200, (4, 4, 1), (4, 1, 16), 0)
        del buf200
        triton_poi_fused_bmm_9[grid(16)](buf182, buf206, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf207 = reinterpret_tensor(buf199, (4, 1, 4), (4, 16, 1), 0)
        del buf199
        triton_poi_fused_bmm_9[grid(16)](buf183, buf207, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf208 = buf203
        del buf203
        extern_kernels.bmm(buf206, buf207, out=buf208)
        buf209 = reinterpret_tensor(buf207, (4, 4, 1), (4, 1, 16), 0)
        del buf207
        triton_poi_fused_bmm_9[grid(16)](buf187, buf209, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf210 = reinterpret_tensor(buf206, (4, 1, 4), (4, 16, 1), 0)
        del buf206
        triton_poi_fused_bmm_9[grid(16)](buf188, buf210, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf211 = buf193
        del buf193
        extern_kernels.bmm(buf209, buf210, out=buf211)
        buf212 = buf202
        del buf202
        triton_poi_fused__softmax_5[grid(64)](buf208, buf212, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf213 = buf192
        del buf192
        triton_poi_fused__softmax_5[grid(64)](buf211, buf213, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf214 = buf162
        del buf162
        triton_poi_fused_cat_22[grid(48)](buf204, buf212, buf194, buf214, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf215 = buf100
        del buf100
        triton_poi_fused_cat_22[grid(48)](buf205, buf213, buf195, buf215, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf216 = reinterpret_tensor(buf210, (4, 4, 1), (4, 1, 16), 0)
        del buf210
        triton_poi_fused_bmm_12[grid(16)](buf182, buf216, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf217 = reinterpret_tensor(buf209, (4, 1, 4), (4, 16, 1), 0)
        del buf209
        triton_poi_fused_bmm_12[grid(16)](buf183, buf217, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf218 = buf213
        del buf213
        extern_kernels.bmm(buf216, buf217, out=buf218)
        buf219 = reinterpret_tensor(buf217, (4, 4, 1), (4, 1, 16), 0)
        del buf217
        triton_poi_fused_bmm_12[grid(16)](buf187, buf219, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf220 = reinterpret_tensor(buf216, (4, 1, 4), (4, 16, 1), 0)
        del buf216
        triton_poi_fused_bmm_12[grid(16)](buf188, buf220, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf221 = buf212
        del buf212
        extern_kernels.bmm(buf219, buf220, out=buf221)
        buf222 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf218, buf222, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf223 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf221, buf223, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf224 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf226 = buf224
        del buf224
        triton_poi_fused_add_cat_23[grid(64)](buf226, buf214, buf222,
            buf194, buf176, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf225 = buf222
        del buf222
        buf228 = buf225
        del buf225
        triton_poi_fused_add_cat_23[grid(64)](buf228, buf215, buf223,
            buf195, buf178, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf227 = reinterpret_tensor(buf223, (16, 4), (4, 1), 0)
        del buf223
        extern_kernels.mm(reinterpret_tensor(buf226, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_27, (4, 4), (1, 4), 0), out=buf227)
        buf229 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf228, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_29, (4, 4), (1, 4), 0), out=buf229)
        buf230 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf283 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        buf282 = reinterpret_tensor(buf283, (4, 4, 4), (32, 8, 1), 0)
        triton_poi_fused_add_cat_relu_24[grid(64)](buf227, primals_28,
            buf170, primals_18, buf116, buf230, buf282, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf231 = empty_strided_cuda((16, 8), (8, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf230, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_7, (4, 8), (1, 4), 0), out=buf231)
        buf232 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf256 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        buf255 = reinterpret_tensor(buf256, (4, 4, 4), (32, 8, 1), 0)
        triton_poi_fused_add_cat_relu_25[grid(64)](buf229, primals_30,
            buf144, buf118, buf232, buf255, 64, XBLOCK=64, num_warps=1,
            num_stages=1)
        buf233 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf232, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_9, (4, 4), (1, 4), 0), out=buf233)
        buf234 = reinterpret_tensor(buf233, (4, 4, 4), (16, 4, 1), 0)
        del buf233
        buf480 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_1[grid(64)](buf234,
            primals_10, buf480, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf235 = reinterpret_tensor(buf231, (4, 4, 8), (32, 8, 1), 0)
        del buf231
        buf481 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_2[grid(128)](buf235,
            primals_8, buf481, 128, XBLOCK=128, num_warps=4, num_stages=1)
        buf236 = reinterpret_tensor(buf220, (4, 4, 1), (4, 1, 16), 0)
        del buf220
        triton_poi_fused_bmm_3[grid(16)](buf234, buf236, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf237 = reinterpret_tensor(buf219, (4, 1, 4), (4, 16, 1), 0)
        del buf219
        triton_poi_fused_bmm_4[grid(16)](buf235, buf237, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf238 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf236, buf237, out=buf238)
        buf239 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf238, buf239, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf240 = reinterpret_tensor(buf237, (4, 4, 1), (4, 1, 16), 0)
        del buf237
        triton_poi_fused_bmm_6[grid(16)](buf234, buf240, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf241 = reinterpret_tensor(buf236, (4, 1, 4), (4, 16, 1), 0)
        del buf236
        triton_poi_fused_bmm_7[grid(16)](buf235, buf241, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf242 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf240, buf241, out=buf242)
        buf243 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf242, buf243, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf244 = buf205
        del buf205
        triton_poi_fused_cat_8[grid(32)](buf239, buf235, buf243, buf244, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf245 = reinterpret_tensor(buf241, (4, 4, 1), (4, 1, 16), 0)
        del buf241
        triton_poi_fused_bmm_9[grid(16)](buf234, buf245, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf246 = reinterpret_tensor(buf240, (4, 1, 4), (4, 16, 1), 0)
        del buf240
        triton_poi_fused_bmm_10[grid(16)](buf235, buf246, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf247 = buf243
        del buf243
        extern_kernels.bmm(buf245, buf246, out=buf247)
        buf248 = buf239
        del buf239
        triton_poi_fused__softmax_5[grid(64)](buf247, buf248, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf249 = buf215
        del buf215
        triton_poi_fused_cat_11[grid(48)](buf244, buf248, buf235, buf249, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf250 = reinterpret_tensor(buf246, (4, 4, 1), (4, 1, 16), 0)
        del buf246
        triton_poi_fused_bmm_12[grid(16)](buf234, buf250, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf251 = reinterpret_tensor(buf245, (4, 1, 4), (4, 16, 1), 0)
        del buf245
        triton_poi_fused_bmm_13[grid(16)](buf235, buf251, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf252 = buf248
        del buf248
        extern_kernels.bmm(buf250, buf251, out=buf252)
        buf253 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf252, buf253, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf254 = reinterpret_tensor(buf256, (4, 4, 4), (32, 8, 1), 4)
        triton_poi_fused_cat_14[grid(64)](buf249, buf253, buf235, buf254, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf257 = reinterpret_tensor(buf253, (16, 4), (4, 1), 0)
        del buf253
        extern_kernels.mm(reinterpret_tensor(buf256, (16, 8), (8, 1), 0),
            reinterpret_tensor(primals_11, (8, 4), (1, 8), 0), out=buf257)
        buf258 = reinterpret_tensor(buf257, (4, 4, 4), (16, 4, 1), 0)
        del buf257
        buf292 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_relu_15[grid(64)](buf258, primals_12, buf232,
            buf292, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf259 = empty_strided_cuda((16, 8), (8, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf258, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_13, (4, 8), (1, 4), 0), out=buf259)
        buf260 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf230, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_15, (4, 4), (1, 4), 0), out=buf260)
        buf261 = reinterpret_tensor(buf260, (4, 4, 4), (16, 4, 1), 0)
        del buf260
        buf477 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_1[grid(64)](buf261,
            primals_16, buf477, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf262 = reinterpret_tensor(buf259, (4, 4, 8), (32, 8, 1), 0)
        del buf259
        buf478 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_2[grid(128)](buf262,
            primals_14, buf478, 128, XBLOCK=128, num_warps=4, num_stages=1)
        buf263 = reinterpret_tensor(buf251, (4, 4, 1), (4, 1, 16), 0)
        del buf251
        triton_poi_fused_bmm_3[grid(16)](buf261, buf263, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf264 = reinterpret_tensor(buf250, (4, 1, 4), (4, 16, 1), 0)
        del buf250
        triton_poi_fused_bmm_4[grid(16)](buf262, buf264, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf265 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf263, buf264, out=buf265)
        buf266 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf265, buf266, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf267 = reinterpret_tensor(buf264, (4, 4, 1), (4, 1, 16), 0)
        del buf264
        triton_poi_fused_bmm_6[grid(16)](buf261, buf267, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf268 = reinterpret_tensor(buf263, (4, 1, 4), (4, 16, 1), 0)
        del buf263
        triton_poi_fused_bmm_7[grid(16)](buf262, buf268, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf269 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf267, buf268, out=buf269)
        buf270 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf269, buf270, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf271 = buf244
        del buf244
        triton_poi_fused_cat_8[grid(32)](buf266, buf262, buf270, buf271, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf272 = reinterpret_tensor(buf268, (4, 4, 1), (4, 1, 16), 0)
        del buf268
        triton_poi_fused_bmm_9[grid(16)](buf261, buf272, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf273 = reinterpret_tensor(buf267, (4, 1, 4), (4, 16, 1), 0)
        del buf267
        triton_poi_fused_bmm_10[grid(16)](buf262, buf273, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf274 = buf270
        del buf270
        extern_kernels.bmm(buf272, buf273, out=buf274)
        buf275 = buf266
        del buf266
        triton_poi_fused__softmax_5[grid(64)](buf274, buf275, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf276 = buf249
        del buf249
        triton_poi_fused_cat_11[grid(48)](buf271, buf275, buf262, buf276, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf277 = reinterpret_tensor(buf273, (4, 4, 1), (4, 1, 16), 0)
        del buf273
        triton_poi_fused_bmm_12[grid(16)](buf261, buf277, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf278 = reinterpret_tensor(buf272, (4, 1, 4), (4, 16, 1), 0)
        del buf272
        triton_poi_fused_bmm_13[grid(16)](buf262, buf278, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf279 = buf275
        del buf275
        extern_kernels.bmm(buf277, buf278, out=buf279)
        buf280 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf279, buf280, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf281 = reinterpret_tensor(buf283, (4, 4, 4), (32, 8, 1), 4)
        triton_poi_fused_cat_14[grid(64)](buf276, buf280, buf262, buf281, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf284 = reinterpret_tensor(buf280, (16, 4), (4, 1), 0)
        del buf280
        extern_kernels.mm(reinterpret_tensor(buf283, (16, 8), (8, 1), 0),
            reinterpret_tensor(primals_17, (8, 4), (1, 8), 0), out=buf284)
        buf285 = reinterpret_tensor(buf278, (4, 4), (4, 1), 0)
        del buf278
        buf286 = buf285
        del buf285
        triton_poi_fused_add_div_relu_sum_16[grid(16)](buf286, buf284,
            primals_18, buf230, 16, XBLOCK=16, num_warps=1, num_stages=1)
        buf287 = reinterpret_tensor(buf277, (4, 4), (4, 1), 0)
        del buf277
        triton_poi_fused_add_div_sum_17[grid(16)](buf258, buf232, buf287, 
            16, XBLOCK=16, num_warps=1, num_stages=1)
        buf288 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_20, buf286, reinterpret_tensor(
            primals_19, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf288)
        buf289 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_22, buf287, reinterpret_tensor(
            primals_21, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf289)
        buf290 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_relu_18[grid(64)](buf284, primals_18, buf230,
            buf290, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf291 = empty_strided_cuda((16, 12), (12, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf290, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_23, (4, 12), (1, 4), 0), out=buf291)
        buf293 = empty_strided_cuda((16, 12), (12, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf292, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_25, (4, 12), (1, 4), 0), out=buf293)
        buf294 = reinterpret_tensor(buf291, (4, 4, 12), (48, 12, 1), 0)
        del buf291
        buf475 = empty_strided_cuda((4, 4, 12), (48, 12, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_19[grid(192)](buf294,
            primals_24, buf475, 192, XBLOCK=128, num_warps=4, num_stages=1)
        buf295 = reinterpret_tensor(buf293, (4, 4, 12), (48, 12, 1), 0)
        del buf293
        buf474 = empty_strided_cuda((4, 4, 12), (48, 12, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_19[grid(192)](buf295,
            primals_26, buf474, 192, XBLOCK=128, num_warps=4, num_stages=1)
        buf296 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf297 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf308 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_20[grid(64)](buf289, buf294, buf296,
            buf297, buf308, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf298 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf296, buf298, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf299 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf297, buf299, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf300 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf298, buf299, out=buf300)
        buf301 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf302 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf309 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_20[grid(64)](buf288, buf295, buf301,
            buf302, buf309, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf303 = reinterpret_tensor(buf299, (4, 4, 1), (4, 1, 16), 0)
        del buf299
        triton_poi_fused_bmm_3[grid(16)](buf301, buf303, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf304 = reinterpret_tensor(buf298, (4, 1, 4), (4, 16, 1), 0)
        del buf298
        triton_poi_fused_bmm_3[grid(16)](buf302, buf304, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf305 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf303, buf304, out=buf305)
        buf306 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf300, buf306, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf307 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf305, buf307, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf310 = reinterpret_tensor(buf304, (4, 4, 1), (4, 1, 16), 0)
        del buf304
        triton_poi_fused_bmm_6[grid(16)](buf296, buf310, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf311 = reinterpret_tensor(buf303, (4, 1, 4), (4, 16, 1), 0)
        del buf303
        triton_poi_fused_bmm_6[grid(16)](buf297, buf311, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf312 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf310, buf311, out=buf312)
        buf313 = reinterpret_tensor(buf311, (4, 4, 1), (4, 1, 16), 0)
        del buf311
        triton_poi_fused_bmm_6[grid(16)](buf301, buf313, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf314 = reinterpret_tensor(buf310, (4, 1, 4), (4, 16, 1), 0)
        del buf310
        triton_poi_fused_bmm_6[grid(16)](buf302, buf314, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf315 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf313, buf314, out=buf315)
        buf316 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf312, buf316, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf317 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf315, buf317, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf318 = buf271
        del buf271
        triton_poi_fused_cat_21[grid(32)](buf306, buf308, buf316, buf318, 
            32, XBLOCK=32, num_warps=1, num_stages=1)
        buf319 = buf204
        del buf204
        triton_poi_fused_cat_21[grid(32)](buf307, buf309, buf317, buf319, 
            32, XBLOCK=32, num_warps=1, num_stages=1)
        buf320 = reinterpret_tensor(buf314, (4, 4, 1), (4, 1, 16), 0)
        del buf314
        triton_poi_fused_bmm_9[grid(16)](buf296, buf320, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf321 = reinterpret_tensor(buf313, (4, 1, 4), (4, 16, 1), 0)
        del buf313
        triton_poi_fused_bmm_9[grid(16)](buf297, buf321, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf322 = buf317
        del buf317
        extern_kernels.bmm(buf320, buf321, out=buf322)
        buf323 = reinterpret_tensor(buf321, (4, 4, 1), (4, 1, 16), 0)
        del buf321
        triton_poi_fused_bmm_9[grid(16)](buf301, buf323, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf324 = reinterpret_tensor(buf320, (4, 1, 4), (4, 16, 1), 0)
        del buf320
        triton_poi_fused_bmm_9[grid(16)](buf302, buf324, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf325 = buf307
        del buf307
        extern_kernels.bmm(buf323, buf324, out=buf325)
        buf326 = buf316
        del buf316
        triton_poi_fused__softmax_5[grid(64)](buf322, buf326, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf327 = buf306
        del buf306
        triton_poi_fused__softmax_5[grid(64)](buf325, buf327, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf328 = buf276
        del buf276
        triton_poi_fused_cat_22[grid(48)](buf318, buf326, buf308, buf328, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf329 = buf214
        del buf214
        triton_poi_fused_cat_22[grid(48)](buf319, buf327, buf309, buf329, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf330 = reinterpret_tensor(buf324, (4, 4, 1), (4, 1, 16), 0)
        del buf324
        triton_poi_fused_bmm_12[grid(16)](buf296, buf330, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf331 = reinterpret_tensor(buf323, (4, 1, 4), (4, 16, 1), 0)
        del buf323
        triton_poi_fused_bmm_12[grid(16)](buf297, buf331, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf332 = buf327
        del buf327
        extern_kernels.bmm(buf330, buf331, out=buf332)
        buf333 = reinterpret_tensor(buf331, (4, 4, 1), (4, 1, 16), 0)
        del buf331
        triton_poi_fused_bmm_12[grid(16)](buf301, buf333, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf334 = reinterpret_tensor(buf330, (4, 1, 4), (4, 16, 1), 0)
        del buf330
        triton_poi_fused_bmm_12[grid(16)](buf302, buf334, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf335 = buf326
        del buf326
        extern_kernels.bmm(buf333, buf334, out=buf335)
        buf336 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf332, buf336, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf337 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf335, buf337, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf338 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf340 = buf338
        del buf338
        triton_poi_fused_add_cat_23[grid(64)](buf340, buf328, buf336,
            buf308, buf290, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf339 = buf336
        del buf336
        buf342 = buf339
        del buf339
        triton_poi_fused_add_cat_23[grid(64)](buf342, buf329, buf337,
            buf309, buf292, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf341 = reinterpret_tensor(buf337, (16, 4), (4, 1), 0)
        del buf337
        extern_kernels.mm(reinterpret_tensor(buf340, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_27, (4, 4), (1, 4), 0), out=buf341)
        buf343 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf342, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_29, (4, 4), (1, 4), 0), out=buf343)
        buf344 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf397 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        buf396 = reinterpret_tensor(buf397, (4, 4, 4), (32, 8, 1), 0)
        triton_poi_fused_add_cat_relu_24[grid(64)](buf341, primals_28,
            buf284, primals_18, buf230, buf344, buf396, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf345 = empty_strided_cuda((16, 8), (8, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf344, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_7, (4, 8), (1, 4), 0), out=buf345)
        buf346 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf370 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.float32)
        buf369 = reinterpret_tensor(buf370, (4, 4, 4), (32, 8, 1), 0)
        triton_poi_fused_add_cat_relu_25[grid(64)](buf343, primals_30,
            buf258, buf232, buf346, buf369, 64, XBLOCK=64, num_warps=1,
            num_stages=1)
        buf347 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf346, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_9, (4, 4), (1, 4), 0), out=buf347)
        buf348 = reinterpret_tensor(buf347, (4, 4, 4), (16, 4, 1), 0)
        del buf347
        buf470 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_1[grid(64)](buf348,
            primals_10, buf470, 64, XBLOCK=64, num_warps=1, num_stages=1)
        del primals_10
        buf349 = reinterpret_tensor(buf345, (4, 4, 8), (32, 8, 1), 0)
        del buf345
        buf471 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_2[grid(128)](buf349,
            primals_8, buf471, 128, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_8
        buf350 = reinterpret_tensor(buf334, (4, 4, 1), (4, 1, 16), 0)
        del buf334
        triton_poi_fused_bmm_3[grid(16)](buf348, buf350, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf351 = reinterpret_tensor(buf333, (4, 1, 4), (4, 16, 1), 0)
        del buf333
        triton_poi_fused_bmm_4[grid(16)](buf349, buf351, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf352 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf350, buf351, out=buf352)
        buf353 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf352, buf353, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf354 = reinterpret_tensor(buf351, (4, 4, 1), (4, 1, 16), 0)
        del buf351
        triton_poi_fused_bmm_6[grid(16)](buf348, buf354, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf355 = reinterpret_tensor(buf350, (4, 1, 4), (4, 16, 1), 0)
        del buf350
        triton_poi_fused_bmm_7[grid(16)](buf349, buf355, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf356 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf354, buf355, out=buf356)
        buf357 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf356, buf357, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf358 = buf319
        del buf319
        triton_poi_fused_cat_8[grid(32)](buf353, buf349, buf357, buf358, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf359 = reinterpret_tensor(buf355, (4, 4, 1), (4, 1, 16), 0)
        del buf355
        triton_poi_fused_bmm_9[grid(16)](buf348, buf359, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf360 = reinterpret_tensor(buf354, (4, 1, 4), (4, 16, 1), 0)
        del buf354
        triton_poi_fused_bmm_10[grid(16)](buf349, buf360, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf361 = buf357
        del buf357
        extern_kernels.bmm(buf359, buf360, out=buf361)
        buf362 = buf353
        del buf353
        triton_poi_fused__softmax_5[grid(64)](buf361, buf362, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf363 = buf329
        del buf329
        triton_poi_fused_cat_11[grid(48)](buf358, buf362, buf349, buf363, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf364 = reinterpret_tensor(buf360, (4, 4, 1), (4, 1, 16), 0)
        del buf360
        triton_poi_fused_bmm_12[grid(16)](buf348, buf364, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf365 = reinterpret_tensor(buf359, (4, 1, 4), (4, 16, 1), 0)
        del buf359
        triton_poi_fused_bmm_13[grid(16)](buf349, buf365, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf366 = buf362
        del buf362
        extern_kernels.bmm(buf364, buf365, out=buf366)
        buf367 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf366, buf367, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf368 = reinterpret_tensor(buf370, (4, 4, 4), (32, 8, 1), 4)
        triton_poi_fused_cat_14[grid(64)](buf363, buf367, buf349, buf368, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf371 = reinterpret_tensor(buf367, (16, 4), (4, 1), 0)
        del buf367
        extern_kernels.mm(reinterpret_tensor(buf370, (16, 8), (8, 1), 0),
            reinterpret_tensor(primals_11, (8, 4), (1, 8), 0), out=buf371)
        buf372 = reinterpret_tensor(buf371, (4, 4, 4), (16, 4, 1), 0)
        del buf371
        buf406 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_relu_15[grid(64)](buf372, primals_12, buf346,
            buf406, 64, XBLOCK=64, num_warps=1, num_stages=1)
        del primals_12
        buf373 = empty_strided_cuda((16, 8), (8, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf372, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_13, (4, 8), (1, 4), 0), out=buf373)
        buf374 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf344, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_15, (4, 4), (1, 4), 0), out=buf374)
        buf375 = reinterpret_tensor(buf374, (4, 4, 4), (16, 4, 1), 0)
        del buf374
        buf467 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_1[grid(64)](buf375,
            primals_16, buf467, 64, XBLOCK=64, num_warps=1, num_stages=1)
        del primals_16
        buf376 = reinterpret_tensor(buf373, (4, 4, 8), (32, 8, 1), 0)
        del buf373
        buf468 = empty_strided_cuda((4, 4, 8), (32, 8, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_2[grid(128)](buf376,
            primals_14, buf468, 128, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_14
        buf377 = reinterpret_tensor(buf365, (4, 4, 1), (4, 1, 16), 0)
        del buf365
        triton_poi_fused_bmm_3[grid(16)](buf375, buf377, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf378 = reinterpret_tensor(buf364, (4, 1, 4), (4, 16, 1), 0)
        del buf364
        triton_poi_fused_bmm_4[grid(16)](buf376, buf378, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf379 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf377, buf378, out=buf379)
        buf380 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf379, buf380, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf381 = reinterpret_tensor(buf378, (4, 4, 1), (4, 1, 16), 0)
        del buf378
        triton_poi_fused_bmm_6[grid(16)](buf375, buf381, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf382 = reinterpret_tensor(buf377, (4, 1, 4), (4, 16, 1), 0)
        del buf377
        triton_poi_fused_bmm_7[grid(16)](buf376, buf382, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf383 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf381, buf382, out=buf383)
        buf384 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf383, buf384, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf385 = buf358
        del buf358
        triton_poi_fused_cat_8[grid(32)](buf380, buf376, buf384, buf385, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf386 = reinterpret_tensor(buf382, (4, 4, 1), (4, 1, 16), 0)
        del buf382
        triton_poi_fused_bmm_9[grid(16)](buf375, buf386, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf387 = reinterpret_tensor(buf381, (4, 1, 4), (4, 16, 1), 0)
        del buf381
        triton_poi_fused_bmm_10[grid(16)](buf376, buf387, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf388 = buf384
        del buf384
        extern_kernels.bmm(buf386, buf387, out=buf388)
        buf389 = buf380
        del buf380
        triton_poi_fused__softmax_5[grid(64)](buf388, buf389, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf390 = buf363
        del buf363
        triton_poi_fused_cat_11[grid(48)](buf385, buf389, buf376, buf390, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        buf391 = reinterpret_tensor(buf387, (4, 4, 1), (4, 1, 16), 0)
        del buf387
        triton_poi_fused_bmm_12[grid(16)](buf375, buf391, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf392 = reinterpret_tensor(buf386, (4, 1, 4), (4, 16, 1), 0)
        del buf386
        triton_poi_fused_bmm_13[grid(16)](buf376, buf392, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf393 = buf389
        del buf389
        extern_kernels.bmm(buf391, buf392, out=buf393)
        buf394 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf393, buf394, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf395 = reinterpret_tensor(buf397, (4, 4, 4), (32, 8, 1), 4)
        triton_poi_fused_cat_14[grid(64)](buf390, buf394, buf376, buf395, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        buf398 = reinterpret_tensor(buf394, (16, 4), (4, 1), 0)
        del buf394
        extern_kernels.mm(reinterpret_tensor(buf397, (16, 8), (8, 1), 0),
            reinterpret_tensor(primals_17, (8, 4), (1, 8), 0), out=buf398)
        buf399 = reinterpret_tensor(buf392, (4, 4), (4, 1), 0)
        del buf392
        buf400 = buf399
        del buf399
        triton_poi_fused_add_div_relu_sum_16[grid(16)](buf400, buf398,
            primals_18, buf344, 16, XBLOCK=16, num_warps=1, num_stages=1)
        buf401 = reinterpret_tensor(buf391, (4, 4), (4, 1), 0)
        del buf391
        triton_poi_fused_add_div_sum_17[grid(16)](buf372, buf346, buf401, 
            16, XBLOCK=16, num_warps=1, num_stages=1)
        buf402 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_20, buf400, reinterpret_tensor(
            primals_19, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf402)
        del primals_20
        buf403 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_22, buf401, reinterpret_tensor(
            primals_21, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf403)
        del primals_22
        buf404 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_relu_18[grid(64)](buf398, primals_18, buf344,
            buf404, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf405 = empty_strided_cuda((16, 12), (12, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf404, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_23, (4, 12), (1, 4), 0), out=buf405)
        buf407 = empty_strided_cuda((16, 12), (12, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf406, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_25, (4, 12), (1, 4), 0), out=buf407)
        buf408 = reinterpret_tensor(buf405, (4, 4, 12), (48, 12, 1), 0)
        del buf405
        buf465 = empty_strided_cuda((4, 4, 12), (48, 12, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_19[grid(192)](buf408,
            primals_24, buf465, 192, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_24
        buf409 = reinterpret_tensor(buf407, (4, 4, 12), (48, 12, 1), 0)
        del buf407
        buf464 = empty_strided_cuda((4, 4, 12), (48, 12, 1), torch.bool)
        triton_poi_fused_relu_threshold_backward_19[grid(192)](buf409,
            primals_26, buf464, 192, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_26
        buf410 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf411 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf422 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_20[grid(64)](buf403, buf408, buf410,
            buf411, buf422, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf412 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf410, buf412, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf413 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        triton_poi_fused_bmm_3[grid(16)](buf411, buf413, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf414 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf412, buf413, out=buf414)
        buf415 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf416 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf423 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_add_mul_20[grid(64)](buf402, buf409, buf415,
            buf416, buf423, 64, XBLOCK=64, num_warps=1, num_stages=1)
        buf417 = reinterpret_tensor(buf413, (4, 4, 1), (4, 1, 16), 0)
        del buf413
        triton_poi_fused_bmm_3[grid(16)](buf415, buf417, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf418 = reinterpret_tensor(buf412, (4, 1, 4), (4, 16, 1), 0)
        del buf412
        triton_poi_fused_bmm_3[grid(16)](buf416, buf418, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf419 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf417, buf418, out=buf419)
        buf420 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf414, buf420, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf421 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf419, buf421, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf424 = reinterpret_tensor(buf418, (4, 4, 1), (4, 1, 16), 0)
        del buf418
        triton_poi_fused_bmm_6[grid(16)](buf410, buf424, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf425 = reinterpret_tensor(buf417, (4, 1, 4), (4, 16, 1), 0)
        del buf417
        triton_poi_fused_bmm_6[grid(16)](buf411, buf425, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf426 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf424, buf425, out=buf426)
        buf427 = reinterpret_tensor(buf425, (4, 4, 1), (4, 1, 16), 0)
        del buf425
        triton_poi_fused_bmm_6[grid(16)](buf415, buf427, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf428 = reinterpret_tensor(buf424, (4, 1, 4), (4, 16, 1), 0)
        del buf424
        triton_poi_fused_bmm_6[grid(16)](buf416, buf428, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf429 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        extern_kernels.bmm(buf427, buf428, out=buf429)
        buf430 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf426, buf430, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf431 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf429, buf431, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf432 = buf385
        del buf385
        triton_poi_fused_cat_21[grid(32)](buf420, buf422, buf430, buf432, 
            32, XBLOCK=32, num_warps=1, num_stages=1)
        buf433 = buf318
        del buf318
        triton_poi_fused_cat_21[grid(32)](buf421, buf423, buf431, buf433, 
            32, XBLOCK=32, num_warps=1, num_stages=1)
        buf434 = reinterpret_tensor(buf428, (4, 4, 1), (4, 1, 16), 0)
        del buf428
        triton_poi_fused_bmm_9[grid(16)](buf410, buf434, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf435 = reinterpret_tensor(buf427, (4, 1, 4), (4, 16, 1), 0)
        del buf427
        triton_poi_fused_bmm_9[grid(16)](buf411, buf435, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf436 = buf431
        del buf431
        extern_kernels.bmm(buf434, buf435, out=buf436)
        buf437 = reinterpret_tensor(buf435, (4, 4, 1), (4, 1, 16), 0)
        del buf435
        triton_poi_fused_bmm_9[grid(16)](buf415, buf437, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf438 = reinterpret_tensor(buf434, (4, 1, 4), (4, 16, 1), 0)
        del buf434
        triton_poi_fused_bmm_9[grid(16)](buf416, buf438, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf439 = buf421
        del buf421
        extern_kernels.bmm(buf437, buf438, out=buf439)
        buf440 = buf430
        del buf430
        triton_poi_fused__softmax_5[grid(64)](buf436, buf440, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf441 = buf420
        del buf420
        triton_poi_fused__softmax_5[grid(64)](buf439, buf441, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf442 = buf390
        del buf390
        triton_poi_fused_cat_22[grid(48)](buf432, buf440, buf422, buf442, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        del buf432
        buf443 = buf328
        del buf328
        triton_poi_fused_cat_22[grid(48)](buf433, buf441, buf423, buf443, 
            48, XBLOCK=64, num_warps=1, num_stages=1)
        del buf433
        buf444 = reinterpret_tensor(buf438, (4, 4, 1), (4, 1, 16), 0)
        del buf438
        triton_poi_fused_bmm_12[grid(16)](buf410, buf444, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf445 = reinterpret_tensor(buf437, (4, 1, 4), (4, 16, 1), 0)
        del buf437
        triton_poi_fused_bmm_12[grid(16)](buf411, buf445, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf446 = buf441
        del buf441
        extern_kernels.bmm(buf444, buf445, out=buf446)
        buf447 = reinterpret_tensor(buf445, (4, 4, 1), (4, 1, 16), 0)
        del buf445
        triton_poi_fused_bmm_12[grid(16)](buf415, buf447, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf448 = reinterpret_tensor(buf444, (4, 1, 4), (4, 16, 1), 0)
        del buf444
        triton_poi_fused_bmm_12[grid(16)](buf416, buf448, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf449 = buf440
        del buf440
        extern_kernels.bmm(buf447, buf448, out=buf449)
        del buf447
        del buf448
        buf450 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf446, buf450, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf451 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused__softmax_5[grid(64)](buf449, buf451, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf452 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf454 = buf452
        del buf452
        triton_poi_fused_add_cat_23[grid(64)](buf454, buf442, buf450,
            buf422, buf404, 64, XBLOCK=64, num_warps=1, num_stages=1)
        del buf442
        buf453 = buf450
        del buf450
        buf456 = buf453
        del buf453
        triton_poi_fused_add_cat_23[grid(64)](buf456, buf443, buf451,
            buf423, buf406, 64, XBLOCK=64, num_warps=1, num_stages=1)
        del buf443
        buf455 = reinterpret_tensor(buf451, (16, 4), (4, 1), 0)
        del buf451
        extern_kernels.mm(reinterpret_tensor(buf454, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_27, (4, 4), (1, 4), 0), out=buf455)
        buf457 = empty_strided_cuda((16, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf456, (16, 4), (4, 1), 0),
            reinterpret_tensor(primals_29, (4, 4), (1, 4), 0), out=buf457)
        buf458 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        buf459 = buf458
        del buf458
        buf463 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf466 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf473 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf476 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf483 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf486 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf493 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf496 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf503 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_add_relu_threshold_backward_26[grid(64)](buf459,
            buf2, buf56, primals_18, buf113, primals_28, buf170, buf227,
            buf284, buf341, buf398, buf455, buf463, buf466, buf473, buf476,
            buf483, buf486, buf493, buf496, buf503, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        del buf113
        del buf170
        del buf227
        del buf284
        del buf341
        del buf398
        del buf455
        del primals_18
        del primals_28
        buf460 = reinterpret_tensor(buf56, (4, 4, 4), (16, 4, 1), 0)
        del buf56
        buf461 = buf460
        del buf460
        buf462 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf472 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf482 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf492 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf469 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf479 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf489 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf499 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        buf502 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_add_relu_threshold_backward_27[grid(64)](buf461,
            buf4, buf30, buf115, primals_30, buf144, buf229, buf258, buf343,
            buf372, buf457, buf462, buf472, buf482, buf492, buf469, buf479,
            buf489, buf499, buf502, 64, XBLOCK=64, num_warps=1, num_stages=1)
        del buf115
        del buf229
        del buf343
        del buf457
        del primals_30
    return (buf459, buf461, reinterpret_tensor(primals_3, (16, 4), (4, 1), 
        0), reinterpret_tensor(primals_6, (16, 4), (4, 1), 0),
        reinterpret_tensor(buf2, (16, 4), (4, 1), 0), reinterpret_tensor(
        buf4, (16, 4), (4, 1), 0), buf10, reinterpret_tensor(buf7, (4, 1, 4,
        1), (32, 32, 8, 1), 4), buf14, reinterpret_tensor(buf7, (4, 1, 4, 1
        ), (32, 32, 8, 1), 5), buf19, reinterpret_tensor(buf7, (4, 1, 4, 1),
        (32, 32, 8, 1), 6), buf24, reinterpret_tensor(buf7, (4, 1, 4, 1), (
        32, 32, 8, 1), 7), reinterpret_tensor(buf28, (16, 8), (8, 1), 0),
        reinterpret_tensor(buf30, (16, 4), (4, 1), 0), buf37,
        reinterpret_tensor(buf34, (4, 1, 4, 1), (32, 32, 8, 1), 4), buf41,
        reinterpret_tensor(buf34, (4, 1, 4, 1), (32, 32, 8, 1), 5), buf46,
        reinterpret_tensor(buf34, (4, 1, 4, 1), (32, 32, 8, 1), 6), buf51,
        reinterpret_tensor(buf34, (4, 1, 4, 1), (32, 32, 8, 1), 7),
        reinterpret_tensor(buf55, (16, 8), (8, 1), 0), buf58, buf59, buf60,
        buf61, reinterpret_tensor(buf62, (16, 4), (4, 1), 0),
        reinterpret_tensor(buf64, (16, 4), (4, 1), 0), reinterpret_tensor(
        buf66, (4, 4, 4), (48, 12, 1), 0), reinterpret_tensor(buf66, (4, 4,
        4), (48, 12, 1), 4), reinterpret_tensor(buf66, (4, 4, 4), (48, 12, 
        1), 8), reinterpret_tensor(buf67, (4, 4, 4), (48, 12, 1), 0),
        reinterpret_tensor(buf67, (4, 4, 4), (48, 12, 1), 4),
        reinterpret_tensor(buf67, (4, 4, 4), (48, 12, 1), 8), buf72, buf77,
        reinterpret_tensor(buf80, (4, 1, 4, 1), (16, 16, 4, 1), 0),
        reinterpret_tensor(buf81, (4, 1, 4, 1), (16, 16, 4, 1), 0), buf84,
        buf87, reinterpret_tensor(buf80, (4, 1, 4, 1), (16, 16, 4, 1), 1),
        reinterpret_tensor(buf81, (4, 1, 4, 1), (16, 16, 4, 1), 1), buf94,
        buf97, reinterpret_tensor(buf80, (4, 1, 4, 1), (16, 16, 4, 1), 2),
        reinterpret_tensor(buf81, (4, 1, 4, 1), (16, 16, 4, 1), 2), buf104,
        buf107, reinterpret_tensor(buf80, (4, 1, 4, 1), (16, 16, 4, 1), 3),
        reinterpret_tensor(buf81, (4, 1, 4, 1), (16, 16, 4, 1), 3),
        reinterpret_tensor(buf112, (16, 4), (4, 1), 0), reinterpret_tensor(
        buf114, (16, 4), (4, 1), 0), reinterpret_tensor(buf116, (16, 4), (4,
        1), 0), reinterpret_tensor(buf118, (16, 4), (4, 1), 0), buf124,
        reinterpret_tensor(buf121, (4, 1, 4, 1), (32, 32, 8, 1), 4), buf128,
        reinterpret_tensor(buf121, (4, 1, 4, 1), (32, 32, 8, 1), 5), buf133,
        reinterpret_tensor(buf121, (4, 1, 4, 1), (32, 32, 8, 1), 6), buf138,
        reinterpret_tensor(buf121, (4, 1, 4, 1), (32, 32, 8, 1), 7),
        reinterpret_tensor(buf142, (16, 8), (8, 1), 0), reinterpret_tensor(
        buf144, (16, 4), (4, 1), 0), buf151, reinterpret_tensor(buf148, (4,
        1, 4, 1), (32, 32, 8, 1), 4), buf155, reinterpret_tensor(buf148, (4,
        1, 4, 1), (32, 32, 8, 1), 5), buf160, reinterpret_tensor(buf148, (4,
        1, 4, 1), (32, 32, 8, 1), 6), buf165, reinterpret_tensor(buf148, (4,
        1, 4, 1), (32, 32, 8, 1), 7), reinterpret_tensor(buf169, (16, 8), (
        8, 1), 0), buf172, buf173, buf174, buf175, reinterpret_tensor(
        buf176, (16, 4), (4, 1), 0), reinterpret_tensor(buf178, (16, 4), (4,
        1), 0), reinterpret_tensor(buf180, (4, 4, 4), (48, 12, 1), 0),
        reinterpret_tensor(buf180, (4, 4, 4), (48, 12, 1), 4),
        reinterpret_tensor(buf180, (4, 4, 4), (48, 12, 1), 8),
        reinterpret_tensor(buf181, (4, 4, 4), (48, 12, 1), 0),
        reinterpret_tensor(buf181, (4, 4, 4), (48, 12, 1), 4),
        reinterpret_tensor(buf181, (4, 4, 4), (48, 12, 1), 8), buf186,
        buf191, reinterpret_tensor(buf194, (4, 1, 4, 1), (16, 16, 4, 1), 0),
        reinterpret_tensor(buf195, (4, 1, 4, 1), (16, 16, 4, 1), 0), buf198,
        buf201, reinterpret_tensor(buf194, (4, 1, 4, 1), (16, 16, 4, 1), 1),
        reinterpret_tensor(buf195, (4, 1, 4, 1), (16, 16, 4, 1), 1), buf208,
        buf211, reinterpret_tensor(buf194, (4, 1, 4, 1), (16, 16, 4, 1), 2),
        reinterpret_tensor(buf195, (4, 1, 4, 1), (16, 16, 4, 1), 2), buf218,
        buf221, reinterpret_tensor(buf194, (4, 1, 4, 1), (16, 16, 4, 1), 3),
        reinterpret_tensor(buf195, (4, 1, 4, 1), (16, 16, 4, 1), 3),
        reinterpret_tensor(buf226, (16, 4), (4, 1), 0), reinterpret_tensor(
        buf228, (16, 4), (4, 1), 0), reinterpret_tensor(buf230, (16, 4), (4,
        1), 0), reinterpret_tensor(buf232, (16, 4), (4, 1), 0), buf238,
        reinterpret_tensor(buf235, (4, 1, 4, 1), (32, 32, 8, 1), 4), buf242,
        reinterpret_tensor(buf235, (4, 1, 4, 1), (32, 32, 8, 1), 5), buf247,
        reinterpret_tensor(buf235, (4, 1, 4, 1), (32, 32, 8, 1), 6), buf252,
        reinterpret_tensor(buf235, (4, 1, 4, 1), (32, 32, 8, 1), 7),
        reinterpret_tensor(buf256, (16, 8), (8, 1), 0), reinterpret_tensor(
        buf258, (16, 4), (4, 1), 0), buf265, reinterpret_tensor(buf262, (4,
        1, 4, 1), (32, 32, 8, 1), 4), buf269, reinterpret_tensor(buf262, (4,
        1, 4, 1), (32, 32, 8, 1), 5), buf274, reinterpret_tensor(buf262, (4,
        1, 4, 1), (32, 32, 8, 1), 6), buf279, reinterpret_tensor(buf262, (4,
        1, 4, 1), (32, 32, 8, 1), 7), reinterpret_tensor(buf283, (16, 8), (
        8, 1), 0), buf286, buf287, buf288, buf289, reinterpret_tensor(
        buf290, (16, 4), (4, 1), 0), reinterpret_tensor(buf292, (16, 4), (4,
        1), 0), reinterpret_tensor(buf294, (4, 4, 4), (48, 12, 1), 0),
        reinterpret_tensor(buf294, (4, 4, 4), (48, 12, 1), 4),
        reinterpret_tensor(buf294, (4, 4, 4), (48, 12, 1), 8),
        reinterpret_tensor(buf295, (4, 4, 4), (48, 12, 1), 0),
        reinterpret_tensor(buf295, (4, 4, 4), (48, 12, 1), 4),
        reinterpret_tensor(buf295, (4, 4, 4), (48, 12, 1), 8), buf300,
        buf305, reinterpret_tensor(buf308, (4, 1, 4, 1), (16, 16, 4, 1), 0),
        reinterpret_tensor(buf309, (4, 1, 4, 1), (16, 16, 4, 1), 0), buf312,
        buf315, reinterpret_tensor(buf308, (4, 1, 4, 1), (16, 16, 4, 1), 1),
        reinterpret_tensor(buf309, (4, 1, 4, 1), (16, 16, 4, 1), 1), buf322,
        buf325, reinterpret_tensor(buf308, (4, 1, 4, 1), (16, 16, 4, 1), 2),
        reinterpret_tensor(buf309, (4, 1, 4, 1), (16, 16, 4, 1), 2), buf332,
        buf335, reinterpret_tensor(buf308, (4, 1, 4, 1), (16, 16, 4, 1), 3),
        reinterpret_tensor(buf309, (4, 1, 4, 1), (16, 16, 4, 1), 3),
        reinterpret_tensor(buf340, (16, 4), (4, 1), 0), reinterpret_tensor(
        buf342, (16, 4), (4, 1), 0), reinterpret_tensor(buf344, (16, 4), (4,
        1), 0), reinterpret_tensor(buf346, (16, 4), (4, 1), 0), buf352,
        reinterpret_tensor(buf349, (4, 1, 4, 1), (32, 32, 8, 1), 4), buf356,
        reinterpret_tensor(buf349, (4, 1, 4, 1), (32, 32, 8, 1), 5), buf361,
        reinterpret_tensor(buf349, (4, 1, 4, 1), (32, 32, 8, 1), 6), buf366,
        reinterpret_tensor(buf349, (4, 1, 4, 1), (32, 32, 8, 1), 7),
        reinterpret_tensor(buf370, (16, 8), (8, 1), 0), reinterpret_tensor(
        buf372, (16, 4), (4, 1), 0), buf379, reinterpret_tensor(buf376, (4,
        1, 4, 1), (32, 32, 8, 1), 4), buf383, reinterpret_tensor(buf376, (4,
        1, 4, 1), (32, 32, 8, 1), 5), buf388, reinterpret_tensor(buf376, (4,
        1, 4, 1), (32, 32, 8, 1), 6), buf393, reinterpret_tensor(buf376, (4,
        1, 4, 1), (32, 32, 8, 1), 7), reinterpret_tensor(buf397, (16, 8), (
        8, 1), 0), buf400, buf401, buf402, buf403, reinterpret_tensor(
        buf404, (16, 4), (4, 1), 0), reinterpret_tensor(buf406, (16, 4), (4,
        1), 0), reinterpret_tensor(buf408, (4, 4, 4), (48, 12, 1), 0),
        reinterpret_tensor(buf408, (4, 4, 4), (48, 12, 1), 4),
        reinterpret_tensor(buf408, (4, 4, 4), (48, 12, 1), 8),
        reinterpret_tensor(buf409, (4, 4, 4), (48, 12, 1), 0),
        reinterpret_tensor(buf409, (4, 4, 4), (48, 12, 1), 4),
        reinterpret_tensor(buf409, (4, 4, 4), (48, 12, 1), 8), buf414,
        buf419, reinterpret_tensor(buf422, (4, 1, 4, 1), (16, 16, 4, 1), 0),
        reinterpret_tensor(buf423, (4, 1, 4, 1), (16, 16, 4, 1), 0), buf426,
        buf429, reinterpret_tensor(buf422, (4, 1, 4, 1), (16, 16, 4, 1), 1),
        reinterpret_tensor(buf423, (4, 1, 4, 1), (16, 16, 4, 1), 1), buf436,
        buf439, reinterpret_tensor(buf422, (4, 1, 4, 1), (16, 16, 4, 1), 2),
        reinterpret_tensor(buf423, (4, 1, 4, 1), (16, 16, 4, 1), 2), buf446,
        buf449, reinterpret_tensor(buf422, (4, 1, 4, 1), (16, 16, 4, 1), 3),
        reinterpret_tensor(buf423, (4, 1, 4, 1), (16, 16, 4, 1), 3),
        reinterpret_tensor(buf454, (16, 4), (4, 1), 0), reinterpret_tensor(
        buf456, (16, 4), (4, 1), 0), buf462, primals_29, buf463, primals_27,
        reinterpret_tensor(buf415, (4, 1, 4), (16, 1, 4), 3),
        reinterpret_tensor(buf416, (4, 4, 1), (16, 4, 1), 3),
        reinterpret_tensor(buf410, (4, 1, 4), (16, 1, 4), 3),
        reinterpret_tensor(buf411, (4, 4, 1), (16, 4, 1), 3),
        reinterpret_tensor(buf415, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf416, (4, 4, 1), (16, 4, 1), 2),
        reinterpret_tensor(buf410, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf411, (4, 4, 1), (16, 4, 1), 2),
        reinterpret_tensor(buf415, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf416, (4, 4, 1), (16, 4, 1), 1),
        reinterpret_tensor(buf410, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf411, (4, 4, 1), (16, 4, 1), 1),
        reinterpret_tensor(buf415, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf416, (4, 4, 1), (16, 4, 1), 0),
        reinterpret_tensor(buf410, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf411, (4, 4, 1), (16, 4, 1), 0), buf464,
        primals_25, buf465, primals_23, primals_21, primals_19, buf466,
        primals_17, reinterpret_tensor(buf375, (4, 1, 4), (16, 1, 4), 3),
        reinterpret_tensor(buf376, (4, 4, 1), (32, 8, 1), 3),
        reinterpret_tensor(buf375, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf376, (4, 4, 1), (32, 8, 1), 2),
        reinterpret_tensor(buf375, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf376, (4, 4, 1), (32, 8, 1), 1),
        reinterpret_tensor(buf375, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf376, (4, 4, 1), (32, 8, 1), 0), buf467,
        primals_15, buf468, primals_13, buf469, primals_11,
        reinterpret_tensor(buf348, (4, 1, 4), (16, 1, 4), 3),
        reinterpret_tensor(buf349, (4, 4, 1), (32, 8, 1), 3),
        reinterpret_tensor(buf348, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf349, (4, 4, 1), (32, 8, 1), 2),
        reinterpret_tensor(buf348, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf349, (4, 4, 1), (32, 8, 1), 1),
        reinterpret_tensor(buf348, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf349, (4, 4, 1), (32, 8, 1), 0), buf470,
        primals_9, buf471, primals_7, buf472, buf473, reinterpret_tensor(
        buf301, (4, 1, 4), (16, 1, 4), 3), reinterpret_tensor(buf302, (4, 4,
        1), (16, 4, 1), 3), reinterpret_tensor(buf296, (4, 1, 4), (16, 1, 4
        ), 3), reinterpret_tensor(buf297, (4, 4, 1), (16, 4, 1), 3),
        reinterpret_tensor(buf301, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf302, (4, 4, 1), (16, 4, 1), 2),
        reinterpret_tensor(buf296, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf297, (4, 4, 1), (16, 4, 1), 2),
        reinterpret_tensor(buf301, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf302, (4, 4, 1), (16, 4, 1), 1),
        reinterpret_tensor(buf296, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf297, (4, 4, 1), (16, 4, 1), 1),
        reinterpret_tensor(buf301, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf302, (4, 4, 1), (16, 4, 1), 0),
        reinterpret_tensor(buf296, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf297, (4, 4, 1), (16, 4, 1), 0), buf474,
        buf475, buf476, reinterpret_tensor(buf261, (4, 1, 4), (16, 1, 4), 3
        ), reinterpret_tensor(buf262, (4, 4, 1), (32, 8, 1), 3),
        reinterpret_tensor(buf261, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf262, (4, 4, 1), (32, 8, 1), 2),
        reinterpret_tensor(buf261, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf262, (4, 4, 1), (32, 8, 1), 1),
        reinterpret_tensor(buf261, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf262, (4, 4, 1), (32, 8, 1), 0), buf477,
        buf478, buf479, reinterpret_tensor(buf234, (4, 1, 4), (16, 1, 4), 3
        ), reinterpret_tensor(buf235, (4, 4, 1), (32, 8, 1), 3),
        reinterpret_tensor(buf234, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf235, (4, 4, 1), (32, 8, 1), 2),
        reinterpret_tensor(buf234, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf235, (4, 4, 1), (32, 8, 1), 1),
        reinterpret_tensor(buf234, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf235, (4, 4, 1), (32, 8, 1), 0), buf480,
        buf481, buf482, buf483, reinterpret_tensor(buf187, (4, 1, 4), (16, 
        1, 4), 3), reinterpret_tensor(buf188, (4, 4, 1), (16, 4, 1), 3),
        reinterpret_tensor(buf182, (4, 1, 4), (16, 1, 4), 3),
        reinterpret_tensor(buf183, (4, 4, 1), (16, 4, 1), 3),
        reinterpret_tensor(buf187, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf188, (4, 4, 1), (16, 4, 1), 2),
        reinterpret_tensor(buf182, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf183, (4, 4, 1), (16, 4, 1), 2),
        reinterpret_tensor(buf187, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf188, (4, 4, 1), (16, 4, 1), 1),
        reinterpret_tensor(buf182, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf183, (4, 4, 1), (16, 4, 1), 1),
        reinterpret_tensor(buf187, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf188, (4, 4, 1), (16, 4, 1), 0),
        reinterpret_tensor(buf182, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf183, (4, 4, 1), (16, 4, 1), 0), buf484,
        buf485, buf486, reinterpret_tensor(buf147, (4, 1, 4), (16, 1, 4), 3
        ), reinterpret_tensor(buf148, (4, 4, 1), (32, 8, 1), 3),
        reinterpret_tensor(buf147, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf148, (4, 4, 1), (32, 8, 1), 2),
        reinterpret_tensor(buf147, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf148, (4, 4, 1), (32, 8, 1), 1),
        reinterpret_tensor(buf147, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf148, (4, 4, 1), (32, 8, 1), 0), buf487,
        buf488, buf489, reinterpret_tensor(buf120, (4, 1, 4), (16, 1, 4), 3
        ), reinterpret_tensor(buf121, (4, 4, 1), (32, 8, 1), 3),
        reinterpret_tensor(buf120, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf121, (4, 4, 1), (32, 8, 1), 2),
        reinterpret_tensor(buf120, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf121, (4, 4, 1), (32, 8, 1), 1),
        reinterpret_tensor(buf120, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf121, (4, 4, 1), (32, 8, 1), 0), buf490,
        buf491, buf492, buf493, reinterpret_tensor(buf73, (4, 1, 4), (16, 1,
        4), 3), reinterpret_tensor(buf74, (4, 4, 1), (16, 4, 1), 3),
        reinterpret_tensor(buf68, (4, 1, 4), (16, 1, 4), 3),
        reinterpret_tensor(buf69, (4, 4, 1), (16, 4, 1), 3),
        reinterpret_tensor(buf73, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf74, (4, 4, 1), (16, 4, 1), 2),
        reinterpret_tensor(buf68, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf69, (4, 4, 1), (16, 4, 1), 2),
        reinterpret_tensor(buf73, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf74, (4, 4, 1), (16, 4, 1), 1),
        reinterpret_tensor(buf68, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf69, (4, 4, 1), (16, 4, 1), 1),
        reinterpret_tensor(buf73, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf74, (4, 4, 1), (16, 4, 1), 0),
        reinterpret_tensor(buf68, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf69, (4, 4, 1), (16, 4, 1), 0), buf494, buf495,
        buf496, reinterpret_tensor(buf33, (4, 1, 4), (16, 1, 4), 3),
        reinterpret_tensor(buf34, (4, 4, 1), (32, 8, 1), 3),
        reinterpret_tensor(buf33, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf34, (4, 4, 1), (32, 8, 1), 2),
        reinterpret_tensor(buf33, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf34, (4, 4, 1), (32, 8, 1), 1),
        reinterpret_tensor(buf33, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf34, (4, 4, 1), (32, 8, 1), 0), buf497, buf498,
        buf499, reinterpret_tensor(buf6, (4, 1, 4), (16, 1, 4), 3),
        reinterpret_tensor(buf7, (4, 4, 1), (32, 8, 1), 3),
        reinterpret_tensor(buf6, (4, 1, 4), (16, 1, 4), 2),
        reinterpret_tensor(buf7, (4, 4, 1), (32, 8, 1), 2),
        reinterpret_tensor(buf6, (4, 1, 4), (16, 1, 4), 1),
        reinterpret_tensor(buf7, (4, 4, 1), (32, 8, 1), 1),
        reinterpret_tensor(buf6, (4, 1, 4), (16, 1, 4), 0),
        reinterpret_tensor(buf7, (4, 4, 1), (32, 8, 1), 0), buf500, buf501,
        buf502, buf503)


class FCNet(nn.Module):

    def __init__(self, in_size, out_size, activate=None, drop=0.0):
        super(FCNet, self).__init__()
        self.lin = nn.Linear(in_size, out_size)
        self.drop_value = drop
        self.drop = nn.Dropout(drop)
        self.activate = activate.lower() if activate is not None else None
        if activate == 'relu':
            self.ac_fn = nn.ReLU()
        elif activate == 'sigmoid':
            self.ac_fn = nn.Sigmoid()
        elif activate == 'tanh':
            self.ac_fn = nn.Tanh()

    def forward(self, x):
        if self.drop_value > 0:
            x = self.drop(x)
        x = self.lin(x)
        if self.activate is not None:
            x = self.ac_fn(x)
        return x


class OneSideInterModalityUpdate(nn.Module):
    """
    one-side Inter-Modality Attention Flow
    according to the paper, instead of parallel V->Q & Q->V, we first to V->Q and then Q->V
    """

    def __init__(self, src_size, tgt_size, output_size, num_head, drop=0.0):
        super(OneSideInterModalityUpdate, self).__init__()
        self.src_size = src_size
        self.tgt_size = tgt_size
        self.output_size = output_size
        self.num_head = num_head
        self.src_lin = FCNet(src_size, output_size * 2, drop=drop, activate
            ='relu')
        self.tgt_lin = FCNet(tgt_size, output_size, drop=drop, activate='relu')
        self.tgt_output = FCNet(output_size + tgt_size, output_size, drop=
            drop, activate='relu')

    def forward(self, src, tgt):
        """
        :param src: eeg feature [batch, regions, feature_size]
        :param tgt: eye feature [batch, regions, feature_size]
        :return:
        """
        _batch_size, _num_src = src.shape[0], src.shape[1]
        tgt.shape[1]
        src_tran = self.src_lin(src)
        tgt_tran = self.tgt_lin(tgt)
        src_key, src_val = torch.split(src_tran, src_tran.size(2) // 2, dim=2)
        tgt_query = tgt_tran
        src_key_set = torch.split(src_key, src_key.size(2) // self.num_head,
            dim=2)
        src_val_set = torch.split(src_val, src_val.size(2) // self.num_head,
            dim=2)
        tgt_query_set = torch.split(tgt_query, tgt_query.size(2) // self.
            num_head, dim=2)
        for i in range(self.num_head):
            src_key_slice, tgt_query_slice, src_val_slice = src_key_set[i
                ], tgt_query_set[i], src_val_set[i]
            src2tgt = tgt_query_slice @ src_key_slice.transpose(1, 2) / (self
                .output_size // self.num_head) ** 0.5
            interMAF_src2tgt = F.softmax(src2tgt, dim=2).unsqueeze(3)
            tgt_update = (interMAF_src2tgt * src_val_slice.unsqueeze(1)).sum(2
                ) if i == 0 else torch.cat((tgt_update, (interMAF_src2tgt *
                src_val_slice.unsqueeze(1)).sum(2)), dim=2)
        cat_tgt = torch.cat((tgt, tgt_update), dim=2)
        tgt_updated = self.tgt_output(cat_tgt)
        return tgt_updated


class DyIntraModalityUpdate(nn.Module):
    """
    Dynamic Intra-Modality Attention Flow
    """

    def __init__(self, v_size, q_size, output_size, num_head, drop=0.0):
        super(DyIntraModalityUpdate, self).__init__()
        self.v_size = v_size
        self.q_size = q_size
        self.output_size = output_size
        self.num_head = num_head
        self.v4q_gate_lin = FCNet(v_size, output_size, drop=drop)
        self.q4v_gate_lin = FCNet(q_size, output_size, drop=drop)
        self.v_lin = FCNet(v_size, output_size * 3, drop=drop, activate='relu')
        self.q_lin = FCNet(q_size, output_size * 3, drop=drop, activate='relu')
        self.v_output = FCNet(output_size, output_size, drop=drop, activate
            ='relu')
        self.q_output = FCNet(output_size, output_size, drop=drop, activate
            ='relu')
        self.relu = nn.ReLU()
        self.tanh = nn.Tanh()
        self.sigmoid = nn.Sigmoid()

    def forward(self, v, q):
        """
        :param v: [batch_size, num_obj, feature_size]
        :param q: [batch_size, max_len, feature_size]

        :return:
        """
        _batch_size, num_obj = v.shape[0], v.shape[1]
        max_len = q.shape[1]
        v_mean = v.sum(1) / num_obj
        q_mean = q.sum(1) / max_len
        v4q_gate = self.sigmoid(self.v4q_gate_lin(v_mean)).unsqueeze(1)
        q4v_gate = self.sigmoid(self.q4v_gate_lin(q_mean)).unsqueeze(1)
        v_tran = self.v_lin(v)
        q_tran = self.q_lin(q)
        v_key, v_query, v_val = torch.split(v_tran, v_tran.size(2) // 3, dim=2)
        q_key, q_query, q_val = torch.split(q_tran, q_tran.size(2) // 3, dim=2)
        gated_v_query = (1 + q4v_gate) * v_query
        gated_v_key = (1 + q4v_gate) * v_key
        gated_v_val = (1 + q4v_gate) * v_val
        gated_q_query = (1 + v4q_gate) * q_query
        gated_q_key = (1 + v4q_gate) * q_key
        gated_q_val = (1 + v4q_gate) * q_val
        v_key_set = torch.split(gated_v_key, gated_v_key.size(2) // self.
            num_head, dim=2)
        v_query_set = torch.split(gated_v_query, gated_v_query.size(2) //
            self.num_head, dim=2)
        v_val_set = torch.split(gated_v_val, gated_v_val.size(2) // self.
            num_head, dim=2)
        q_key_set = torch.split(gated_q_key, gated_q_key.size(2) // self.
            num_head, dim=2)
        q_query_set = torch.split(gated_q_query, gated_q_query.size(2) //
            self.num_head, dim=2)
        q_val_set = torch.split(gated_q_val, gated_q_val.size(2) // self.
            num_head, dim=2)
        for i in range(self.num_head):
            v_key_slice, v_query_slice, v_val_slice = v_key_set[i
                ], v_query_set[i], v_val_set[i]
            q_key_slice, q_query_slice, q_val_slice = q_key_set[i
                ], q_query_set[i], q_val_set[i]
            v2v = v_query_slice @ v_key_slice.transpose(1, 2) / (self.
                output_size // self.num_head) ** 0.5
            q2q = q_query_slice @ q_key_slice.transpose(1, 2) / (self.
                output_size // self.num_head) ** 0.5
            dyIntranMAF_v2v = F.softmax(v2v, dim=2).unsqueeze(3)
            dyIntranMAF_q2q = F.softmax(q2q, dim=2).unsqueeze(3)
            v_update = (dyIntranMAF_v2v * v_val_slice.unsqueeze(1)).sum(2
                ) if i == 0 else torch.cat((v_update, (dyIntranMAF_v2v *
                v_val_slice.unsqueeze(1)).sum(2)), dim=2)
            q_update = (dyIntranMAF_q2q * q_val_slice.unsqueeze(1)).sum(2
                ) if i == 0 else torch.cat((q_update, (dyIntranMAF_q2q *
                q_val_slice.unsqueeze(1)).sum(2)), dim=2)
        updated_v = self.v_output(v + v_update)
        updated_q = self.q_output(q + q_update)
        return updated_v, updated_q


class SingleBlockNew(nn.Module):
    """
        Single Block Inter- and Intra modality stack multiple times, in such circumstance, all the
        basic blocks share the same parameters in the model
    """

    def __init__(self, num_blocks, v_size, q_size, output_size,
        num_inter_head, num_intra_head, drop=0.0):
        super(SingleBlockNew, self).__init__()
        self.v_size = v_size
        self.q_size = q_size
        self.output_size = output_size
        self.num_inter_head = num_inter_head
        self.num_intra_head = num_intra_head
        self.num_block = num_blocks
        self.v_lin = FCNet(v_size, output_size, drop=drop, activate='relu')
        self.q_lin = FCNet(q_size, output_size, drop=drop, activate='relu')
        self.v2q_interBlock = OneSideInterModalityUpdate(output_size,
            output_size, output_size, num_inter_head, drop)
        self.q2v_interBlock = OneSideInterModalityUpdate(output_size,
            output_size, output_size, num_inter_head, drop)
        self.intraBlock = DyIntraModalityUpdate(output_size, output_size,
            output_size, num_intra_head, drop)

    def forward(self, input_0, input_1):
        primals_1 = self.v_lin.lin.weight
        primals_2 = self.v_lin.lin.bias
        primals_4 = self.q_lin.lin.weight
        primals_5 = self.q_lin.lin.bias
        primals_7 = self.v2q_interBlock.src_lin.lin.weight
        primals_8 = self.v2q_interBlock.src_lin.lin.bias
        primals_9 = self.v2q_interBlock.tgt_lin.lin.weight
        primals_10 = self.v2q_interBlock.tgt_lin.lin.bias
        primals_11 = self.v2q_interBlock.tgt_output.lin.weight
        primals_12 = self.v2q_interBlock.tgt_output.lin.bias
        primals_13 = self.q2v_interBlock.src_lin.lin.weight
        primals_14 = self.q2v_interBlock.src_lin.lin.bias
        primals_15 = self.q2v_interBlock.tgt_lin.lin.weight
        primals_16 = self.q2v_interBlock.tgt_lin.lin.bias
        primals_17 = self.q2v_interBlock.tgt_output.lin.weight
        primals_18 = self.q2v_interBlock.tgt_output.lin.bias
        primals_19 = self.intraBlock.v4q_gate_lin.lin.weight
        primals_20 = self.intraBlock.v4q_gate_lin.lin.bias
        primals_21 = self.intraBlock.q4v_gate_lin.lin.weight
        primals_22 = self.intraBlock.q4v_gate_lin.lin.bias
        primals_23 = self.intraBlock.v_lin.lin.weight
        primals_24 = self.intraBlock.v_lin.lin.bias
        primals_25 = self.intraBlock.q_lin.lin.weight
        primals_26 = self.intraBlock.q_lin.lin.bias
        primals_27 = self.intraBlock.v_output.lin.weight
        primals_28 = self.intraBlock.v_output.lin.bias
        primals_29 = self.intraBlock.q_output.lin.weight
        primals_30 = self.intraBlock.q_output.lin.bias
        primals_3 = input_0
        primals_6 = input_1
        output = call([primals_1, primals_2, primals_3, primals_4,
            primals_5, primals_6, primals_7, primals_8, primals_9,
            primals_10, primals_11, primals_12, primals_13, primals_14,
            primals_15, primals_16, primals_17, primals_18, primals_19,
            primals_20, primals_21, primals_22, primals_23, primals_24,
            primals_25, primals_26, primals_27, primals_28, primals_29,
            primals_30])
        return output[0], output[1]


Measured latency_ms: 0.015101