import torch
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.utils.data
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_logsumexp_0(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex % 256
    x0 = xindex % 4
    x2 = xindex // 16 % 16
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + x4, xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr0 + (x0 + 16 * x2), xmask, eviction_policy=
        'evict_last')
    tmp12 = tl.load(in_ptr0 + (4 + x0 + 16 * x2), xmask, eviction_policy=
        'evict_last')
    tmp18 = tl.load(in_ptr0 + (8 + x0 + 16 * x2), xmask, eviction_policy=
        'evict_last')
    tmp24 = tl.load(in_ptr0 + (12 + x0 + 16 * x2), xmask, eviction_policy=
        'evict_last')
    tmp1 = -tmp0
    tmp2 = 1.0
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 + tmp2
    tmp5 = 1000.0
    tmp6 = tmp4 * tmp5
    tmp8 = -tmp7
    tmp9 = tmp8 + tmp2
    tmp10 = tmp9 + tmp2
    tmp11 = tmp10 * tmp5
    tmp13 = -tmp12
    tmp14 = tmp13 + tmp2
    tmp15 = tmp14 + tmp2
    tmp16 = tmp15 * tmp5
    tmp17 = triton_helpers.maximum(tmp11, tmp16)
    tmp19 = -tmp18
    tmp20 = tmp19 + tmp2
    tmp21 = tmp20 + tmp2
    tmp22 = tmp21 * tmp5
    tmp23 = triton_helpers.maximum(tmp17, tmp22)
    tmp25 = -tmp24
    tmp26 = tmp25 + tmp2
    tmp27 = tmp26 + tmp2
    tmp28 = tmp27 * tmp5
    tmp29 = triton_helpers.maximum(tmp23, tmp28)
    tmp30 = tl_math.abs(tmp29)
    tmp31 = float('inf')
    tmp32 = tmp30 == tmp31
    tmp33 = 0.0
    tmp34 = tl.where(tmp32, tmp33, tmp29)
    tmp35 = tmp6 - tmp34
    tl.store(out_ptr0 + x5, tmp35, xmask)


