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.triton_helpers import libdevice
import torch.utils.data
import torch._utils
import torch.nn.parallel
import torch.optim
from torch.autograd import Variable as Variable
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_mul_neg_pow_sqrt_std_sub_sum_0(in_out_ptr0,
    in_ptr0, in_ptr1, xnumel, rnumel, XBLOCK: tl.constexpr):
    RBLOCK: tl.constexpr = 64
    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 % 16
    r1 = rindex // 16
    tmp0 = tl.load(in_ptr0 + (48 + r0 + 64 * r1), None)
    tmp4 = tl.load(in_ptr1 + (48 + r0 + 64 * r1), None)
    tmp47 = tl.load(in_ptr0 + (32 + r0 + 64 * r1), None)
    tmp51 = tl.load(in_ptr1 + (32 + r0 + 64 * r1), None)
    tmp91 = tl.load(in_ptr0 + (16 + r0 + 64 * r1), None)
    tmp95 = tl.load(in_ptr1 + (16 + r0 + 64 * r1), None)
    tmp135 = tl.load(in_ptr0 + (r0 + 64 * r1), None)
    tmp139 = tl.load(in_ptr1 + (r0 + 64 * r1), None)
    tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp3 = tl.sum(tmp1, 1)[:, None]
    tmp5 = tl.broadcast_to(tmp4, [XBLOCK, RBLOCK])
    tmp7 = tl.sum(tmp5, 1)[:, None]
    tmp8 = 64.0
    tmp9 = tmp3 / tmp8
    tmp10 = tmp0 - tmp9
    tmp11 = tmp7 / tmp8
    tmp12 = tmp4 - tmp11
    tmp13 = tmp10 * tmp12
    tmp14 = tl.broadcast_to(tmp13, [XBLOCK, RBLOCK])
    tmp16 = tl.sum(tmp14, 1)[:, None]
    tmp17 = tmp10 * tmp10
    tmp18 = tl.broadcast_to(tmp17, [XBLOCK, RBLOCK])
    tmp20 = tl.sum(tmp18, 1)[:, None]
    tmp21 = tmp12 * tmp12
    tmp22 = tl.broadcast_to(tmp21, [XBLOCK, RBLOCK])
    tmp24 = tl.sum(tmp22, 1)[:, None]
    tmp26 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp28 = tl.sum(tmp26, 1)[:, None]
    tmp29 = tl.full([XBLOCK, 1], 64, tl.int32)
    tmp30 = tmp29.to(tl.float32)
    tmp31 = tmp28 / tmp30
    tmp32 = tmp1 - tmp31
    tmp33 = tmp32 * tmp32
    tmp34 = tl.broadcast_to(tmp33, [XBLOCK, RBLOCK])
    tmp36 = tl.sum(tmp34, 1)[:, None]
    tmp38 = tl.broadcast_to(tmp5, [XBLOCK, RBLOCK])
    tmp40 = tl.sum(tmp38, 1)[:, None]
    tmp41 = tmp40 / tmp30
    tmp42 = tmp5 - tmp41
    tmp43 = tmp42 * tmp42
    tmp44 = tl.broadcast_to(tmp43, [XBLOCK, RBLOCK])
    tmp46 = tl.sum(tmp44, 1)[:, None]
    tmp48 = tl.broadcast_to(tmp47, [XBLOCK, RBLOCK])
    tmp50 = tl.sum(tmp48, 1)[:, None]
    tmp52 = tl.broadcast_to(tmp51, [XBLOCK, RBLOCK])
    tmp54 = tl.sum(tmp52, 1)[:, None]
    tmp55 = tmp50 / tmp8
    tmp56 = tmp47 - tmp55
    tmp57 = tmp54 / tmp8
    tmp58 = tmp51 - tmp57
    tmp59 = tmp56 * tmp58
    tmp60 = tl.broadcast_to(tmp59, [XBLOCK, RBLOCK])
    tmp62 = tl.sum(tmp60, 1)[:, None]
    tmp63 = tmp56 * tmp56
    tmp64 = tl.broadcast_to(tmp63, [XBLOCK, RBLOCK])
    tmp66 = tl.sum(tmp64, 1)[:, None]
    tmp67 = tmp58 * tmp58
    tmp68 = tl.broadcast_to(tmp67, [XBLOCK, RBLOCK])
    tmp70 = tl.sum(tmp68, 1)[:, None]
    tmp72 = tl.broadcast_to(tmp48, [XBLOCK, RBLOCK])
    tmp74 = tl.sum(tmp72, 1)[:, None]
    tmp75 = tmp74 / tmp30
    tmp76 = tmp48 - tmp75
    tmp77 = tmp76 * tmp76
    tmp78 = tl.broadcast_to(tmp77, [XBLOCK, RBLOCK])
    tmp80 = tl.sum(tmp78, 1)[:, None]
    tmp82 = tl.broadcast_to(tmp52, [XBLOCK, RBLOCK])
    tmp84 = tl.sum(tmp82, 1)[:, None]
    tmp85 = tmp84 / tmp30
    tmp86 = tmp52 - tmp85
    tmp87 = tmp86 * tmp86
    tmp88 = tl.broadcast_to(tmp87, [XBLOCK, RBLOCK])
    tmp90 = tl.sum(tmp88, 1)[:, None]
    tmp92 = tl.broadcast_to(tmp91, [XBLOCK, RBLOCK])
    tmp94 = tl.sum(tmp92, 1)[:, None]
    tmp96 = tl.broadcast_to(tmp95, [XBLOCK, RBLOCK])
    tmp98 = tl.sum(tmp96, 1)[:, None]
    tmp99 = tmp94 / tmp8
    tmp100 = tmp91 - tmp99
    tmp101 = tmp98 / tmp8
    tmp102 = tmp95 - tmp101
    tmp103 = tmp100 * tmp102
    tmp104 = tl.broadcast_to(tmp103, [XBLOCK, RBLOCK])
    tmp106 = tl.sum(tmp104, 1)[:, None]
    tmp107 = tmp100 * tmp100
    tmp108 = tl.broadcast_to(tmp107, [XBLOCK, RBLOCK])
    tmp110 = tl.sum(tmp108, 1)[:, None]
    tmp111 = tmp102 * tmp102
    tmp112 = tl.broadcast_to(tmp111, [XBLOCK, RBLOCK])
    tmp114 = tl.sum(tmp112, 1)[:, None]
    tmp116 = tl.broadcast_to(tmp92, [XBLOCK, RBLOCK])
    tmp118 = tl.sum(tmp116, 1)[:, None]
    tmp119 = tmp118 / tmp30
    tmp120 = tmp92 - tmp119
    tmp121 = tmp120 * tmp120
    tmp122 = tl.broadcast_to(tmp121, [XBLOCK, RBLOCK])
    tmp124 = tl.sum(tmp122, 1)[:, None]
    tmp126 = tl.broadcast_to(tmp96, [XBLOCK, RBLOCK])
    tmp128 = tl.sum(tmp126, 1)[:, None]
    tmp129 = tmp128 / tmp30
    tmp130 = tmp96 - tmp129
    tmp131 = tmp130 * tmp130
    tmp132 = tl.broadcast_to(tmp131, [XBLOCK, RBLOCK])
    tmp134 = tl.sum(tmp132, 1)[:, None]
    tmp136 = tl.broadcast_to(tmp135, [XBLOCK, RBLOCK])
    tmp138 = tl.sum(tmp136, 1)[:, None]
    tmp140 = tl.broadcast_to(tmp139, [XBLOCK, RBLOCK])
    tmp142 = tl.sum(tmp140, 1)[:, None]
    tmp143 = tmp138 / tmp8
    tmp144 = tmp135 - tmp143
    tmp145 = tmp142 / tmp8
    tmp146 = tmp139 - tmp145
    tmp147 = tmp144 * tmp146
    tmp148 = tl.broadcast_to(tmp147, [XBLOCK, RBLOCK])
    tmp150 = tl.sum(tmp148, 1)[:, None]
    tmp151 = tmp144 * tmp144
    tmp152 = tl.broadcast_to(tmp151, [XBLOCK, RBLOCK])
    tmp154 = tl.sum(tmp152, 1)[:, None]
    tmp155 = tmp146 * tmp146
    tmp156 = tl.broadcast_to(tmp155, [XBLOCK, RBLOCK])
    tmp158 = tl.sum(tmp156, 1)[:, None]
    tmp160 = tl.broadcast_to(tmp136, [XBLOCK, RBLOCK])
    tmp162 = tl.sum(tmp160, 1)[:, None]
    tmp163 = tmp162 / tmp30
    tmp164 = tmp136 - tmp163
    tmp165 = tmp164 * tmp164
    tmp166 = tl.broadcast_to(tmp165, [XBLOCK, RBLOCK])
    tmp168 = tl.sum(tmp166, 1)[:, None]
    tmp170 = tl.broadcast_to(tmp140, [XBLOCK, RBLOCK])
    tmp172 = tl.sum(tmp170, 1)[:, None]
    tmp173 = tmp172 / tmp30
    tmp174 = tmp140 - tmp173
    tmp175 = tmp174 * tmp174
    tmp176 = tl.broadcast_to(tmp175, [XBLOCK, RBLOCK])
    tmp178 = tl.sum(tmp176, 1)[:, None]
    tmp179 = libdevice.sqrt(tmp154)
    tmp180 = libdevice.sqrt(tmp158)
    tmp181 = tmp179 * tmp180
    tmp182 = tmp150 / tmp181
    tmp183 = 2.0
    tmp184 = tmp182 * tmp183
    tmp185 = 63.0
    tmp186 = tmp168 / tmp185
    tmp187 = libdevice.sqrt(tmp186)
    tmp188 = tmp184 * tmp187
    tmp189 = tmp178 / tmp185
    tmp190 = libdevice.sqrt(tmp189)
    tmp191 = tmp188 * tmp190
    tmp192 = tmp187 * tmp187
    tmp193 = tmp190 * tmp190
    tmp194 = tmp192 + tmp193
    tmp195 = tmp143 - tmp145
    tmp196 = tmp195 * tmp195
    tmp197 = tmp194 + tmp196
    tmp198 = tmp191 / tmp197
    tmp199 = libdevice.sqrt(tmp110)
    tmp200 = libdevice.sqrt(tmp114)
    tmp201 = tmp199 * tmp200
    tmp202 = tmp106 / tmp201
    tmp203 = tmp202 * tmp183
    tmp204 = tmp124 / tmp185
    tmp205 = libdevice.sqrt(tmp204)
    tmp206 = tmp203 * tmp205
    tmp207 = tmp134 / tmp185
    tmp208 = libdevice.sqrt(tmp207)
    tmp209 = tmp206 * tmp208
    tmp210 = tmp205 * tmp205
    tmp211 = tmp208 * tmp208
    tmp212 = tmp210 + tmp211
    tmp213 = tmp99 - tmp101
    tmp214 = tmp213 * tmp213
    tmp215 = tmp212 + tmp214
    tmp216 = tmp209 / tmp215
    tmp217 = libdevice.sqrt(tmp66)
    tmp218 = libdevice.sqrt(tmp70)
    tmp219 = tmp217 * tmp218
    tmp220 = tmp62 / tmp219
    tmp221 = tmp220 * tmp183
    tmp222 = tmp80 / tmp185
    tmp223 = libdevice.sqrt(tmp222)
    tmp224 = tmp221 * tmp223
    tmp225 = tmp90 / tmp185
    tmp226 = libdevice.sqrt(tmp225)
    tmp227 = tmp224 * tmp226
    tmp228 = tmp223 * tmp223
    tmp229 = tmp226 * tmp226
    tmp230 = tmp228 + tmp229
    tmp231 = tmp55 - tmp57
    tmp232 = tmp231 * tmp231
    tmp233 = tmp230 + tmp232
    tmp234 = tmp227 / tmp233
    tmp235 = libdevice.sqrt(tmp20)
    tmp236 = libdevice.sqrt(tmp24)
    tmp237 = tmp235 * tmp236
    tmp238 = tmp16 / tmp237
    tmp239 = tmp238 * tmp183
    tmp240 = tmp36 / tmp185
    tmp241 = libdevice.sqrt(tmp240)
    tmp242 = tmp239 * tmp241
    tmp243 = tmp46 / tmp185
    tmp244 = libdevice.sqrt(tmp243)
    tmp245 = tmp242 * tmp244
    tmp246 = tmp241 * tmp241
    tmp247 = tmp244 * tmp244
    tmp248 = tmp246 + tmp247
    tmp249 = tmp9 - tmp11
    tmp250 = tmp249 * tmp249
    tmp251 = tmp248 + tmp250
    tmp252 = tmp245 / tmp251
    tmp253 = 0.0
    tmp254 = tmp198 + tmp253
    tmp255 = tmp254 + tmp216
    tmp256 = tmp255 + tmp234
    tmp257 = tmp256 + tmp252
    tmp258 = -tmp257
    tl.debug_barrier()
    tl.store(in_out_ptr0 + tl.full([XBLOCK, 1], 0, tl.int32), tmp258, None)


def call(args):
    arg0_1, arg1_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))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf11 = empty_strided_cuda((), (), torch.float32)
        buf13 = buf11
        del buf11
        buf56 = buf13
        del buf13
        get_raw_stream(0)
        triton_per_fused_add_div_mean_mul_neg_pow_sqrt_std_sub_sum_0[grid(1)](
            buf56, arg0_1, arg1_1, 1, 64, XBLOCK=1, num_warps=2, num_stages=1)
        del arg0_1
        del arg1_1
    return buf56,


class My_lossNew(torch.nn.Module):

    def __init__(self):
        super().__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.015268