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
import torch.nn.parallel
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda


@triton.jit
def triton_per_fused_add_div_mean_min_mul_0(in_out_ptr0, in_ptr0, in_ptr1,
    xnumel, rnumel, XBLOCK: tl.constexpr):
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xoffset + tl.arange(0, XBLOCK)[:, None]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r0 = rindex
    tmp0 = tl.load(in_ptr0 + 4 * (4 * r0 % 4), None, eviction_policy=
        'evict_last')
    tmp1 = tl.load(in_ptr1 + 4 * r0, None, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr0 + (1 + 4 * (4 * r0 % 4)), None, eviction_policy=
        'evict_last')
    tmp5 = tl.load(in_ptr1 + (1 + 4 * r0), None, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr0 + (2 + 4 * (4 * r0 % 4)), None, eviction_policy=
        'evict_last')
    tmp10 = tl.load(in_ptr1 + (2 + 4 * r0), None, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr0 + (3 + 4 * (4 * r0 % 4)), None, eviction_policy
        ='evict_last')
    tmp15 = tl.load(in_ptr1 + (3 + 4 * r0), None, eviction_policy='evict_last')
    tmp19 = tl.load(in_ptr0 + 4)
    tmp20 = tl.broadcast_to(tmp19, [XBLOCK, RBLOCK])
    tmp23 = tl.load(in_ptr0 + 5)
    tmp24 = tl.broadcast_to(tmp23, [XBLOCK, RBLOCK])
    tmp28 = tl.load(in_ptr0 + 6)
    tmp29 = tl.broadcast_to(tmp28, [XBLOCK, RBLOCK])
    tmp33 = tl.load(in_ptr0 + 7)
    tmp34 = tl.broadcast_to(tmp33, [XBLOCK, RBLOCK])
    tmp39 = tl.load(in_ptr0 + 8)
    tmp40 = tl.broadcast_to(tmp39, [XBLOCK, RBLOCK])
    tmp43 = tl.load(in_ptr0 + 9)
    tmp44 = tl.broadcast_to(tmp43, [XBLOCK, RBLOCK])
    tmp48 = tl.load(in_ptr0 + 10)
    tmp49 = tl.broadcast_to(tmp48, [XBLOCK, RBLOCK])
    tmp53 = tl.load(in_ptr0 + 11)
    tmp54 = tl.broadcast_to(tmp53, [XBLOCK, RBLOCK])
    tmp59 = tl.load(in_ptr0 + 12)
    tmp60 = tl.broadcast_to(tmp59, [XBLOCK, RBLOCK])
    tmp63 = tl.load(in_ptr0 + 13)
    tmp64 = tl.broadcast_to(tmp63, [XBLOCK, RBLOCK])
    tmp68 = tl.load(in_ptr0 + 14)
    tmp69 = tl.broadcast_to(tmp68, [XBLOCK, RBLOCK])
    tmp73 = tl.load(in_ptr0 + 15)
    tmp74 = tl.broadcast_to(tmp73, [XBLOCK, RBLOCK])
    tmp82 = tl.load(in_ptr1 + 4 * (4 * r0 % 4), None, eviction_policy=
        'evict_last')
    tmp83 = tl.load(in_ptr0 + 4 * r0, None, eviction_policy='evict_last')
    tmp86 = tl.load(in_ptr1 + (1 + 4 * (4 * r0 % 4)), None, eviction_policy
        ='evict_last')
    tmp87 = tl.load(in_ptr0 + (1 + 4 * r0), None, eviction_policy='evict_last')
    tmp91 = tl.load(in_ptr1 + (2 + 4 * (4 * r0 % 4)), None, eviction_policy
        ='evict_last')
    tmp92 = tl.load(in_ptr0 + (2 + 4 * r0), None, eviction_policy='evict_last')
    tmp96 = tl.load(in_ptr1 + (3 + 4 * (4 * r0 % 4)), None, eviction_policy
        ='evict_last')
    tmp97 = tl.load(in_ptr0 + (3 + 4 * r0), None, eviction_policy='evict_last')
    tmp101 = tl.load(in_ptr1 + 4)
    tmp102 = tl.broadcast_to(tmp101, [XBLOCK, RBLOCK])
    tmp105 = tl.load(in_ptr1 + 5)
    tmp106 = tl.broadcast_to(tmp105, [XBLOCK, RBLOCK])
    tmp110 = tl.load(in_ptr1 + 6)
    tmp111 = tl.broadcast_to(tmp110, [XBLOCK, RBLOCK])
    tmp115 = tl.load(in_ptr1 + 7)
    tmp116 = tl.broadcast_to(tmp115, [XBLOCK, RBLOCK])
    tmp121 = tl.load(in_ptr1 + 8)
    tmp122 = tl.broadcast_to(tmp121, [XBLOCK, RBLOCK])
    tmp125 = tl.load(in_ptr1 + 9)
    tmp126 = tl.broadcast_to(tmp125, [XBLOCK, RBLOCK])
    tmp130 = tl.load(in_ptr1 + 10)
    tmp131 = tl.broadcast_to(tmp130, [XBLOCK, RBLOCK])
    tmp135 = tl.load(in_ptr1 + 11)
    tmp136 = tl.broadcast_to(tmp135, [XBLOCK, RBLOCK])
    tmp141 = tl.load(in_ptr1 + 12)
    tmp142 = tl.broadcast_to(tmp141, [XBLOCK, RBLOCK])
    tmp145 = tl.load(in_ptr1 + 13)
    tmp146 = tl.broadcast_to(tmp145, [XBLOCK, RBLOCK])
    tmp150 = tl.load(in_ptr1 + 14)
    tmp151 = tl.broadcast_to(tmp150, [XBLOCK, RBLOCK])
    tmp155 = tl.load(in_ptr1 + 15)
    tmp156 = tl.broadcast_to(tmp155, [XBLOCK, RBLOCK])
    tmp164 = tl.load(in_ptr0 + (16 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp165 = tl.load(in_ptr1 + (16 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp168 = tl.load(in_ptr0 + (17 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp169 = tl.load(in_ptr1 + (17 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp173 = tl.load(in_ptr0 + (18 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp174 = tl.load(in_ptr1 + (18 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp178 = tl.load(in_ptr0 + (19 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp179 = tl.load(in_ptr1 + (19 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp183 = tl.load(in_ptr0 + 20)
    tmp184 = tl.broadcast_to(tmp183, [XBLOCK, RBLOCK])
    tmp187 = tl.load(in_ptr0 + 21)
    tmp188 = tl.broadcast_to(tmp187, [XBLOCK, RBLOCK])
    tmp192 = tl.load(in_ptr0 + 22)
    tmp193 = tl.broadcast_to(tmp192, [XBLOCK, RBLOCK])
    tmp197 = tl.load(in_ptr0 + 23)
    tmp198 = tl.broadcast_to(tmp197, [XBLOCK, RBLOCK])
    tmp203 = tl.load(in_ptr0 + 24)
    tmp204 = tl.broadcast_to(tmp203, [XBLOCK, RBLOCK])
    tmp207 = tl.load(in_ptr0 + 25)
    tmp208 = tl.broadcast_to(tmp207, [XBLOCK, RBLOCK])
    tmp212 = tl.load(in_ptr0 + 26)
    tmp213 = tl.broadcast_to(tmp212, [XBLOCK, RBLOCK])
    tmp217 = tl.load(in_ptr0 + 27)
    tmp218 = tl.broadcast_to(tmp217, [XBLOCK, RBLOCK])
    tmp223 = tl.load(in_ptr0 + 28)
    tmp224 = tl.broadcast_to(tmp223, [XBLOCK, RBLOCK])
    tmp227 = tl.load(in_ptr0 + 29)
    tmp228 = tl.broadcast_to(tmp227, [XBLOCK, RBLOCK])
    tmp232 = tl.load(in_ptr0 + 30)
    tmp233 = tl.broadcast_to(tmp232, [XBLOCK, RBLOCK])
    tmp237 = tl.load(in_ptr0 + 31)
    tmp238 = tl.broadcast_to(tmp237, [XBLOCK, RBLOCK])
    tmp246 = tl.load(in_ptr1 + (16 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp247 = tl.load(in_ptr0 + (16 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp250 = tl.load(in_ptr1 + (17 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp251 = tl.load(in_ptr0 + (17 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp255 = tl.load(in_ptr1 + (18 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp256 = tl.load(in_ptr0 + (18 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp260 = tl.load(in_ptr1 + (19 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp261 = tl.load(in_ptr0 + (19 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp265 = tl.load(in_ptr1 + 20)
    tmp266 = tl.broadcast_to(tmp265, [XBLOCK, RBLOCK])
    tmp269 = tl.load(in_ptr1 + 21)
    tmp270 = tl.broadcast_to(tmp269, [XBLOCK, RBLOCK])
    tmp274 = tl.load(in_ptr1 + 22)
    tmp275 = tl.broadcast_to(tmp274, [XBLOCK, RBLOCK])
    tmp279 = tl.load(in_ptr1 + 23)
    tmp280 = tl.broadcast_to(tmp279, [XBLOCK, RBLOCK])
    tmp285 = tl.load(in_ptr1 + 24)
    tmp286 = tl.broadcast_to(tmp285, [XBLOCK, RBLOCK])
    tmp289 = tl.load(in_ptr1 + 25)
    tmp290 = tl.broadcast_to(tmp289, [XBLOCK, RBLOCK])
    tmp294 = tl.load(in_ptr1 + 26)
    tmp295 = tl.broadcast_to(tmp294, [XBLOCK, RBLOCK])
    tmp299 = tl.load(in_ptr1 + 27)
    tmp300 = tl.broadcast_to(tmp299, [XBLOCK, RBLOCK])
    tmp305 = tl.load(in_ptr1 + 28)
    tmp306 = tl.broadcast_to(tmp305, [XBLOCK, RBLOCK])
    tmp309 = tl.load(in_ptr1 + 29)
    tmp310 = tl.broadcast_to(tmp309, [XBLOCK, RBLOCK])
    tmp314 = tl.load(in_ptr1 + 30)
    tmp315 = tl.broadcast_to(tmp314, [XBLOCK, RBLOCK])
    tmp319 = tl.load(in_ptr1 + 31)
    tmp320 = tl.broadcast_to(tmp319, [XBLOCK, RBLOCK])
    tmp328 = tl.load(in_ptr0 + (48 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp329 = tl.load(in_ptr1 + (48 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp332 = tl.load(in_ptr0 + (49 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp333 = tl.load(in_ptr1 + (49 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp337 = tl.load(in_ptr0 + (50 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp338 = tl.load(in_ptr1 + (50 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp342 = tl.load(in_ptr0 + (51 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp343 = tl.load(in_ptr1 + (51 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp347 = tl.load(in_ptr0 + 52)
    tmp348 = tl.broadcast_to(tmp347, [XBLOCK, RBLOCK])
    tmp351 = tl.load(in_ptr0 + 53)
    tmp352 = tl.broadcast_to(tmp351, [XBLOCK, RBLOCK])
    tmp356 = tl.load(in_ptr0 + 54)
    tmp357 = tl.broadcast_to(tmp356, [XBLOCK, RBLOCK])
    tmp361 = tl.load(in_ptr0 + 55)
    tmp362 = tl.broadcast_to(tmp361, [XBLOCK, RBLOCK])
    tmp367 = tl.load(in_ptr0 + 56)
    tmp368 = tl.broadcast_to(tmp367, [XBLOCK, RBLOCK])
    tmp371 = tl.load(in_ptr0 + 57)
    tmp372 = tl.broadcast_to(tmp371, [XBLOCK, RBLOCK])
    tmp376 = tl.load(in_ptr0 + 58)
    tmp377 = tl.broadcast_to(tmp376, [XBLOCK, RBLOCK])
    tmp381 = tl.load(in_ptr0 + 59)
    tmp382 = tl.broadcast_to(tmp381, [XBLOCK, RBLOCK])
    tmp387 = tl.load(in_ptr0 + 60)
    tmp388 = tl.broadcast_to(tmp387, [XBLOCK, RBLOCK])
    tmp391 = tl.load(in_ptr0 + 61)
    tmp392 = tl.broadcast_to(tmp391, [XBLOCK, RBLOCK])
    tmp396 = tl.load(in_ptr0 + 62)
    tmp397 = tl.broadcast_to(tmp396, [XBLOCK, RBLOCK])
    tmp401 = tl.load(in_ptr0 + 63)
    tmp402 = tl.broadcast_to(tmp401, [XBLOCK, RBLOCK])
    tmp410 = tl.load(in_ptr0 + (32 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp411 = tl.load(in_ptr1 + (32 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp414 = tl.load(in_ptr0 + (33 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp415 = tl.load(in_ptr1 + (33 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp419 = tl.load(in_ptr0 + (34 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp420 = tl.load(in_ptr1 + (34 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp424 = tl.load(in_ptr0 + (35 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp425 = tl.load(in_ptr1 + (35 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp429 = tl.load(in_ptr0 + 36)
    tmp430 = tl.broadcast_to(tmp429, [XBLOCK, RBLOCK])
    tmp433 = tl.load(in_ptr0 + 37)
    tmp434 = tl.broadcast_to(tmp433, [XBLOCK, RBLOCK])
    tmp438 = tl.load(in_ptr0 + 38)
    tmp439 = tl.broadcast_to(tmp438, [XBLOCK, RBLOCK])
    tmp443 = tl.load(in_ptr0 + 39)
    tmp444 = tl.broadcast_to(tmp443, [XBLOCK, RBLOCK])
    tmp449 = tl.load(in_ptr0 + 40)
    tmp450 = tl.broadcast_to(tmp449, [XBLOCK, RBLOCK])
    tmp453 = tl.load(in_ptr0 + 41)
    tmp454 = tl.broadcast_to(tmp453, [XBLOCK, RBLOCK])
    tmp458 = tl.load(in_ptr0 + 42)
    tmp459 = tl.broadcast_to(tmp458, [XBLOCK, RBLOCK])
    tmp463 = tl.load(in_ptr0 + 43)
    tmp464 = tl.broadcast_to(tmp463, [XBLOCK, RBLOCK])
    tmp469 = tl.load(in_ptr0 + 44)
    tmp470 = tl.broadcast_to(tmp469, [XBLOCK, RBLOCK])
    tmp473 = tl.load(in_ptr0 + 45)
    tmp474 = tl.broadcast_to(tmp473, [XBLOCK, RBLOCK])
    tmp478 = tl.load(in_ptr0 + 46)
    tmp479 = tl.broadcast_to(tmp478, [XBLOCK, RBLOCK])
    tmp483 = tl.load(in_ptr0 + 47)
    tmp484 = tl.broadcast_to(tmp483, [XBLOCK, RBLOCK])
    tmp492 = tl.load(in_ptr1 + (48 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp493 = tl.load(in_ptr0 + (48 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp496 = tl.load(in_ptr1 + (49 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp497 = tl.load(in_ptr0 + (49 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp501 = tl.load(in_ptr1 + (50 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp502 = tl.load(in_ptr0 + (50 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp506 = tl.load(in_ptr1 + (51 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp507 = tl.load(in_ptr0 + (51 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp511 = tl.load(in_ptr1 + 52)
    tmp512 = tl.broadcast_to(tmp511, [XBLOCK, RBLOCK])
    tmp515 = tl.load(in_ptr1 + 53)
    tmp516 = tl.broadcast_to(tmp515, [XBLOCK, RBLOCK])
    tmp520 = tl.load(in_ptr1 + 54)
    tmp521 = tl.broadcast_to(tmp520, [XBLOCK, RBLOCK])
    tmp525 = tl.load(in_ptr1 + 55)
    tmp526 = tl.broadcast_to(tmp525, [XBLOCK, RBLOCK])
    tmp531 = tl.load(in_ptr1 + 56)
    tmp532 = tl.broadcast_to(tmp531, [XBLOCK, RBLOCK])
    tmp535 = tl.load(in_ptr1 + 57)
    tmp536 = tl.broadcast_to(tmp535, [XBLOCK, RBLOCK])
    tmp540 = tl.load(in_ptr1 + 58)
    tmp541 = tl.broadcast_to(tmp540, [XBLOCK, RBLOCK])
    tmp545 = tl.load(in_ptr1 + 59)
    tmp546 = tl.broadcast_to(tmp545, [XBLOCK, RBLOCK])
    tmp551 = tl.load(in_ptr1 + 60)
    tmp552 = tl.broadcast_to(tmp551, [XBLOCK, RBLOCK])
    tmp555 = tl.load(in_ptr1 + 61)
    tmp556 = tl.broadcast_to(tmp555, [XBLOCK, RBLOCK])
    tmp560 = tl.load(in_ptr1 + 62)
    tmp561 = tl.broadcast_to(tmp560, [XBLOCK, RBLOCK])
    tmp565 = tl.load(in_ptr1 + 63)
    tmp566 = tl.broadcast_to(tmp565, [XBLOCK, RBLOCK])
    tmp574 = tl.load(in_ptr1 + (32 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp575 = tl.load(in_ptr0 + (32 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp578 = tl.load(in_ptr1 + (33 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp579 = tl.load(in_ptr0 + (33 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp583 = tl.load(in_ptr1 + (34 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp584 = tl.load(in_ptr0 + (34 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp588 = tl.load(in_ptr1 + (35 + 4 * (4 * r0 % 4)), None,
        eviction_policy='evict_last')
    tmp589 = tl.load(in_ptr0 + (35 + 4 * r0), None, eviction_policy=
        'evict_last')
    tmp593 = tl.load(in_ptr1 + 36)
    tmp594 = tl.broadcast_to(tmp593, [XBLOCK, RBLOCK])
    tmp597 = tl.load(in_ptr1 + 37)
    tmp598 = tl.broadcast_to(tmp597, [XBLOCK, RBLOCK])
    tmp602 = tl.load(in_ptr1 + 38)
    tmp603 = tl.broadcast_to(tmp602, [XBLOCK, RBLOCK])
    tmp607 = tl.load(in_ptr1 + 39)
    tmp608 = tl.broadcast_to(tmp607, [XBLOCK, RBLOCK])
    tmp613 = tl.load(in_ptr1 + 40)
    tmp614 = tl.broadcast_to(tmp613, [XBLOCK, RBLOCK])
    tmp617 = tl.load(in_ptr1 + 41)
    tmp618 = tl.broadcast_to(tmp617, [XBLOCK, RBLOCK])
    tmp622 = tl.load(in_ptr1 + 42)
    tmp623 = tl.broadcast_to(tmp622, [XBLOCK, RBLOCK])
    tmp627 = tl.load(in_ptr1 + 43)
    tmp628 = tl.broadcast_to(tmp627, [XBLOCK, RBLOCK])
    tmp633 = tl.load(in_ptr1 + 44)
    tmp634 = tl.broadcast_to(tmp633, [XBLOCK, RBLOCK])
    tmp637 = tl.load(in_ptr1 + 45)
    tmp638 = tl.broadcast_to(tmp637, [XBLOCK, RBLOCK])
    tmp642 = tl.load(in_ptr1 + 46)
    tmp643 = tl.broadcast_to(tmp642, [XBLOCK, RBLOCK])
    tmp647 = tl.load(in_ptr1 + 47)
    tmp648 = tl.broadcast_to(tmp647, [XBLOCK, RBLOCK])
    tmp2 = tmp0 - tmp1
    tmp3 = tmp2 * tmp2
    tmp6 = tmp4 - tmp5
    tmp7 = tmp6 * tmp6
    tmp8 = tmp3 + tmp7
    tmp11 = tmp9 - tmp10
    tmp12 = tmp11 * tmp11
    tmp13 = tmp8 + tmp12
    tmp16 = tmp14 - tmp15
    tmp17 = tmp16 * tmp16
    tmp18 = tmp13 + tmp17
    tmp21 = tmp20 - tmp1
    tmp22 = tmp21 * tmp21
    tmp25 = tmp24 - tmp5
    tmp26 = tmp25 * tmp25
    tmp27 = tmp22 + tmp26
    tmp30 = tmp29 - tmp10
    tmp31 = tmp30 * tmp30
    tmp32 = tmp27 + tmp31
    tmp35 = tmp34 - tmp15
    tmp36 = tmp35 * tmp35
    tmp37 = tmp32 + tmp36
    tmp38 = triton_helpers.minimum(tmp18, tmp37)
    tmp41 = tmp40 - tmp1
    tmp42 = tmp41 * tmp41
    tmp45 = tmp44 - tmp5
    tmp46 = tmp45 * tmp45
    tmp47 = tmp42 + tmp46
    tmp50 = tmp49 - tmp10
    tmp51 = tmp50 * tmp50
    tmp52 = tmp47 + tmp51
    tmp55 = tmp54 - tmp15
    tmp56 = tmp55 * tmp55
    tmp57 = tmp52 + tmp56
    tmp58 = triton_helpers.minimum(tmp38, tmp57)
    tmp61 = tmp60 - tmp1
    tmp62 = tmp61 * tmp61
    tmp65 = tmp64 - tmp5
    tmp66 = tmp65 * tmp65
    tmp67 = tmp62 + tmp66
    tmp70 = tmp69 - tmp10
    tmp71 = tmp70 * tmp70
    tmp72 = tmp67 + tmp71
    tmp75 = tmp74 - tmp15
    tmp76 = tmp75 * tmp75
    tmp77 = tmp72 + tmp76
    tmp78 = triton_helpers.minimum(tmp58, tmp77)
    tmp79 = tl.broadcast_to(tmp78, [XBLOCK, RBLOCK])
    tmp81 = tl.sum(tmp79, 1)[:, None]
    tmp84 = tmp82 - tmp83
    tmp85 = tmp84 * tmp84
    tmp88 = tmp86 - tmp87
    tmp89 = tmp88 * tmp88
    tmp90 = tmp85 + tmp89
    tmp93 = tmp91 - tmp92
    tmp94 = tmp93 * tmp93
    tmp95 = tmp90 + tmp94
    tmp98 = tmp96 - tmp97
    tmp99 = tmp98 * tmp98
    tmp100 = tmp95 + tmp99
    tmp103 = tmp102 - tmp83
    tmp104 = tmp103 * tmp103
    tmp107 = tmp106 - tmp87
    tmp108 = tmp107 * tmp107
    tmp109 = tmp104 + tmp108
    tmp112 = tmp111 - tmp92
    tmp113 = tmp112 * tmp112
    tmp114 = tmp109 + tmp113
    tmp117 = tmp116 - tmp97
    tmp118 = tmp117 * tmp117
    tmp119 = tmp114 + tmp118
    tmp120 = triton_helpers.minimum(tmp100, tmp119)
    tmp123 = tmp122 - tmp83
    tmp124 = tmp123 * tmp123
    tmp127 = tmp126 - tmp87
    tmp128 = tmp127 * tmp127
    tmp129 = tmp124 + tmp128
    tmp132 = tmp131 - tmp92
    tmp133 = tmp132 * tmp132
    tmp134 = tmp129 + tmp133
    tmp137 = tmp136 - tmp97
    tmp138 = tmp137 * tmp137
    tmp139 = tmp134 + tmp138
    tmp140 = triton_helpers.minimum(tmp120, tmp139)
    tmp143 = tmp142 - tmp83
    tmp144 = tmp143 * tmp143
    tmp147 = tmp146 - tmp87
    tmp148 = tmp147 * tmp147
    tmp149 = tmp144 + tmp148
    tmp152 = tmp151 - tmp92
    tmp153 = tmp152 * tmp152
    tmp154 = tmp149 + tmp153
    tmp157 = tmp156 - tmp97
    tmp158 = tmp157 * tmp157
    tmp159 = tmp154 + tmp158
    tmp160 = triton_helpers.minimum(tmp140, tmp159)
    tmp161 = tl.broadcast_to(tmp160, [XBLOCK, RBLOCK])
    tmp163 = tl.sum(tmp161, 1)[:, None]
    tmp166 = tmp164 - tmp165
    tmp167 = tmp166 * tmp166
    tmp170 = tmp168 - tmp169
    tmp171 = tmp170 * tmp170
    tmp172 = tmp167 + tmp171
    tmp175 = tmp173 - tmp174
    tmp176 = tmp175 * tmp175
    tmp177 = tmp172 + tmp176
    tmp180 = tmp178 - tmp179
    tmp181 = tmp180 * tmp180
    tmp182 = tmp177 + tmp181
    tmp185 = tmp184 - tmp165
    tmp186 = tmp185 * tmp185
    tmp189 = tmp188 - tmp169
    tmp190 = tmp189 * tmp189
    tmp191 = tmp186 + tmp190
    tmp194 = tmp193 - tmp174
    tmp195 = tmp194 * tmp194
    tmp196 = tmp191 + tmp195
    tmp199 = tmp198 - tmp179
    tmp200 = tmp199 * tmp199
    tmp201 = tmp196 + tmp200
    tmp202 = triton_helpers.minimum(tmp182, tmp201)
    tmp205 = tmp204 - tmp165
    tmp206 = tmp205 * tmp205
    tmp209 = tmp208 - tmp169
    tmp210 = tmp209 * tmp209
    tmp211 = tmp206 + tmp210
    tmp214 = tmp213 - tmp174
    tmp215 = tmp214 * tmp214
    tmp216 = tmp211 + tmp215
    tmp219 = tmp218 - tmp179
    tmp220 = tmp219 * tmp219
    tmp221 = tmp216 + tmp220
    tmp222 = triton_helpers.minimum(tmp202, tmp221)
    tmp225 = tmp224 - tmp165
    tmp226 = tmp225 * tmp225
    tmp229 = tmp228 - tmp169
    tmp230 = tmp229 * tmp229
    tmp231 = tmp226 + tmp230
    tmp234 = tmp233 - tmp174
    tmp235 = tmp234 * tmp234
    tmp236 = tmp231 + tmp235
    tmp239 = tmp238 - tmp179
    tmp240 = tmp239 * tmp239
    tmp241 = tmp236 + tmp240
    tmp242 = triton_helpers.minimum(tmp222, tmp241)
    tmp243 = tl.broadcast_to(tmp242, [XBLOCK, RBLOCK])
    tmp245 = tl.sum(tmp243, 1)[:, None]
    tmp248 = tmp246 - tmp247
    tmp249 = tmp248 * tmp248
    tmp252 = tmp250 - tmp251
    tmp253 = tmp252 * tmp252
    tmp254 = tmp249 + tmp253
    tmp257 = tmp255 - tmp256
    tmp258 = tmp257 * tmp257
    tmp259 = tmp254 + tmp258
    tmp262 = tmp260 - tmp261
    tmp263 = tmp262 * tmp262
    tmp264 = tmp259 + tmp263
    tmp267 = tmp266 - tmp247
    tmp268 = tmp267 * tmp267
    tmp271 = tmp270 - tmp251
    tmp272 = tmp271 * tmp271
    tmp273 = tmp268 + tmp272
    tmp276 = tmp275 - tmp256
    tmp277 = tmp276 * tmp276
    tmp278 = tmp273 + tmp277
    tmp281 = tmp280 - tmp261
    tmp282 = tmp281 * tmp281
    tmp283 = tmp278 + tmp282
    tmp284 = triton_helpers.minimum(tmp264, tmp283)
    tmp287 = tmp286 - tmp247
    tmp288 = tmp287 * tmp287
    tmp291 = tmp290 - tmp251
    tmp292 = tmp291 * tmp291
    tmp293 = tmp288 + tmp292
    tmp296 = tmp295 - tmp256
    tmp297 = tmp296 * tmp296
    tmp298 = tmp293 + tmp297
    tmp301 = tmp300 - tmp261
    tmp302 = tmp301 * tmp301
    tmp303 = tmp298 + tmp302
    tmp304 = triton_helpers.minimum(tmp284, tmp303)
    tmp307 = tmp306 - tmp247
    tmp308 = tmp307 * tmp307
    tmp311 = tmp310 - tmp251
    tmp312 = tmp311 * tmp311
    tmp313 = tmp308 + tmp312
    tmp316 = tmp315 - tmp256
    tmp317 = tmp316 * tmp316
    tmp318 = tmp313 + tmp317
    tmp321 = tmp320 - tmp261
    tmp322 = tmp321 * tmp321
    tmp323 = tmp318 + tmp322
    tmp324 = triton_helpers.minimum(tmp304, tmp323)
    tmp325 = tl.broadcast_to(tmp324, [XBLOCK, RBLOCK])
    tmp327 = tl.sum(tmp325, 1)[:, None]
    tmp330 = tmp328 - tmp329
    tmp331 = tmp330 * tmp330
    tmp334 = tmp332 - tmp333
    tmp335 = tmp334 * tmp334
    tmp336 = tmp331 + tmp335
    tmp339 = tmp337 - tmp338
    tmp340 = tmp339 * tmp339
    tmp341 = tmp336 + tmp340
    tmp344 = tmp342 - tmp343
    tmp345 = tmp344 * tmp344
    tmp346 = tmp341 + tmp345
    tmp349 = tmp348 - tmp329
    tmp350 = tmp349 * tmp349
    tmp353 = tmp352 - tmp333
    tmp354 = tmp353 * tmp353
    tmp355 = tmp350 + tmp354
    tmp358 = tmp357 - tmp338
    tmp359 = tmp358 * tmp358
    tmp360 = tmp355 + tmp359
    tmp363 = tmp362 - tmp343
    tmp364 = tmp363 * tmp363
    tmp365 = tmp360 + tmp364
    tmp366 = triton_helpers.minimum(tmp346, tmp365)
    tmp369 = tmp368 - tmp329
    tmp370 = tmp369 * tmp369
    tmp373 = tmp372 - tmp333
    tmp374 = tmp373 * tmp373
    tmp375 = tmp370 + tmp374
    tmp378 = tmp377 - tmp338
    tmp379 = tmp378 * tmp378
    tmp380 = tmp375 + tmp379
    tmp383 = tmp382 - tmp343
    tmp384 = tmp383 * tmp383
    tmp385 = tmp380 + tmp384
    tmp386 = triton_helpers.minimum(tmp366, tmp385)
    tmp389 = tmp388 - tmp329
    tmp390 = tmp389 * tmp389
    tmp393 = tmp392 - tmp333
    tmp394 = tmp393 * tmp393
    tmp395 = tmp390 + tmp394
    tmp398 = tmp397 - tmp338
    tmp399 = tmp398 * tmp398
    tmp400 = tmp395 + tmp399
    tmp403 = tmp402 - tmp343
    tmp404 = tmp403 * tmp403
    tmp405 = tmp400 + tmp404
    tmp406 = triton_helpers.minimum(tmp386, tmp405)
    tmp407 = tl.broadcast_to(tmp406, [XBLOCK, RBLOCK])
    tmp409 = tl.sum(tmp407, 1)[:, None]
    tmp412 = tmp410 - tmp411
    tmp413 = tmp412 * tmp412
    tmp416 = tmp414 - tmp415
    tmp417 = tmp416 * tmp416
    tmp418 = tmp413 + tmp417
    tmp421 = tmp419 - tmp420
    tmp422 = tmp421 * tmp421
    tmp423 = tmp418 + tmp422
    tmp426 = tmp424 - tmp425
    tmp427 = tmp426 * tmp426
    tmp428 = tmp423 + tmp427
    tmp431 = tmp430 - tmp411
    tmp432 = tmp431 * tmp431
    tmp435 = tmp434 - tmp415
    tmp436 = tmp435 * tmp435
    tmp437 = tmp432 + tmp436
    tmp440 = tmp439 - tmp420
    tmp441 = tmp440 * tmp440
    tmp442 = tmp437 + tmp441
    tmp445 = tmp444 - tmp425
    tmp446 = tmp445 * tmp445
    tmp447 = tmp442 + tmp446
    tmp448 = triton_helpers.minimum(tmp428, tmp447)
    tmp451 = tmp450 - tmp411
    tmp452 = tmp451 * tmp451
    tmp455 = tmp454 - tmp415
    tmp456 = tmp455 * tmp455
    tmp457 = tmp452 + tmp456
    tmp460 = tmp459 - tmp420
    tmp461 = tmp460 * tmp460
    tmp462 = tmp457 + tmp461
    tmp465 = tmp464 - tmp425
    tmp466 = tmp465 * tmp465
    tmp467 = tmp462 + tmp466
    tmp468 = triton_helpers.minimum(tmp448, tmp467)
    tmp471 = tmp470 - tmp411
    tmp472 = tmp471 * tmp471
    tmp475 = tmp474 - tmp415
    tmp476 = tmp475 * tmp475
    tmp477 = tmp472 + tmp476
    tmp480 = tmp479 - tmp420
    tmp481 = tmp480 * tmp480
    tmp482 = tmp477 + tmp481
    tmp485 = tmp484 - tmp425
    tmp486 = tmp485 * tmp485
    tmp487 = tmp482 + tmp486
    tmp488 = triton_helpers.minimum(tmp468, tmp487)
    tmp489 = tl.broadcast_to(tmp488, [XBLOCK, RBLOCK])
    tmp491 = tl.sum(tmp489, 1)[:, None]
    tmp494 = tmp492 - tmp493
    tmp495 = tmp494 * tmp494
    tmp498 = tmp496 - tmp497
    tmp499 = tmp498 * tmp498
    tmp500 = tmp495 + tmp499
    tmp503 = tmp501 - tmp502
    tmp504 = tmp503 * tmp503
    tmp505 = tmp500 + tmp504
    tmp508 = tmp506 - tmp507
    tmp509 = tmp508 * tmp508
    tmp510 = tmp505 + tmp509
    tmp513 = tmp512 - tmp493
    tmp514 = tmp513 * tmp513
    tmp517 = tmp516 - tmp497
    tmp518 = tmp517 * tmp517
    tmp519 = tmp514 + tmp518
    tmp522 = tmp521 - tmp502
    tmp523 = tmp522 * tmp522
    tmp524 = tmp519 + tmp523
    tmp527 = tmp526 - tmp507
    tmp528 = tmp527 * tmp527
    tmp529 = tmp524 + tmp528
    tmp530 = triton_helpers.minimum(tmp510, tmp529)
    tmp533 = tmp532 - tmp493
    tmp534 = tmp533 * tmp533
    tmp537 = tmp536 - tmp497
    tmp538 = tmp537 * tmp537
    tmp539 = tmp534 + tmp538
    tmp542 = tmp541 - tmp502
    tmp543 = tmp542 * tmp542
    tmp544 = tmp539 + tmp543
    tmp547 = tmp546 - tmp507
    tmp548 = tmp547 * tmp547
    tmp549 = tmp544 + tmp548
    tmp550 = triton_helpers.minimum(tmp530, tmp549)
    tmp553 = tmp552 - tmp493
    tmp554 = tmp553 * tmp553
    tmp557 = tmp556 - tmp497
    tmp558 = tmp557 * tmp557
    tmp559 = tmp554 + tmp558
    tmp562 = tmp561 - tmp502
    tmp563 = tmp562 * tmp562
    tmp564 = tmp559 + tmp563
    tmp567 = tmp566 - tmp507
    tmp568 = tmp567 * tmp567
    tmp569 = tmp564 + tmp568
    tmp570 = triton_helpers.minimum(tmp550, tmp569)
    tmp571 = tl.broadcast_to(tmp570, [XBLOCK, RBLOCK])
    tmp573 = tl.sum(tmp571, 1)[:, None]
    tmp576 = tmp574 - tmp575
    tmp577 = tmp576 * tmp576
    tmp580 = tmp578 - tmp579
    tmp581 = tmp580 * tmp580
    tmp582 = tmp577 + tmp581
    tmp585 = tmp583 - tmp584
    tmp586 = tmp585 * tmp585
    tmp587 = tmp582 + tmp586
    tmp590 = tmp588 - tmp589
    tmp591 = tmp590 * tmp590
    tmp592 = tmp587 + tmp591
    tmp595 = tmp594 - tmp575
    tmp596 = tmp595 * tmp595
    tmp599 = tmp598 - tmp579
    tmp600 = tmp599 * tmp599
    tmp601 = tmp596 + tmp600
    tmp604 = tmp603 - tmp584
    tmp605 = tmp604 * tmp604
    tmp606 = tmp601 + tmp605
    tmp609 = tmp608 - tmp589
    tmp610 = tmp609 * tmp609
    tmp611 = tmp606 + tmp610
    tmp612 = triton_helpers.minimum(tmp592, tmp611)
    tmp615 = tmp614 - tmp575
    tmp616 = tmp615 * tmp615
    tmp619 = tmp618 - tmp579
    tmp620 = tmp619 * tmp619
    tmp621 = tmp616 + tmp620
    tmp624 = tmp623 - tmp584
    tmp625 = tmp624 * tmp624
    tmp626 = tmp621 + tmp625
    tmp629 = tmp628 - tmp589
    tmp630 = tmp629 * tmp629
    tmp631 = tmp626 + tmp630
    tmp632 = triton_helpers.minimum(tmp612, tmp631)
    tmp635 = tmp634 - tmp575
    tmp636 = tmp635 * tmp635
    tmp639 = tmp638 - tmp579
    tmp640 = tmp639 * tmp639
    tmp641 = tmp636 + tmp640
    tmp644 = tmp643 - tmp584
    tmp645 = tmp644 * tmp644
    tmp646 = tmp641 + tmp645
    tmp649 = tmp648 - tmp589
    tmp650 = tmp649 * tmp649
    tmp651 = tmp646 + tmp650
    tmp652 = triton_helpers.minimum(tmp632, tmp651)
    tmp653 = tl.broadcast_to(tmp652, [XBLOCK, RBLOCK])
    tmp655 = tl.sum(tmp653, 1)[:, None]
    tmp656 = 4.0
    tmp657 = tmp81 / tmp656
    tmp658 = 0.5
    tmp659 = tmp657 * tmp658
    tmp660 = tmp163 / tmp656
    tmp661 = tmp660 * tmp658
    tmp662 = tmp659 + tmp661
    tmp663 = 0.25
    tmp664 = tmp662 * tmp663
    tmp665 = 0.0
    tmp666 = tmp664 + tmp665
    tmp667 = tmp245 / tmp656
    tmp668 = tmp667 * tmp658
    tmp669 = tmp327 / tmp656
    tmp670 = tmp669 * tmp658
    tmp671 = tmp668 + tmp670
    tmp672 = tmp671 * tmp663
    tmp673 = tmp666 + tmp672
    tmp674 = tmp491 / tmp656
    tmp675 = tmp674 * tmp658
    tmp676 = tmp655 / tmp656
    tmp677 = tmp676 * tmp658
    tmp678 = tmp675 + tmp677
    tmp679 = tmp678 * tmp663
    tmp680 = tmp673 + tmp679
    tmp681 = tmp409 / tmp656
    tmp682 = tmp681 * tmp658
    tmp683 = tmp573 / tmp656
    tmp684 = tmp683 * tmp658
    tmp685 = tmp682 + tmp684
    tmp686 = tmp685 * tmp663
    tmp687 = tmp680 + tmp686
    tmp688 = 100.0
    tmp689 = tmp687 * tmp688
    tl.debug_barrier()
    tl.store(in_out_ptr0 + tl.full([XBLOCK, 1], 0, tl.int32), tmp689, None)


def call(args):
    arg0_1, arg1_1 = args
    args.clear()
    assert_size_stride(arg0_1, (4, 4, 4), (16, 4, 1))
    assert_size_stride(arg1_1, (4, 4, 4), (16, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf10 = empty_strided_cuda((), (), torch.float32)
        buf14 = buf10
        del buf10
        buf17 = buf14
        del buf14
        get_raw_stream(0)
        triton_per_fused_add_div_mean_min_mul_0[grid(1)](buf17, arg0_1,
            arg1_1, 1, 4, XBLOCK=1, num_warps=2, num_stages=1)
        del arg0_1
        del arg1_1
    return buf17,


def array2samples_distance(array1, array2):
    """
    arguments: 
        array1: the array, size: (num_point, num_feature)
        array2: the samples, size: (num_point, num_feature)
    returns:
        distances: each entry is the distance from a sample to array1 
    """
    num_point1, _num_features1 = array1.shape
    num_point2, num_features2 = array2.shape
    expanded_array1 = array1.repeat(num_point2, 1)
    expanded_array2 = torch.reshape(torch.unsqueeze(array2, 1).repeat(1,
        num_point1, 1), (-1, num_features2))
    distances = (expanded_array1 - expanded_array2) * (expanded_array1 -
        expanded_array2)
    distances = torch.sum(distances, dim=1)
    distances = torch.reshape(distances, (num_point2, num_point1))
    distances = torch.min(distances, dim=1)[0]
    distances = torch.mean(distances)
    return distances


def chamfer_distance_numpy(array1, array2):
    batch_size, _num_point, _num_features = array1.shape
    dist = 0
    for i in range(batch_size):
        av_dist1 = array2samples_distance(array1[i], array2[i])
        av_dist2 = array2samples_distance(array2[i], array1[i])
        dist = dist + (0.5 * av_dist1 + 0.5 * av_dist2) / batch_size
    return dist * 100


class PointLossNew(nn.Module):

    def __init__(self):
        super(PointLossNew, self).__init__()

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


Measured latency_ms: 0.015341