@triton.jit
def triton_poi_fused_logsumexp_1(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x3 = xindex // 4
    x1 = xindex // 4 % 16
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 16 * x3), xmask)
    tmp2 = tl.load(in_ptr0 + (4 + x0 + 16 * x3), xmask)
    tmp5 = tl.load(in_ptr0 + (8 + x0 + 16 * x3), xmask)
    tmp8 = tl.load(in_ptr0 + (12 + x0 + 16 * x3), xmask)
    tmp12 = tl.load(in_ptr1 + (x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp19 = tl.load(in_ptr1 + (4 + x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp25 = tl.load(in_ptr1 + (8 + x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp31 = tl.load(in_ptr1 + (12 + x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp1 = tl_math.exp(tmp0)
    tmp3 = tl_math.exp(tmp2)
    tmp4 = tmp1 + tmp3
    tmp6 = tl_math.exp(tmp5)
    tmp7 = tmp4 + tmp6
    tmp9 = tl_math.exp(tmp8)
    tmp10 = tmp7 + tmp9
    tmp11 = tl_math.log(tmp10)
    tmp13 = -tmp12
    tmp14 = 1.0
    tmp15 = tmp13 + tmp14
    tmp16 = tmp15 + tmp14
    tmp17 = 1000.0
    tmp18 = tmp16 * tmp17
    tmp20 = -tmp19
    tmp21 = tmp20 + tmp14
    tmp22 = tmp21 + tmp14
    tmp23 = tmp22 * tmp17
    tmp24 = triton_helpers.maximum(tmp18, tmp23)
    tmp26 = -tmp25
    tmp27 = tmp26 + tmp14
    tmp28 = tmp27 + tmp14
    tmp29 = tmp28 * tmp17
    tmp30 = triton_helpers.maximum(tmp24, tmp29)
    tmp32 = -tmp31
    tmp33 = tmp32 + tmp14
    tmp34 = tmp33 + tmp14
    tmp35 = tmp34 * tmp17
    tmp36 = triton_helpers.maximum(tmp30, tmp35)
    tmp37 = tl_math.abs(tmp36)
    tmp38 = float('inf')
    tmp39 = tmp37 == tmp38
    tmp40 = 0.0
    tmp41 = tl.where(tmp39, tmp40, tmp36)
    tmp42 = tmp11 + tmp41
    tl.store(out_ptr0 + x4, tmp42, xmask)


@triton.jit
def triton_poi_fused_add_div_logsumexp_neg_2(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex % 64
    x4 = xindex // 4
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + 4 * x3, xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr1 + 4 * x4, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + 4 * x4, xmask, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr0 + (1 + 4 * x3), xmask, eviction_policy='evict_last'
        )
    tmp19 = tl.load(in_ptr1 + (1 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp22 = tl.load(in_ptr2 + (1 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp29 = tl.load(in_ptr0 + (2 + 4 * x3), xmask, eviction_policy='evict_last'
        )
    tmp32 = tl.load(in_ptr1 + (2 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp35 = tl.load(in_ptr2 + (2 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp42 = tl.load(in_ptr0 + (3 + 4 * x3), xmask, eviction_policy='evict_last'
        )
    tmp45 = tl.load(in_ptr1 + (3 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp48 = tl.load(in_ptr2 + (3 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp1 = -tmp0
    tmp2 = 1.0
    tmp3 = tmp1 + tmp2
    tmp5 = 1e-08
    tmp6 = tmp4 + tmp5
    tmp7 = tl_math.log(tmp6)
    tmp9 = tmp7 - tmp8
    tmp10 = 0.001
    tmp11 = tmp9 * tmp10
    tmp12 = tmp11 + tmp2
    tmp13 = tmp3 + tmp12
    tmp14 = 1000.0
    tmp15 = tmp13 * tmp14
    tmp17 = -tmp16
    tmp18 = tmp17 + tmp2
    tmp20 = tmp19 + tmp5
    tmp21 = tl_math.log(tmp20)
    tmp23 = tmp21 - tmp22
    tmp24 = tmp23 * tmp10
    tmp25 = tmp24 + tmp2
    tmp26 = tmp18 + tmp25
    tmp27 = tmp26 * tmp14
    tmp28 = triton_helpers.maximum(tmp15, tmp27)
    tmp30 = -tmp29
    tmp31 = tmp30 + tmp2
    tmp33 = tmp32 + tmp5
    tmp34 = tl_math.log(tmp33)
    tmp36 = tmp34 - tmp35
    tmp37 = tmp36 * tmp10
    tmp38 = tmp37 + tmp2
    tmp39 = tmp31 + tmp38
    tmp40 = tmp39 * tmp14
    tmp41 = triton_helpers.maximum(tmp28, tmp40)
    tmp43 = -tmp42
    tmp44 = tmp43 + tmp2
    tmp46 = tmp45 + tmp5
    tmp47 = tl_math.log(tmp46)
    tmp49 = tmp47 - tmp48
    tmp50 = tmp49 * tmp10
    tmp51 = tmp50 + tmp2
    tmp52 = tmp44 + tmp51
    tmp53 = tmp52 * tmp14
    tmp54 = triton_helpers.maximum(tmp41, tmp53)
    tmp55 = tl_math.abs(tmp54)
    tmp56 = float('inf')
    tmp57 = tmp55 == tmp56
    tmp58 = 0.0
    tmp59 = tl.where(tmp57, tmp58, tmp54)
    tmp60 = tmp15 - tmp59
    tmp61 = tl_math.exp(tmp60)
    tmp62 = tmp27 - tmp59
    tmp63 = tl_math.exp(tmp62)
    tmp64 = tmp61 + tmp63
    tmp65 = tmp40 - tmp59
    tmp66 = tl_math.exp(tmp65)
    tmp67 = tmp64 + tmp66
    tmp68 = tmp53 - tmp59
    tmp69 = tl_math.exp(tmp68)
    tmp70 = tmp67 + tmp69
    tl.store(out_ptr0 + x5, tmp54, xmask)
    tl.store(out_ptr1 + x5, tmp70, xmask)


@triton.jit
def triton_poi_fused_add_div_neg_3(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex % 256
    x5 = xindex // 4
    x0 = xindex % 4
    x6 = xindex // 16
    x7 = xindex
    tmp0 = tl.load(in_ptr0 + x4, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr1 + x5, xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr2 + x5, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr3 + x5, xmask, eviction_policy='evict_last')
    tmp21 = tl.load(in_ptr4 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp24 = tl.load(in_ptr5 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp1 = -tmp0
    tmp3 = 1e-08
    tmp4 = tmp2 + tmp3
    tmp5 = tl_math.log(tmp4)
    tmp7 = tl_math.log(tmp6)
    tmp9 = tl_math.abs(tmp8)
    tmp10 = float('inf')
    tmp11 = tmp9 == tmp10
    tmp12 = 0.0
    tmp13 = tl.where(tmp11, tmp12, tmp8)
    tmp14 = tmp7 + tmp13
    tmp15 = tmp5 - tmp14
    tmp16 = 0.001
    tmp17 = tmp15 * tmp16
    tmp18 = 1.0
    tmp19 = tmp17 + tmp18
    tmp20 = tmp1 + tmp19
    tmp22 = tmp21 + tmp3
    tmp23 = tl_math.log(tmp22)
    tmp25 = tmp23 - tmp24
    tmp26 = tmp25 * tmp16
    tmp27 = tmp26 + tmp18
    tmp28 = tmp20 + tmp27
    tmp29 = 1000.0
    tmp30 = tmp28 * tmp29
    tl.store(out_ptr0 + x7, tmp30, xmask)


@triton.jit
def triton_poi_fused_add_log_logsumexp_mul_sub_4(in_ptr0, in_ptr1, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    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)
    tmp4 = tl.load(in_ptr1 + (x0 + 16 * x1), xmask)
    tmp5 = tl.load(in_ptr1 + (4 + x0 + 16 * x1), xmask)
    tmp7 = tl.load(in_ptr1 + (8 + x0 + 16 * x1), xmask)
    tmp9 = tl.load(in_ptr1 + (12 + x0 + 16 * x1), xmask)
    tmp1 = 1e-08
    tmp2 = tmp0 + tmp1
    tmp3 = tl_math.log(tmp2)
    tmp6 = triton_helpers.maximum(tmp4, tmp5)
    tmp8 = triton_helpers.maximum(tmp6, tmp7)
    tmp10 = triton_helpers.maximum(tmp8, tmp9)
    tmp11 = tl_math.abs(tmp10)
    tmp12 = float('inf')
    tmp13 = tmp11 == tmp12
    tmp14 = 0.0
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    tmp16 = tmp4 - tmp15
    tmp17 = tl_math.exp(tmp16)
    tmp18 = tmp5 - tmp15
    tmp19 = tl_math.exp(tmp18)
    tmp20 = tmp17 + tmp19
    tmp21 = tmp7 - tmp15
    tmp22 = tl_math.exp(tmp21)
    tmp23 = tmp20 + tmp22
    tmp24 = tmp9 - tmp15
    tmp25 = tl_math.exp(tmp24)
    tmp26 = tmp23 + tmp25
    tmp27 = tl_math.log(tmp26)
    tmp28 = tmp27 + tmp15
    tmp29 = tmp3 - tmp28
    tmp30 = 0.001
    tmp31 = tmp29 * tmp30
    tl.store(out_ptr0 + x2, tmp31, xmask)


@triton.jit
def triton_poi_fused_add_neg_5(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex % 256
    x5 = xindex // 4
    x0 = xindex % 4
    x6 = xindex // 16
    x7 = xindex
    tmp0 = tl.load(in_ptr0 + x4, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr1 + x5, xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr2 + x5, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr3 + x5, xmask, eviction_policy='evict_last')
    tmp21 = tl.load(in_ptr4 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp22 = tl.load(in_ptr5 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp25 = tl.load(in_ptr6 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp1 = -tmp0
    tmp3 = 1e-08
    tmp4 = tmp2 + tmp3
    tmp5 = tl_math.log(tmp4)
    tmp7 = tl_math.log(tmp6)
    tmp9 = tl_math.abs(tmp8)
    tmp10 = float('inf')
    tmp11 = tmp9 == tmp10
    tmp12 = 0.0
    tmp13 = tl.where(tmp11, tmp12, tmp8)
    tmp14 = tmp7 + tmp13
    tmp15 = tmp5 - tmp14
    tmp16 = 0.001
    tmp17 = tmp15 * tmp16
    tmp18 = 1.0
    tmp19 = tmp17 + tmp18
    tmp20 = tmp1 + tmp19
    tmp23 = tmp22 + tmp3
    tmp24 = tl_math.log(tmp23)
    tmp26 = tmp24 - tmp25
    tmp27 = tmp26 * tmp16
    tmp28 = tmp27 + tmp18
    tmp29 = tmp21 + tmp28
    tmp30 = tmp20 + tmp29
    tl.store(out_ptr0 + x7, tmp30, xmask)


@triton.jit
def triton_poi_fused_add_div_log_logsumexp_sub_6(in_ptr0, in_ptr1, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp4 = tl.load(in_ptr1 + 4 * x0, xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr1 + (1 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr1 + (2 + 4 * x0), xmask, eviction_policy='evict_last'
        )
    tmp13 = tl.load(in_ptr1 + (3 + 4 * x0), xmask, eviction_policy='evict_last'
        )
    tmp1 = 1e-08
    tmp2 = tmp0 + tmp1
    tmp3 = tl_math.log(tmp2)
    tmp5 = 1000.0
    tmp6 = tmp4 * tmp5
    tmp8 = tmp7 * tmp5
    tmp9 = triton_helpers.maximum(tmp6, tmp8)
    tmp11 = tmp10 * tmp5
    tmp12 = triton_helpers.maximum(tmp9, tmp11)
    tmp14 = tmp13 * tmp5
    tmp15 = triton_helpers.maximum(tmp12, tmp14)
    tmp16 = tl_math.abs(tmp15)
    tmp17 = float('inf')
    tmp18 = tmp16 == tmp17
    tmp19 = 0.0
    tmp20 = tl.where(tmp18, tmp19, tmp15)
    tmp21 = tmp6 - tmp20
    tmp22 = tl_math.exp(tmp21)
    tmp23 = tmp8 - tmp20
    tmp24 = tl_math.exp(tmp23)
    tmp25 = tmp22 + tmp24
    tmp26 = tmp11 - tmp20
    tmp27 = tl_math.exp(tmp26)
    tmp28 = tmp25 + tmp27
    tmp29 = tmp14 - tmp20
    tmp30 = tl_math.exp(tmp29)
    tmp31 = tmp28 + tmp30
    tmp32 = tl_math.log(tmp31)
    tmp33 = tmp32 + tmp20
    tmp34 = tmp3 - tmp33
    tl.store(out_ptr0 + x0, tmp34, xmask)


@triton.jit
def triton_poi_fused_add_neg_7(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex % 256
    x5 = xindex // 4
    x0 = xindex % 4
    x6 = xindex // 16
    x7 = xindex
    tmp0 = tl.load(in_ptr0 + x4, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr1 + x5, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr2 + x5, xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr3 + x5, xmask, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr4 + x5, xmask, eviction_policy='evict_last')
    tmp24 = tl.load(in_ptr5 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp25 = tl.load(in_ptr6 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp28 = tl.load(in_ptr7 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp1 = -tmp0
    tmp3 = 0.001
    tmp4 = tmp2 * tmp3
    tmp6 = 1e-08
    tmp7 = tmp5 + tmp6
    tmp8 = tl_math.log(tmp7)
    tmp10 = tl_math.log(tmp9)
    tmp12 = tl_math.abs(tmp11)
    tmp13 = float('inf')
    tmp14 = tmp12 == tmp13
    tmp15 = 0.0
    tmp16 = tl.where(tmp14, tmp15, tmp11)
    tmp17 = tmp10 + tmp16
    tmp18 = tmp8 - tmp17
    tmp19 = tmp18 * tmp3
    tmp20 = 1.0
    tmp21 = tmp19 + tmp20
    tmp22 = tmp4 + tmp21
    tmp23 = tmp1 + tmp22
    tmp26 = tmp25 + tmp6
    tmp27 = tl_math.log(tmp26)
    tmp29 = tmp27 - tmp28
    tmp30 = tmp29 * tmp3
    tmp31 = tmp30 + tmp20
    tmp32 = tmp24 + tmp31
    tmp33 = tmp23 + tmp32
    tl.store(out_ptr0 + x7, tmp33, xmask)


@triton.jit
def triton_poi_fused_add_log_logsumexp_sub_8(in_ptr0, in_ptr1, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    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)
    tmp4 = tl.load(in_ptr1 + (x0 + 16 * x1), xmask)
    tmp7 = tl.load(in_ptr1 + (4 + x0 + 16 * x1), xmask)
    tmp10 = tl.load(in_ptr1 + (8 + x0 + 16 * x1), xmask)
    tmp13 = tl.load(in_ptr1 + (12 + x0 + 16 * x1), xmask)
    tmp1 = 1e-08
    tmp2 = tmp0 + tmp1
    tmp3 = tl_math.log(tmp2)
    tmp5 = 1000.0
    tmp6 = tmp4 * tmp5
    tmp8 = tmp7 * tmp5
    tmp9 = triton_helpers.maximum(tmp6, tmp8)
    tmp11 = tmp10 * tmp5
    tmp12 = triton_helpers.maximum(tmp9, tmp11)
    tmp14 = tmp13 * tmp5
    tmp15 = triton_helpers.maximum(tmp12, tmp14)
    tmp16 = tl_math.abs(tmp15)
    tmp17 = float('inf')
    tmp18 = tmp16 == tmp17
    tmp19 = 0.0
    tmp20 = tl.where(tmp18, tmp19, tmp15)
    tmp21 = tmp6 - tmp20
    tmp22 = tl_math.exp(tmp21)
    tmp23 = tmp8 - tmp20
    tmp24 = tl_math.exp(tmp23)
    tmp25 = tmp22 + tmp24
    tmp26 = tmp11 - tmp20
    tmp27 = tl_math.exp(tmp26)
    tmp28 = tmp25 + tmp27
    tmp29 = tmp14 - tmp20
    tmp30 = tl_math.exp(tmp29)
    tmp31 = tmp28 + tmp30
    tmp32 = tl_math.log(tmp31)
    tmp33 = tmp32 + tmp20
    tmp34 = tmp3 - tmp33
    tl.store(out_ptr0 + x2, tmp34, xmask)


@triton.jit
def triton_poi_fused_add_neg_9(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, in_ptr8, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex % 256
    x5 = xindex // 4
    x0 = xindex % 4
    x6 = xindex // 16
    x7 = xindex
    tmp0 = tl.load(in_ptr0 + x4, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr1 + x5, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr2 + x5, xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr3 + x5, xmask, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr4 + x5, xmask, eviction_policy='evict_last')
    tmp24 = tl.load(in_ptr5 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp26 = tl.load(in_ptr6 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp27 = tl.load(in_ptr7 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp30 = tl.load(in_ptr8 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp1 = -tmp0
    tmp3 = 0.001
    tmp4 = tmp2 * tmp3
    tmp6 = 1e-08
    tmp7 = tmp5 + tmp6
    tmp8 = tl_math.log(tmp7)
    tmp10 = tl_math.log(tmp9)
    tmp12 = tl_math.abs(tmp11)
    tmp13 = float('inf')
    tmp14 = tmp12 == tmp13
    tmp15 = 0.0
    tmp16 = tl.where(tmp14, tmp15, tmp11)
    tmp17 = tmp10 + tmp16
    tmp18 = tmp8 - tmp17
    tmp19 = tmp18 * tmp3
    tmp20 = 1.0
    tmp21 = tmp19 + tmp20
    tmp22 = tmp4 + tmp21
    tmp23 = tmp1 + tmp22
    tmp25 = tmp24 * tmp3
    tmp28 = tmp27 + tmp6
    tmp29 = tl_math.log(tmp28)
    tmp31 = tmp29 - tmp30
    tmp32 = tmp31 * tmp3
    tmp33 = tmp32 + tmp20
    tmp34 = tmp26 + tmp33
    tmp35 = tmp25 + tmp34
    tmp36 = tmp23 + tmp35
    tl.store(out_ptr0 + x7, tmp36, xmask)


@triton.jit
def triton_poi_fused_add_div_log_logsumexp_mul_ones_like_sub_10(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp4 = tl.load(in_ptr1 + 4 * x0, xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr1 + (1 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr1 + (2 + 4 * x0), xmask, eviction_policy='evict_last'
        )
    tmp13 = tl.load(in_ptr1 + (3 + 4 * x0), xmask, eviction_policy='evict_last'
        )
    tmp37 = tl.load(in_ptr2 + x0, xmask)
    tmp39 = tl.load(in_ptr3 + x0, xmask)
    tmp41 = tl.load(in_ptr4 + x0, xmask)
    tmp1 = 1e-08
    tmp2 = tmp0 + tmp1
    tmp3 = tl_math.log(tmp2)
    tmp5 = 1000.0
    tmp6 = tmp4 * tmp5
    tmp8 = tmp7 * tmp5
    tmp9 = triton_helpers.maximum(tmp6, tmp8)
    tmp11 = tmp10 * tmp5
    tmp12 = triton_helpers.maximum(tmp9, tmp11)
    tmp14 = tmp13 * tmp5
    tmp15 = triton_helpers.maximum(tmp12, tmp14)
    tmp16 = tl_math.abs(tmp15)
    tmp17 = float('inf')
    tmp18 = tmp16 == tmp17
    tmp19 = 0.0
    tmp20 = tl.where(tmp18, tmp19, tmp15)
    tmp21 = tmp6 - tmp20
    tmp22 = tl_math.exp(tmp21)
    tmp23 = tmp8 - tmp20
    tmp24 = tl_math.exp(tmp23)
    tmp25 = tmp22 + tmp24
    tmp26 = tmp11 - tmp20
    tmp27 = tl_math.exp(tmp26)
    tmp28 = tmp25 + tmp27
    tmp29 = tmp14 - tmp20
    tmp30 = tl_math.exp(tmp29)
    tmp31 = tmp28 + tmp30
    tmp32 = tl_math.log(tmp31)
    tmp33 = tmp32 + tmp20
    tmp34 = tmp3 - tmp33
    tmp35 = 0.001
    tmp36 = tmp34 * tmp35
    tmp38 = tmp37 * tmp35
    tmp40 = tl_math.log(tmp39)
    tmp42 = tl_math.abs(tmp41)
    tmp43 = tmp42 == tmp17
    tmp44 = tl.where(tmp43, tmp19, tmp41)
    tmp45 = tmp40 + tmp44
    tmp46 = tmp3 - tmp45
    tmp47 = tmp46 * tmp35
    tmp48 = 1.0
    tmp49 = tmp47 + tmp48
    tmp50 = tmp38 + tmp49
    tmp51 = tmp36 + tmp50
    tl.store(in_out_ptr0 + x0, tmp51, xmask)


@triton.jit
def triton_poi_fused_add_div_neg_11(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex % 256
    x5 = xindex // 4
    x0 = xindex % 4
    x6 = xindex // 16
    x7 = xindex
    tmp0 = tl.load(in_ptr0 + x4, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr1 + x5, xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr2 + (x0 + 4 * x6), xmask, eviction_policy='evict_last'
        )
    tmp7 = tl.load(in_ptr3 + (x0 + 4 * x6), xmask, eviction_policy='evict_last'
        )
    tmp8 = tl.load(in_ptr4 + (x0 + 4 * x6), xmask, eviction_policy='evict_last'
        )
    tmp12 = tl.load(in_ptr5 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp1 = -tmp0
    tmp3 = tmp1 + tmp2
    tmp5 = 0.001
    tmp6 = tmp4 * tmp5
    tmp9 = 1e-08
    tmp10 = tmp8 + tmp9
    tmp11 = tl_math.log(tmp10)
    tmp13 = tmp11 - tmp12
    tmp14 = tmp13 * tmp5
    tmp15 = 1.0
    tmp16 = tmp14 + tmp15
    tmp17 = tmp7 + tmp16
    tmp18 = tmp6 + tmp17
    tmp19 = tmp3 + tmp18
    tmp20 = 1000.0
    tmp21 = tmp19 * tmp20
    tl.store(out_ptr0 + x7, tmp21, xmask)


@triton.jit
def triton_poi_fused_add_log_logsumexp_mul_ones_like_sub_12(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, in_ptr3, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    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)
    tmp4 = tl.load(in_ptr1 + (x0 + 16 * x1), xmask)
    tmp5 = tl.load(in_ptr1 + (4 + x0 + 16 * x1), xmask)
    tmp7 = tl.load(in_ptr1 + (8 + x0 + 16 * x1), xmask)
    tmp9 = tl.load(in_ptr1 + (12 + x0 + 16 * x1), xmask)
    tmp32 = tl.load(in_ptr2 + x2, xmask)
    tmp34 = tl.load(in_ptr3 + x2, xmask)
    tmp35 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = 1e-08
    tmp2 = tmp0 + tmp1
    tmp3 = tl_math.log(tmp2)
    tmp6 = triton_helpers.maximum(tmp4, tmp5)
    tmp8 = triton_helpers.maximum(tmp6, tmp7)
    tmp10 = triton_helpers.maximum(tmp8, tmp9)
    tmp11 = tl_math.abs(tmp10)
    tmp12 = float('inf')
    tmp13 = tmp11 == tmp12
    tmp14 = 0.0
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    tmp16 = tmp4 - tmp15
    tmp17 = tl_math.exp(tmp16)
    tmp18 = tmp5 - tmp15
    tmp19 = tl_math.exp(tmp18)
    tmp20 = tmp17 + tmp19
    tmp21 = tmp7 - tmp15
    tmp22 = tl_math.exp(tmp21)
    tmp23 = tmp20 + tmp22
    tmp24 = tmp9 - tmp15
    tmp25 = tl_math.exp(tmp24)
    tmp26 = tmp23 + tmp25
    tmp27 = tl_math.log(tmp26)
    tmp28 = tmp27 + tmp15
    tmp29 = tmp3 - tmp28
    tmp30 = 0.001
    tmp31 = tmp29 * tmp30
    tmp33 = tmp32 * tmp30
    tmp36 = tmp3 - tmp35
    tmp37 = tmp36 * tmp30
    tmp38 = 1.0
    tmp39 = tmp37 + tmp38
    tmp40 = tmp34 + tmp39
    tmp41 = tmp33 + tmp40
    tmp42 = tmp31 + tmp41
    tl.store(in_out_ptr0 + x2, tmp42, xmask)


@triton.jit
def triton_poi_fused_add_div_logsumexp_neg_13(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex % 64
    x4 = xindex
    x5 = xindex // 4
    tmp0 = tl.load(in_ptr0 + 4 * x3, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr1 + x4, xmask)
    tmp4 = tl.load(in_ptr2 + 4 * x5, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr0 + (1 + 4 * x3), xmask, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr2 + (1 + 4 * x5), xmask, eviction_policy='evict_last'
        )
    tmp15 = tl.load(in_ptr0 + (2 + 4 * x3), xmask, eviction_policy='evict_last'
        )
    tmp18 = tl.load(in_ptr2 + (2 + 4 * x5), xmask, eviction_policy='evict_last'
        )
    tmp22 = tl.load(in_ptr0 + (3 + 4 * x3), xmask, eviction_policy='evict_last'
        )
    tmp25 = tl.load(in_ptr2 + (3 + 4 * x5), xmask, eviction_policy='evict_last'
        )
    tmp1 = -tmp0
    tmp3 = tmp1 + tmp2
    tmp5 = tmp3 + tmp4
    tmp6 = 1000.0
    tmp7 = tmp5 * tmp6
    tmp9 = -tmp8
    tmp10 = tmp9 + tmp2
    tmp12 = tmp10 + tmp11
    tmp13 = tmp12 * tmp6
    tmp14 = triton_helpers.maximum(tmp7, tmp13)
    tmp16 = -tmp15
    tmp17 = tmp16 + tmp2
    tmp19 = tmp17 + tmp18
    tmp20 = tmp19 * tmp6
    tmp21 = triton_helpers.maximum(tmp14, tmp20)
    tmp23 = -tmp22
    tmp24 = tmp23 + tmp2
    tmp26 = tmp24 + tmp25
    tmp27 = tmp26 * tmp6
    tmp28 = triton_helpers.maximum(tmp21, tmp27)
    tmp29 = tl_math.abs(tmp28)
    tmp30 = float('inf')
    tmp31 = tmp29 == tmp30
    tmp32 = 0.0
    tmp33 = tl.where(tmp31, tmp32, tmp28)
    tmp34 = tmp7 - tmp33
    tmp35 = tl_math.exp(tmp34)
    tmp36 = tmp13 - tmp33
    tmp37 = tl_math.exp(tmp36)
    tmp38 = tmp35 + tmp37
    tmp39 = tmp20 - tmp33
    tmp40 = tl_math.exp(tmp39)
    tmp41 = tmp38 + tmp40
    tmp42 = tmp27 - tmp33
    tmp43 = tl_math.exp(tmp42)
    tmp44 = tmp41 + tmp43
    tl.store(out_ptr0 + x4, tmp28, xmask)
    tl.store(out_ptr1 + x4, tmp44, xmask)


@triton.jit
def triton_poi_fused_add_div_neg_14(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex % 256
    x5 = xindex // 4
    x0 = xindex % 4
    x6 = xindex // 16
    x7 = xindex
    tmp0 = tl.load(in_ptr0 + x4, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr1 + x5, xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr2 + x5, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr3 + x5, xmask, eviction_policy='evict_last')
    tmp18 = tl.load(in_ptr4 + x5, xmask, eviction_policy='evict_last')
    tmp21 = tl.load(in_ptr5 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp1 = -tmp0
    tmp3 = 1e-08
    tmp4 = tmp2 + tmp3
    tmp5 = tl_math.log(tmp4)
    tmp7 = tl_math.log(tmp6)
    tmp9 = tl_math.abs(tmp8)
    tmp10 = float('inf')
    tmp11 = tmp9 == tmp10
    tmp12 = 0.0
    tmp13 = tl.where(tmp11, tmp12, tmp8)
    tmp14 = tmp7 + tmp13
    tmp15 = tmp5 - tmp14
    tmp16 = 0.001
    tmp17 = tmp15 * tmp16
    tmp19 = tmp17 + tmp18
    tmp20 = tmp1 + tmp19
    tmp22 = tmp20 + tmp21
    tmp23 = 1000.0
    tmp24 = tmp22 * tmp23
    tl.store(out_ptr0 + x7, tmp24, xmask)


@triton.jit
def triton_poi_fused_add_div_neg_15(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, in_ptr5, in_ptr6, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex % 256
    x5 = xindex // 4
    x0 = xindex % 4
    x6 = xindex // 16
    x7 = xindex
    tmp0 = tl.load(in_ptr0 + x4, xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr1 + x5, xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr2 + x5, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr3 + x5, xmask, eviction_policy='evict_last')
    tmp18 = tl.load(in_ptr4 + x5, xmask, eviction_policy='evict_last')
    tmp21 = tl.load(in_ptr5 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp22 = tl.load(in_ptr6 + (x0 + 4 * x6), xmask, eviction_policy=
        'evict_last')
    tmp1 = -tmp0
    tmp3 = 1e-08
    tmp4 = tmp2 + tmp3
    tmp5 = tl_math.log(tmp4)
    tmp7 = tl_math.log(tmp6)
    tmp9 = tl_math.abs(tmp8)
    tmp10 = float('inf')
    tmp11 = tmp9 == tmp10
    tmp12 = 0.0
    tmp13 = tl.where(tmp11, tmp12, tmp8)
    tmp14 = tmp7 + tmp13
    tmp15 = tmp5 - tmp14
    tmp16 = 0.001
    tmp17 = tmp15 * tmp16
    tmp19 = tmp17 + tmp18
    tmp20 = tmp1 + tmp19
    tmp23 = tmp21 + tmp22
    tmp24 = tmp20 + tmp23
    tmp25 = 1000.0
    tmp26 = tmp24 * tmp25
    tl.store(out_ptr0 + x7, tmp26, xmask)


@triton.jit
def triton_poi_fused_add_log_logsumexp_mul_sub_16(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp4 = tl.load(in_ptr1 + 4 * x0, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + (1 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr1 + (2 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr1 + (3 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp32 = tl.load(in_ptr2 + x0, xmask)
    tmp34 = tl.load(in_ptr3 + x0, xmask)
    tmp41 = tl.load(in_out_ptr0 + x0, xmask)
    tmp1 = 1e-08
    tmp2 = tmp0 + tmp1
    tmp3 = tl_math.log(tmp2)
    tmp6 = triton_helpers.maximum(tmp4, tmp5)
    tmp8 = triton_helpers.maximum(tmp6, tmp7)
    tmp10 = triton_helpers.maximum(tmp8, tmp9)
    tmp11 = tl_math.abs(tmp10)
    tmp12 = float('inf')
    tmp13 = tmp11 == tmp12
    tmp14 = 0.0
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    tmp16 = tmp4 - tmp15
    tmp17 = tl_math.exp(tmp16)
    tmp18 = tmp5 - tmp15
    tmp19 = tl_math.exp(tmp18)
    tmp20 = tmp17 + tmp19
    tmp21 = tmp7 - tmp15
    tmp22 = tl_math.exp(tmp21)
    tmp23 = tmp20 + tmp22
    tmp24 = tmp9 - tmp15
    tmp25 = tl_math.exp(tmp24)
    tmp26 = tmp23 + tmp25
    tmp27 = tl_math.log(tmp26)
    tmp28 = tmp27 + tmp15
    tmp29 = tmp3 - tmp28
    tmp30 = 0.001
    tmp31 = tmp29 * tmp30
    tmp33 = tl_math.log(tmp32)
    tmp35 = tl_math.abs(tmp34)
    tmp36 = tmp35 == tmp12
    tmp37 = tl.where(tmp36, tmp14, tmp34)
    tmp38 = tmp33 + tmp37
    tmp39 = tmp3 - tmp38
    tmp40 = tmp39 * tmp30
    tmp42 = tmp40 + tmp41
    tmp43 = tmp31 + tmp42
    tl.store(in_out_ptr0 + x0, tmp43, xmask)


@triton.jit
def triton_poi_fused_add_log_logsumexp_mul_sub_17(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = xindex // 4 % 16
    x4 = xindex // 4
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp2 = tl.load(in_ptr1 + 4 * x4, xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr2 + x3, xmask)
    tmp5 = tl.load(in_ptr3 + x3, xmask)
    tmp10 = tl.load(in_ptr0 + (4 + x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp12 = tl.load(in_ptr1 + (1 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp17 = tl.load(in_ptr0 + (8 + x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp19 = tl.load(in_ptr1 + (2 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp24 = tl.load(in_ptr0 + (12 + x0 + 16 * x1), xmask, eviction_policy=
        'evict_last')
    tmp26 = tl.load(in_ptr1 + (3 + 4 * x4), xmask, eviction_policy='evict_last'
        )
    tmp47 = tl.load(in_ptr4 + x3, xmask)
    tmp1 = -tmp0
    tmp3 = tmp1 + tmp2
    tmp6 = tmp4 + tmp5
    tmp7 = tmp3 + tmp6
    tmp8 = 1000.0
    tmp9 = tmp7 * tmp8
    tmp11 = -tmp10
    tmp13 = tmp11 + tmp12
    tmp14 = tmp13 + tmp6
    tmp15 = tmp14 * tmp8
    tmp16 = triton_helpers.maximum(tmp9, tmp15)
    tmp18 = -tmp17
    tmp20 = tmp18 + tmp19
    tmp21 = tmp20 + tmp6
    tmp22 = tmp21 * tmp8
    tmp23 = triton_helpers.maximum(tmp16, tmp22)
    tmp25 = -tmp24
    tmp27 = tmp25 + tmp26
    tmp28 = tmp27 + tmp6
    tmp29 = tmp28 * tmp8
    tmp30 = triton_helpers.maximum(tmp23, tmp29)
    tmp31 = tl_math.abs(tmp30)
    tmp32 = float('inf')
    tmp33 = tmp31 == tmp32
    tmp34 = 0.0
    tmp35 = tl.where(tmp33, tmp34, tmp30)
    tmp36 = tmp9 - tmp35
    tmp37 = tl_math.exp(tmp36)
    tmp38 = tmp15 - tmp35
    tmp39 = tl_math.exp(tmp38)
    tmp40 = tmp37 + tmp39
    tmp41 = tmp22 - tmp35
    tmp42 = tl_math.exp(tmp41)
    tmp43 = tmp40 + tmp42
    tmp44 = tmp29 - tmp35
    tmp45 = tl_math.exp(tmp44)
    tmp46 = tmp43 + tmp45
    tmp48 = 1e-08
    tmp49 = tmp47 + tmp48
    tmp50 = tl_math.log(tmp49)
    tmp51 = tl_math.log(tmp46)
    tmp52 = tmp51 + tmp35
    tmp53 = tmp50 - tmp52
    tmp54 = 0.001
    tmp55 = tmp53 * tmp54
    tmp56 = tmp55 + tmp6
    tl.store(in_out_ptr0 + x3, tmp56, xmask)


@triton.jit
def triton_poi_fused_add_log_logsumexp_mul_sub_18(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp4 = tl.load(in_ptr1 + 4 * x0, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + (1 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr1 + (2 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr1 + (3 + 4 * x0), xmask, eviction_policy='evict_last')
    tmp32 = tl.load(in_ptr2 + x0, xmask)
    tmp34 = tl.load(in_ptr3 + x0, xmask)
    tmp41 = tl.load(in_ptr4 + x0, xmask)
    tmp1 = 1e-08
    tmp2 = tmp0 + tmp1
    tmp3 = tl_math.log(tmp2)
    tmp6 = triton_helpers.maximum(tmp4, tmp5)
    tmp8 = triton_helpers.maximum(tmp6, tmp7)
    tmp10 = triton_helpers.maximum(tmp8, tmp9)
    tmp11 = tl_math.abs(tmp10)
    tmp12 = float('inf')
    tmp13 = tmp11 == tmp12
    tmp14 = 0.0
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    tmp16 = tmp4 - tmp15
    tmp17 = tl_math.exp(tmp16)
    tmp18 = tmp5 - tmp15
    tmp19 = tl_math.exp(tmp18)
    tmp20 = tmp17 + tmp19
    tmp21 = tmp7 - tmp15
    tmp22 = tl_math.exp(tmp21)
    tmp23 = tmp20 + tmp22
    tmp24 = tmp9 - tmp15
    tmp25 = tl_math.exp(tmp24)
    tmp26 = tmp23 + tmp25
    tmp27 = tl_math.log(tmp26)
    tmp28 = tmp27 + tmp15
    tmp29 = tmp3 - tmp28
    tmp30 = 0.001
    tmp31 = tmp29 * tmp30
    tmp33 = tl_math.log(tmp32)
    tmp35 = tl_math.abs(tmp34)
    tmp36 = tmp35 == tmp12
    tmp37 = tl.where(tmp36, tmp14, tmp34)
    tmp38 = tmp33 + tmp37
    tmp39 = tmp3 - tmp38
    tmp40 = tmp39 * tmp30
    tmp42 = tmp40 + tmp41
    tmp43 = tmp31 + tmp42
    tl.store(in_out_ptr0 + x0, tmp43, xmask)


@triton.jit
def triton_per_fused_add_div_exp_mul_neg_sum_19(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, in_ptr5, out_ptr0, out_ptr1, xnumel, rnumel, XBLOCK:
    tl.constexpr):
    xnumel = 64
    RBLOCK: tl.constexpr = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r4 = rindex
    x0 = xindex % 16
    r3 = rindex // 4
    x5 = xindex
    r2 = rindex % 4
    tmp0 = tl.load(in_ptr0 + (r4 + 16 * x0), xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp2 = tl.load(in_ptr1 + (r3 + 4 * x5), xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tl.load(in_ptr2 + (r3 + 4 * x5), xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp8 = tl.load(in_ptr3 + (r3 + 4 * x5), xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp18 = tl.load(in_ptr4 + (r3 + 4 * x5), xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp21 = tl.load(in_ptr5 + (r2 + 4 * x5), xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp1 = -tmp0
    tmp3 = 1e-08
    tmp4 = tmp2 + tmp3
    tmp5 = tl_math.log(tmp4)
    tmp7 = tl_math.log(tmp6)
    tmp9 = tl_math.abs(tmp8)
    tmp10 = float('inf')
    tmp11 = tmp9 == tmp10
    tmp12 = 0.0
    tmp13 = tl.where(tmp11, tmp12, tmp8)
    tmp14 = tmp7 + tmp13
    tmp15 = tmp5 - tmp14
    tmp16 = 0.001
    tmp17 = tmp15 * tmp16
    tmp19 = tmp17 + tmp18
    tmp20 = tmp1 + tmp19
    tmp22 = tmp20 + tmp21
    tmp23 = 1000.0
    tmp24 = tmp22 * tmp23
    tmp25 = tl_math.exp(tmp24)
    tmp26 = tmp25 * tmp0
    tmp27 = tl.broadcast_to(tmp26, [XBLOCK, RBLOCK])
    tmp29 = tl.where(xmask, tmp27, 0)
    tmp30 = tl.sum(tmp29, 1)[:, None]
    tl.store(out_ptr0 + (r4 + 16 * x5), tmp25, xmask)
    tl.store(out_ptr1 + x5, tmp30, xmask)


def call(args):
    arg0_1, arg1_1, arg2_1 = args
    args.clear()
    assert_size_stride(arg0_1, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(arg1_1, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(arg2_1, (4, 4, 4, 4), (64, 16, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 4, 4, 4, 4), (256, 64, 16, 1, 4),
            torch.float32)
        get_raw_stream(0)
        triton_poi_fused_logsumexp_0[grid(1024)](arg2_1, buf0, 1024, XBLOCK
            =256, num_warps=4, num_stages=1)
        buf1 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused_logsumexp_1[grid(256)](buf0, arg2_1, buf1, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf2 = empty_strided_cuda((4, 4, 4, 4, 1), (64, 16, 4, 1, 256),
            torch.float32)
        buf3 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused_add_div_logsumexp_neg_2[grid(256)](arg2_1, arg1_1,
            buf1, buf2, buf3, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf4 = reinterpret_tensor(buf0, (4, 4, 4, 4, 4), (256, 64, 16, 4, 1), 0
            )
        del buf0
        triton_poi_fused_add_div_neg_3[grid(1024)](arg2_1, arg0_1, buf3,
            buf2, arg1_1, buf1, buf4, 1024, XBLOCK=256, num_warps=4,
            num_stages=1)
        buf5 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf4, buf5, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf6 = buf4
        del buf4
        triton_poi_fused_add_neg_5[grid(1024)](arg2_1, arg0_1, buf3, buf2,
            buf5, arg1_1, buf1, buf6, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf7 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused_add_div_log_logsumexp_sub_6[grid(256)](arg0_1,
            buf6, buf7, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf8 = buf6
        del buf6
        triton_poi_fused_add_neg_7[grid(1024)](arg2_1, buf7, arg0_1, buf3,
            buf2, buf5, arg1_1, buf1, buf8, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf9 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused_add_log_logsumexp_sub_8[grid(256)](arg1_1, buf8,
            buf9, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf10 = buf8
        del buf8
        triton_poi_fused_add_neg_9[grid(1024)](arg2_1, buf7, arg0_1, buf3,
            buf2, buf9, buf5, arg1_1, buf1, buf10, 1024, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf11 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        buf12 = buf11
        del buf11
        triton_poi_fused_add_div_log_logsumexp_mul_ones_like_sub_10[grid(256)](
            buf12, arg0_1, buf10, buf7, buf3, buf2, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        del buf2
        buf13 = buf10
        del buf10
        triton_poi_fused_add_div_neg_11[grid(1024)](arg2_1, buf12, buf9,
            buf5, arg1_1, buf1, buf13, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf15 = buf1
        del buf1
        triton_poi_fused_add_log_logsumexp_mul_ones_like_sub_12[grid(256)](
            buf15, arg1_1, buf13, buf9, buf5, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf16 = reinterpret_tensor(buf9, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf9
        buf17 = buf5
        del buf5
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf12,
            buf15, buf16, buf17, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf18 = buf13
        del buf13
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf17,
            buf16, buf12, buf15, buf18, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf19 = buf7
        del buf7
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf18, buf19, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf20 = buf18
        del buf18
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf17,
            buf16, buf12, buf19, buf15, buf20, 1024, XBLOCK=256, num_warps=
            4, num_stages=1)
        buf22 = buf12
        del buf12
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf22,
            arg0_1, buf20, buf17, buf16, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf24 = buf17
        del buf17
        buf25 = buf24
        del buf24
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf25,
            arg2_1, buf22, buf19, buf15, arg1_1, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        buf26 = reinterpret_tensor(buf19, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf19
        buf27 = buf15
        del buf15
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf22,
            buf25, buf26, buf27, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf28 = buf20
        del buf20
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf27,
            buf26, buf22, buf25, buf28, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf29 = reinterpret_tensor(buf16, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf16
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf28, buf29, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf30 = buf28
        del buf28
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf27,
            buf26, buf22, buf29, buf25, buf30, 1024, XBLOCK=256, num_warps=
            4, num_stages=1)
        buf32 = buf22
        del buf22
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf32,
            arg0_1, buf30, buf27, buf26, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf34 = buf27
        del buf27
        buf35 = buf34
        del buf34
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf35,
            arg2_1, buf32, buf29, buf25, arg1_1, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        buf36 = reinterpret_tensor(buf29, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf29
        buf37 = buf25
        del buf25
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf32,
            buf35, buf36, buf37, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf38 = buf30
        del buf30
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf37,
            buf36, buf32, buf35, buf38, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf39 = reinterpret_tensor(buf26, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf26
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf38, buf39, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf40 = buf38
        del buf38
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf37,
            buf36, buf32, buf39, buf35, buf40, 1024, XBLOCK=256, num_warps=
            4, num_stages=1)
        buf42 = buf32
        del buf32
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf42,
            arg0_1, buf40, buf37, buf36, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf44 = buf37
        del buf37
        buf45 = buf44
        del buf44
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf45,
            arg2_1, buf42, buf39, buf35, arg1_1, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        buf46 = reinterpret_tensor(buf39, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf39
        buf47 = buf35
        del buf35
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf42,
            buf45, buf46, buf47, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf48 = buf40
        del buf40
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf47,
            buf46, buf42, buf45, buf48, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf49 = reinterpret_tensor(buf36, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf36
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf48, buf49, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf50 = buf48
        del buf48
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf47,
            buf46, buf42, buf49, buf45, buf50, 1024, XBLOCK=256, num_warps=
            4, num_stages=1)
        buf52 = buf42
        del buf42
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf52,
            arg0_1, buf50, buf47, buf46, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf54 = buf47
        del buf47
        buf55 = buf54
        del buf54
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf55,
            arg2_1, buf52, buf49, buf45, arg1_1, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        buf56 = reinterpret_tensor(buf49, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf49
        buf57 = buf45
        del buf45
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf52,
            buf55, buf56, buf57, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf58 = buf50
        del buf50
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf57,
            buf56, buf52, buf55, buf58, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf59 = reinterpret_tensor(buf46, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf46
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf58, buf59, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf60 = buf58
        del buf58
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf57,
            buf56, buf52, buf59, buf55, buf60, 1024, XBLOCK=256, num_warps=
            4, num_stages=1)
        buf62 = buf52
        del buf52
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf62,
            arg0_1, buf60, buf57, buf56, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf64 = buf57
        del buf57
        buf65 = buf64
        del buf64
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf65,
            arg2_1, buf62, buf59, buf55, arg1_1, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        buf66 = reinterpret_tensor(buf59, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf59
        buf67 = buf55
        del buf55
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf62,
            buf65, buf66, buf67, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf68 = buf60
        del buf60
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf67,
            buf66, buf62, buf65, buf68, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf69 = reinterpret_tensor(buf56, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf56
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf68, buf69, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf70 = buf68
        del buf68
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf67,
            buf66, buf62, buf69, buf65, buf70, 1024, XBLOCK=256, num_warps=
            4, num_stages=1)
        buf72 = buf62
        del buf62
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf72,
            arg0_1, buf70, buf67, buf66, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf74 = buf67
        del buf67
        buf75 = buf74
        del buf74
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf75,
            arg2_1, buf72, buf69, buf65, arg1_1, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        buf76 = reinterpret_tensor(buf69, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf69
        buf77 = buf65
        del buf65
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf72,
            buf75, buf76, buf77, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf78 = buf70
        del buf70
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf77,
            buf76, buf72, buf75, buf78, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf79 = reinterpret_tensor(buf66, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf66
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf78, buf79, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf80 = buf78
        del buf78
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf77,
            buf76, buf72, buf79, buf75, buf80, 1024, XBLOCK=256, num_warps=
            4, num_stages=1)
        buf82 = buf72
        del buf72
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf82,
            arg0_1, buf80, buf77, buf76, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf84 = buf77
        del buf77
        buf85 = buf84
        del buf84
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf85,
            arg2_1, buf82, buf79, buf75, arg1_1, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        buf86 = reinterpret_tensor(buf79, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf79
        buf87 = buf75
        del buf75
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf82,
            buf85, buf86, buf87, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf88 = buf80
        del buf80
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf87,
            buf86, buf82, buf85, buf88, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf89 = reinterpret_tensor(buf76, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf76
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf88, buf89, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf90 = buf88
        del buf88
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf87,
            buf86, buf82, buf89, buf85, buf90, 1024, XBLOCK=256, num_warps=
            4, num_stages=1)
        buf92 = buf82
        del buf82
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf92,
            arg0_1, buf90, buf87, buf86, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf94 = buf87
        del buf87
        buf95 = buf94
        del buf94
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf95,
            arg2_1, buf92, buf89, buf85, arg1_1, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        buf96 = reinterpret_tensor(buf89, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf89
        buf97 = buf85
        del buf85
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf92,
            buf95, buf96, buf97, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf98 = buf90
        del buf90
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf97,
            buf96, buf92, buf95, buf98, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf99 = reinterpret_tensor(buf86, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf86
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf98, buf99, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf100 = buf98
        del buf98
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf97,
            buf96, buf92, buf99, buf95, buf100, 1024, XBLOCK=256, num_warps
            =4, num_stages=1)
        buf101 = buf3
        del buf3
        buf102 = buf101
        del buf101
        triton_poi_fused_add_log_logsumexp_mul_sub_18[grid(256)](buf102,
            arg0_1, buf100, buf97, buf96, buf92, 256, XBLOCK=128, num_warps
            =4, num_stages=1)
        del buf92
        buf104 = buf97
        del buf97
        buf105 = buf104
        del buf104
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf105,
            arg2_1, buf102, buf99, buf95, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf106 = reinterpret_tensor(buf99, (4, 4, 4, 4, 1), (64, 16, 4, 1, 
            256), 0)
        del buf99
        buf107 = buf95
        del buf95
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf102,
            buf105, buf106, buf107, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf108 = buf100
        del buf100
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf107,
            buf106, buf102, buf105, buf108, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf109 = reinterpret_tensor(buf96, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf96
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf108, buf109, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf110 = buf108
        del buf108
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf107,
            buf106, buf102, buf109, buf105, buf110, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf112 = buf102
        del buf102
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf112,
            arg0_1, buf110, buf107, buf106, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf114 = buf107
        del buf107
        buf115 = buf114
        del buf114
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf115,
            arg2_1, buf112, buf109, buf105, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf116 = reinterpret_tensor(buf109, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf109
        buf117 = buf105
        del buf105
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf112,
            buf115, buf116, buf117, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf118 = buf110
        del buf110
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf117,
            buf116, buf112, buf115, buf118, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf119 = reinterpret_tensor(buf106, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf106
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf118, buf119, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf120 = buf118
        del buf118
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf117,
            buf116, buf112, buf119, buf115, buf120, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf122 = buf112
        del buf112
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf122,
            arg0_1, buf120, buf117, buf116, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf124 = buf117
        del buf117
        buf125 = buf124
        del buf124
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf125,
            arg2_1, buf122, buf119, buf115, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf126 = reinterpret_tensor(buf119, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf119
        buf127 = buf115
        del buf115
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf122,
            buf125, buf126, buf127, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf128 = buf120
        del buf120
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf127,
            buf126, buf122, buf125, buf128, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf129 = reinterpret_tensor(buf116, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf116
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf128, buf129, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf130 = buf128
        del buf128
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf127,
            buf126, buf122, buf129, buf125, buf130, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf132 = buf122
        del buf122
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf132,
            arg0_1, buf130, buf127, buf126, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf134 = buf127
        del buf127
        buf135 = buf134
        del buf134
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf135,
            arg2_1, buf132, buf129, buf125, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf136 = reinterpret_tensor(buf129, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf129
        buf137 = buf125
        del buf125
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf132,
            buf135, buf136, buf137, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf138 = buf130
        del buf130
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf137,
            buf136, buf132, buf135, buf138, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf139 = reinterpret_tensor(buf126, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf126
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf138, buf139, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf140 = buf138
        del buf138
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf137,
            buf136, buf132, buf139, buf135, buf140, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf142 = buf132
        del buf132
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf142,
            arg0_1, buf140, buf137, buf136, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf144 = buf137
        del buf137
        buf145 = buf144
        del buf144
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf145,
            arg2_1, buf142, buf139, buf135, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf146 = reinterpret_tensor(buf139, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf139
        buf147 = buf135
        del buf135
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf142,
            buf145, buf146, buf147, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf148 = buf140
        del buf140
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf147,
            buf146, buf142, buf145, buf148, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf149 = reinterpret_tensor(buf136, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf136
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf148, buf149, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf150 = buf148
        del buf148
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf147,
            buf146, buf142, buf149, buf145, buf150, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf152 = buf142
        del buf142
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf152,
            arg0_1, buf150, buf147, buf146, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf154 = buf147
        del buf147
        buf155 = buf154
        del buf154
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf155,
            arg2_1, buf152, buf149, buf145, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf156 = reinterpret_tensor(buf149, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf149
        buf157 = buf145
        del buf145
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf152,
            buf155, buf156, buf157, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf158 = buf150
        del buf150
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf157,
            buf156, buf152, buf155, buf158, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf159 = reinterpret_tensor(buf146, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf146
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf158, buf159, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf160 = buf158
        del buf158
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf157,
            buf156, buf152, buf159, buf155, buf160, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf162 = buf152
        del buf152
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf162,
            arg0_1, buf160, buf157, buf156, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf164 = buf157
        del buf157
        buf165 = buf164
        del buf164
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf165,
            arg2_1, buf162, buf159, buf155, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf166 = reinterpret_tensor(buf159, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf159
        buf167 = buf155
        del buf155
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf162,
            buf165, buf166, buf167, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf168 = buf160
        del buf160
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf167,
            buf166, buf162, buf165, buf168, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf169 = reinterpret_tensor(buf156, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf156
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf168, buf169, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf170 = buf168
        del buf168
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf167,
            buf166, buf162, buf169, buf165, buf170, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf172 = buf162
        del buf162
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf172,
            arg0_1, buf170, buf167, buf166, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf174 = buf167
        del buf167
        buf175 = buf174
        del buf174
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf175,
            arg2_1, buf172, buf169, buf165, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf176 = reinterpret_tensor(buf169, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf169
        buf177 = buf165
        del buf165
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf172,
            buf175, buf176, buf177, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf178 = buf170
        del buf170
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf177,
            buf176, buf172, buf175, buf178, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf179 = reinterpret_tensor(buf166, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf166
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf178, buf179, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf180 = buf178
        del buf178
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf177,
            buf176, buf172, buf179, buf175, buf180, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf182 = buf172
        del buf172
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf182,
            arg0_1, buf180, buf177, buf176, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf184 = buf177
        del buf177
        buf185 = buf184
        del buf184
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf185,
            arg2_1, buf182, buf179, buf175, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf186 = reinterpret_tensor(buf179, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf179
        buf187 = buf175
        del buf175
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf182,
            buf185, buf186, buf187, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf188 = buf180
        del buf180
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf187,
            buf186, buf182, buf185, buf188, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf189 = reinterpret_tensor(buf176, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf176
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf188, buf189, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf190 = buf188
        del buf188
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf187,
            buf186, buf182, buf189, buf185, buf190, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf192 = buf182
        del buf182
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf192,
            arg0_1, buf190, buf187, buf186, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf194 = buf187
        del buf187
        buf195 = buf194
        del buf194
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf195,
            arg2_1, buf192, buf189, buf185, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf196 = reinterpret_tensor(buf189, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf189
        buf197 = buf185
        del buf185
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf192,
            buf195, buf196, buf197, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf198 = buf190
        del buf190
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf197,
            buf196, buf192, buf195, buf198, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf199 = reinterpret_tensor(buf186, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf186
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf198, buf199, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf200 = buf198
        del buf198
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf197,
            buf196, buf192, buf199, buf195, buf200, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf202 = buf192
        del buf192
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf202,
            arg0_1, buf200, buf197, buf196, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf204 = buf197
        del buf197
        buf205 = buf204
        del buf204
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf205,
            arg2_1, buf202, buf199, buf195, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf206 = reinterpret_tensor(buf199, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf199
        buf207 = buf195
        del buf195
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf202,
            buf205, buf206, buf207, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf208 = buf200
        del buf200
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf207,
            buf206, buf202, buf205, buf208, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf209 = reinterpret_tensor(buf196, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf196
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf208, buf209, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf210 = buf208
        del buf208
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf207,
            buf206, buf202, buf209, buf205, buf210, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf212 = buf202
        del buf202
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf212,
            arg0_1, buf210, buf207, buf206, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf214 = buf207
        del buf207
        buf215 = buf214
        del buf214
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf215,
            arg2_1, buf212, buf209, buf205, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf216 = reinterpret_tensor(buf209, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf209
        buf217 = buf205
        del buf205
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf212,
            buf215, buf216, buf217, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf218 = buf210
        del buf210
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf217,
            buf216, buf212, buf215, buf218, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf219 = reinterpret_tensor(buf206, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf206
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf218, buf219, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf220 = buf218
        del buf218
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf217,
            buf216, buf212, buf219, buf215, buf220, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf222 = buf212
        del buf212
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf222,
            arg0_1, buf220, buf217, buf216, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf224 = buf217
        del buf217
        buf225 = buf224
        del buf224
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf225,
            arg2_1, buf222, buf219, buf215, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf226 = reinterpret_tensor(buf219, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf219
        buf227 = buf215
        del buf215
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf222,
            buf225, buf226, buf227, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf228 = buf220
        del buf220
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf227,
            buf226, buf222, buf225, buf228, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf229 = reinterpret_tensor(buf216, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf216
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf228, buf229, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf230 = buf228
        del buf228
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf227,
            buf226, buf222, buf229, buf225, buf230, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf232 = buf222
        del buf222
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf232,
            arg0_1, buf230, buf227, buf226, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf234 = buf227
        del buf227
        buf235 = buf234
        del buf234
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf235,
            arg2_1, buf232, buf229, buf225, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf236 = reinterpret_tensor(buf229, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf229
        buf237 = buf225
        del buf225
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf232,
            buf235, buf236, buf237, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf238 = buf230
        del buf230
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf237,
            buf236, buf232, buf235, buf238, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf239 = reinterpret_tensor(buf226, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf226
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf238, buf239, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf240 = buf238
        del buf238
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf237,
            buf236, buf232, buf239, buf235, buf240, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf242 = buf232
        del buf232
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf242,
            arg0_1, buf240, buf237, buf236, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf244 = buf237
        del buf237
        buf245 = buf244
        del buf244
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf245,
            arg2_1, buf242, buf239, buf235, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf246 = reinterpret_tensor(buf239, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf239
        buf247 = buf235
        del buf235
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf242,
            buf245, buf246, buf247, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf248 = buf240
        del buf240
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf247,
            buf246, buf242, buf245, buf248, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf249 = reinterpret_tensor(buf236, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf236
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf248, buf249, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf250 = buf248
        del buf248
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf247,
            buf246, buf242, buf249, buf245, buf250, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf252 = buf242
        del buf242
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf252,
            arg0_1, buf250, buf247, buf246, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf254 = buf247
        del buf247
        buf255 = buf254
        del buf254
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf255,
            arg2_1, buf252, buf249, buf245, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf256 = reinterpret_tensor(buf249, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf249
        buf257 = buf245
        del buf245
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf252,
            buf255, buf256, buf257, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf258 = buf250
        del buf250
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf257,
            buf256, buf252, buf255, buf258, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf259 = reinterpret_tensor(buf246, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf246
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf258, buf259, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf260 = buf258
        del buf258
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf257,
            buf256, buf252, buf259, buf255, buf260, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf262 = buf252
        del buf252
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf262,
            arg0_1, buf260, buf257, buf256, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf264 = buf257
        del buf257
        buf265 = buf264
        del buf264
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf265,
            arg2_1, buf262, buf259, buf255, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf266 = reinterpret_tensor(buf259, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf259
        buf267 = buf255
        del buf255
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf262,
            buf265, buf266, buf267, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf268 = buf260
        del buf260
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf267,
            buf266, buf262, buf265, buf268, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf269 = reinterpret_tensor(buf256, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf256
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf268, buf269, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf270 = buf268
        del buf268
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf267,
            buf266, buf262, buf269, buf265, buf270, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf272 = buf262
        del buf262
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf272,
            arg0_1, buf270, buf267, buf266, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf274 = buf267
        del buf267
        buf275 = buf274
        del buf274
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf275,
            arg2_1, buf272, buf269, buf265, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf276 = reinterpret_tensor(buf269, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf269
        buf277 = buf265
        del buf265
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf272,
            buf275, buf276, buf277, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf278 = buf270
        del buf270
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf277,
            buf276, buf272, buf275, buf278, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf279 = reinterpret_tensor(buf266, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf266
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf278, buf279, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf280 = buf278
        del buf278
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf277,
            buf276, buf272, buf279, buf275, buf280, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf282 = buf272
        del buf272
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf282,
            arg0_1, buf280, buf277, buf276, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf284 = buf277
        del buf277
        buf285 = buf284
        del buf284
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf285,
            arg2_1, buf282, buf279, buf275, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf286 = reinterpret_tensor(buf279, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf279
        buf287 = buf275
        del buf275
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf282,
            buf285, buf286, buf287, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf288 = buf280
        del buf280
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf287,
            buf286, buf282, buf285, buf288, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf289 = reinterpret_tensor(buf276, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf276
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf288, buf289, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf290 = buf288
        del buf288
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf287,
            buf286, buf282, buf289, buf285, buf290, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf292 = buf282
        del buf282
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf292,
            arg0_1, buf290, buf287, buf286, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf294 = buf287
        del buf287
        buf295 = buf294
        del buf294
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf295,
            arg2_1, buf292, buf289, buf285, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf296 = reinterpret_tensor(buf289, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf289
        buf297 = buf285
        del buf285
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf292,
            buf295, buf296, buf297, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf298 = buf290
        del buf290
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf297,
            buf296, buf292, buf295, buf298, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf299 = reinterpret_tensor(buf286, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf286
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf298, buf299, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf300 = buf298
        del buf298
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf297,
            buf296, buf292, buf299, buf295, buf300, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf302 = buf292
        del buf292
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf302,
            arg0_1, buf300, buf297, buf296, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf304 = buf297
        del buf297
        buf305 = buf304
        del buf304
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf305,
            arg2_1, buf302, buf299, buf295, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf306 = reinterpret_tensor(buf299, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf299
        buf307 = buf295
        del buf295
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf302,
            buf305, buf306, buf307, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf308 = buf300
        del buf300
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf307,
            buf306, buf302, buf305, buf308, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf309 = reinterpret_tensor(buf296, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf296
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf308, buf309, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf310 = buf308
        del buf308
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf307,
            buf306, buf302, buf309, buf305, buf310, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf312 = buf302
        del buf302
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf312,
            arg0_1, buf310, buf307, buf306, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf314 = buf307
        del buf307
        buf315 = buf314
        del buf314
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf315,
            arg2_1, buf312, buf309, buf305, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf316 = reinterpret_tensor(buf309, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf309
        buf317 = buf305
        del buf305
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf312,
            buf315, buf316, buf317, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf318 = buf310
        del buf310
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf317,
            buf316, buf312, buf315, buf318, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf319 = reinterpret_tensor(buf306, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf306
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf318, buf319, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf320 = buf318
        del buf318
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf317,
            buf316, buf312, buf319, buf315, buf320, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf322 = buf312
        del buf312
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf322,
            arg0_1, buf320, buf317, buf316, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf324 = buf317
        del buf317
        buf325 = buf324
        del buf324
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf325,
            arg2_1, buf322, buf319, buf315, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf326 = reinterpret_tensor(buf319, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf319
        buf327 = buf315
        del buf315
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf322,
            buf325, buf326, buf327, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf328 = buf320
        del buf320
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf327,
            buf326, buf322, buf325, buf328, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf329 = reinterpret_tensor(buf316, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf316
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf328, buf329, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf330 = buf328
        del buf328
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf327,
            buf326, buf322, buf329, buf325, buf330, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf332 = buf322
        del buf322
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf332,
            arg0_1, buf330, buf327, buf326, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf334 = buf327
        del buf327
        buf335 = buf334
        del buf334
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf335,
            arg2_1, buf332, buf329, buf325, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf336 = reinterpret_tensor(buf329, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf329
        buf337 = buf325
        del buf325
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf332,
            buf335, buf336, buf337, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf338 = buf330
        del buf330
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf337,
            buf336, buf332, buf335, buf338, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf339 = reinterpret_tensor(buf326, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf326
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf338, buf339, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf340 = buf338
        del buf338
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf337,
            buf336, buf332, buf339, buf335, buf340, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf342 = buf332
        del buf332
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf342,
            arg0_1, buf340, buf337, buf336, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf344 = buf337
        del buf337
        buf345 = buf344
        del buf344
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf345,
            arg2_1, buf342, buf339, buf335, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf346 = reinterpret_tensor(buf339, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf339
        buf347 = buf335
        del buf335
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf342,
            buf345, buf346, buf347, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf348 = buf340
        del buf340
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf347,
            buf346, buf342, buf345, buf348, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf349 = reinterpret_tensor(buf336, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf336
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf348, buf349, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf350 = buf348
        del buf348
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf347,
            buf346, buf342, buf349, buf345, buf350, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf352 = buf342
        del buf342
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf352,
            arg0_1, buf350, buf347, buf346, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf354 = buf347
        del buf347
        buf355 = buf354
        del buf354
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf355,
            arg2_1, buf352, buf349, buf345, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf356 = reinterpret_tensor(buf349, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf349
        buf357 = buf345
        del buf345
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf352,
            buf355, buf356, buf357, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf358 = buf350
        del buf350
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf357,
            buf356, buf352, buf355, buf358, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf359 = reinterpret_tensor(buf346, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf346
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf358, buf359, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf360 = buf358
        del buf358
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf357,
            buf356, buf352, buf359, buf355, buf360, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf362 = buf352
        del buf352
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf362,
            arg0_1, buf360, buf357, buf356, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf364 = buf357
        del buf357
        buf365 = buf364
        del buf364
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf365,
            arg2_1, buf362, buf359, buf355, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf366 = reinterpret_tensor(buf359, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf359
        buf367 = buf355
        del buf355
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf362,
            buf365, buf366, buf367, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf368 = buf360
        del buf360
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf367,
            buf366, buf362, buf365, buf368, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf369 = reinterpret_tensor(buf356, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf356
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf368, buf369, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf370 = buf368
        del buf368
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf367,
            buf366, buf362, buf369, buf365, buf370, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf372 = buf362
        del buf362
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf372,
            arg0_1, buf370, buf367, buf366, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf374 = buf367
        del buf367
        buf375 = buf374
        del buf374
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf375,
            arg2_1, buf372, buf369, buf365, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf376 = reinterpret_tensor(buf369, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf369
        buf377 = buf365
        del buf365
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf372,
            buf375, buf376, buf377, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf378 = buf370
        del buf370
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf377,
            buf376, buf372, buf375, buf378, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf379 = reinterpret_tensor(buf366, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf366
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf378, buf379, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf380 = buf378
        del buf378
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf377,
            buf376, buf372, buf379, buf375, buf380, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf382 = buf372
        del buf372
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf382,
            arg0_1, buf380, buf377, buf376, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf384 = buf377
        del buf377
        buf385 = buf384
        del buf384
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf385,
            arg2_1, buf382, buf379, buf375, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf386 = reinterpret_tensor(buf379, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf379
        buf387 = buf375
        del buf375
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf382,
            buf385, buf386, buf387, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf388 = buf380
        del buf380
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf387,
            buf386, buf382, buf385, buf388, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf389 = reinterpret_tensor(buf376, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf376
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf388, buf389, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf390 = buf388
        del buf388
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf387,
            buf386, buf382, buf389, buf385, buf390, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf392 = buf382
        del buf382
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf392,
            arg0_1, buf390, buf387, buf386, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf394 = buf387
        del buf387
        buf395 = buf394
        del buf394
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf395,
            arg2_1, buf392, buf389, buf385, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf396 = reinterpret_tensor(buf389, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf389
        buf397 = buf385
        del buf385
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf392,
            buf395, buf396, buf397, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf398 = buf390
        del buf390
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf397,
            buf396, buf392, buf395, buf398, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf399 = reinterpret_tensor(buf386, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf386
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf398, buf399, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf400 = buf398
        del buf398
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf397,
            buf396, buf392, buf399, buf395, buf400, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf402 = buf392
        del buf392
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf402,
            arg0_1, buf400, buf397, buf396, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf404 = buf397
        del buf397
        buf405 = buf404
        del buf404
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf405,
            arg2_1, buf402, buf399, buf395, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf406 = reinterpret_tensor(buf399, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf399
        buf407 = buf395
        del buf395
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf402,
            buf405, buf406, buf407, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf408 = buf400
        del buf400
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf407,
            buf406, buf402, buf405, buf408, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf409 = reinterpret_tensor(buf396, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf396
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf408, buf409, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf410 = buf408
        del buf408
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf407,
            buf406, buf402, buf409, buf405, buf410, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf412 = buf402
        del buf402
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf412,
            arg0_1, buf410, buf407, buf406, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf414 = buf407
        del buf407
        buf415 = buf414
        del buf414
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf415,
            arg2_1, buf412, buf409, buf405, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf416 = reinterpret_tensor(buf409, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf409
        buf417 = buf405
        del buf405
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf412,
            buf415, buf416, buf417, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf418 = buf410
        del buf410
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf417,
            buf416, buf412, buf415, buf418, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf419 = reinterpret_tensor(buf406, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf406
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf418, buf419, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf420 = buf418
        del buf418
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf417,
            buf416, buf412, buf419, buf415, buf420, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf422 = buf412
        del buf412
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf422,
            arg0_1, buf420, buf417, buf416, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf424 = buf417
        del buf417
        buf425 = buf424
        del buf424
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf425,
            arg2_1, buf422, buf419, buf415, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf426 = reinterpret_tensor(buf419, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf419
        buf427 = buf415
        del buf415
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf422,
            buf425, buf426, buf427, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf428 = buf420
        del buf420
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf427,
            buf426, buf422, buf425, buf428, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf429 = reinterpret_tensor(buf416, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf416
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf428, buf429, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf430 = buf428
        del buf428
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf427,
            buf426, buf422, buf429, buf425, buf430, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf432 = buf422
        del buf422
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf432,
            arg0_1, buf430, buf427, buf426, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf434 = buf427
        del buf427
        buf435 = buf434
        del buf434
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf435,
            arg2_1, buf432, buf429, buf425, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf436 = reinterpret_tensor(buf429, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf429
        buf437 = buf425
        del buf425
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf432,
            buf435, buf436, buf437, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf438 = buf430
        del buf430
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf437,
            buf436, buf432, buf435, buf438, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf439 = reinterpret_tensor(buf426, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf426
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf438, buf439, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf440 = buf438
        del buf438
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf437,
            buf436, buf432, buf439, buf435, buf440, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf442 = buf432
        del buf432
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf442,
            arg0_1, buf440, buf437, buf436, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf444 = buf437
        del buf437
        buf445 = buf444
        del buf444
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf445,
            arg2_1, buf442, buf439, buf435, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf446 = reinterpret_tensor(buf439, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf439
        buf447 = buf435
        del buf435
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf442,
            buf445, buf446, buf447, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf448 = buf440
        del buf440
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf447,
            buf446, buf442, buf445, buf448, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf449 = reinterpret_tensor(buf436, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf436
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf448, buf449, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf450 = buf448
        del buf448
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf447,
            buf446, buf442, buf449, buf445, buf450, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf452 = buf442
        del buf442
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf452,
            arg0_1, buf450, buf447, buf446, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf454 = buf447
        del buf447
        buf455 = buf454
        del buf454
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf455,
            arg2_1, buf452, buf449, buf445, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf456 = reinterpret_tensor(buf449, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf449
        buf457 = buf445
        del buf445
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf452,
            buf455, buf456, buf457, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf458 = buf450
        del buf450
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf457,
            buf456, buf452, buf455, buf458, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf459 = reinterpret_tensor(buf446, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf446
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf458, buf459, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf460 = buf458
        del buf458
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf457,
            buf456, buf452, buf459, buf455, buf460, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf462 = buf452
        del buf452
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf462,
            arg0_1, buf460, buf457, buf456, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf464 = buf457
        del buf457
        buf465 = buf464
        del buf464
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf465,
            arg2_1, buf462, buf459, buf455, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf466 = reinterpret_tensor(buf459, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf459
        buf467 = buf455
        del buf455
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf462,
            buf465, buf466, buf467, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf468 = buf460
        del buf460
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf467,
            buf466, buf462, buf465, buf468, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf469 = reinterpret_tensor(buf456, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf456
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf468, buf469, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf470 = buf468
        del buf468
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf467,
            buf466, buf462, buf469, buf465, buf470, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf472 = buf462
        del buf462
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf472,
            arg0_1, buf470, buf467, buf466, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf474 = buf467
        del buf467
        buf475 = buf474
        del buf474
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf475,
            arg2_1, buf472, buf469, buf465, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf476 = reinterpret_tensor(buf469, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf469
        buf477 = buf465
        del buf465
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf472,
            buf475, buf476, buf477, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf478 = buf470
        del buf470
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf477,
            buf476, buf472, buf475, buf478, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf479 = reinterpret_tensor(buf466, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf466
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf478, buf479, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf480 = buf478
        del buf478
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf477,
            buf476, buf472, buf479, buf475, buf480, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf482 = buf472
        del buf472
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf482,
            arg0_1, buf480, buf477, buf476, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf484 = buf477
        del buf477
        buf485 = buf484
        del buf484
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf485,
            arg2_1, buf482, buf479, buf475, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf486 = reinterpret_tensor(buf479, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf479
        buf487 = buf475
        del buf475
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf482,
            buf485, buf486, buf487, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf488 = buf480
        del buf480
        triton_poi_fused_add_div_neg_14[grid(1024)](arg2_1, arg0_1, buf487,
            buf486, buf482, buf485, buf488, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf489 = reinterpret_tensor(buf476, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf476
        triton_poi_fused_add_log_logsumexp_mul_sub_4[grid(256)](arg1_1,
            buf488, buf489, 256, XBLOCK=128, num_warps=4, num_stages=1)
        buf490 = buf488
        del buf488
        triton_poi_fused_add_div_neg_15[grid(1024)](arg2_1, arg0_1, buf487,
            buf486, buf482, buf489, buf485, buf490, 1024, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf492 = buf482
        del buf482
        triton_poi_fused_add_log_logsumexp_mul_sub_16[grid(256)](buf492,
            arg0_1, buf490, buf487, buf486, 256, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf486
        buf494 = buf487
        del buf487
        buf495 = buf494
        del buf494
        triton_poi_fused_add_log_logsumexp_mul_sub_17[grid(256)](buf495,
            arg2_1, buf492, buf489, buf485, arg1_1, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        del arg1_1
        buf496 = reinterpret_tensor(buf489, (4, 4, 4, 4, 1), (64, 16, 4, 1,
            256), 0)
        del buf489
        buf497 = buf485
        del buf485
        triton_poi_fused_add_div_logsumexp_neg_13[grid(256)](arg2_1, buf492,
            buf495, buf496, buf497, 256, XBLOCK=256, num_warps=4, num_stages=1)
        buf498 = buf490
        del buf490
        buf499 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_per_fused_add_div_exp_mul_neg_sum_19[grid(64)](arg2_1,
            arg0_1, buf497, buf496, buf492, buf495, buf498, buf499, 64, 16,
            XBLOCK=8, num_warps=2, num_stages=1)
        del arg0_1
        del arg2_1
        del buf492
        del buf495
        del buf496
        del buf497
    return buf499, buf498


class SinkhornDistanceNew(torch.nn.Module):
    """
        Given two empirical measures each with :math:`P_1` locations
        :math:`x\\in\\mathbb{R}^{D_1}` and :math:`P_2` locations :math:`y\\in\\mathbb{R}^{D_2}`,
        outputs an approximation of the regularized OT cost for point clouds.
        Args:
        eps (float): regularization coefficient
        max_iter (int): maximum number of Sinkhorn iterations
        reduction (string, optional): Specifies the reduction to apply to the output:
        'none' | 'mean' | 'sum'. 'none': no reduction will be applied,
        'mean': the sum of the output will be divided by the number of
        elements in the output, 'sum': the output will be summed. Default: 'none'
        Shape:
            - Input: :math:`(N, P_1, D_1)`, :math:`(N, P_2, D_2)`
            - Output: :math:`(N)` or :math:`()`, depending on `reduction`
    """

    def __init__(self, eps=0.001, max_iter=100, reduction='none'):
        super(SinkhornDistanceNew, self).__init__()
        self.eps = eps
        self.max_iter = max_iter
        self.reduction = reduction

    def M(self, C, u, v):
        """
        "Modified cost for logarithmic updates"
        "$M_{ij} = (-c_{ij} + u_i + v_j) / epsilon$"
        """
        return (-C + u.unsqueeze(-1) + v.unsqueeze(-2)) / self.eps

    def forward(self, input_0, input_1, input_2):
        arg0_1 = input_0
        arg1_1 = input_1
        arg2_1 = input_2
        output = call([arg0_1, arg1_1, arg2_1])
        return output[0], output[1]


Measured latency_ms: 0.027908