We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6baaf8 commit 1f0b8a7Copy full SHA for 1f0b8a7
1 file changed
impl/ascend/functions/nlllossv2.cpp
@@ -18,7 +18,8 @@ diopiError_t diopiNLLLossV2(diopiContextHandle_t ctx, diopiTensorHandle_t out, d
18
AscendTensor inputAt(input);
19
if (inputAt.numel() <= 0) {
20
if (diopiReduction_t::ReductionMean == reduction) {
21
- DIOPI_ASCEND_CALL_ACLNN(aclnnInpalceFillScalar, ctx, out, std::nanf(""));
+ diopiScalar_t nans{diopi_dtype_float64, std::nanf("")};
22
+ DIOPI_ASCEND_CALL_ACLNN(aclnnInplaceFillScalar, ctx, out, &nans);
23
} else if (diopiReduction_t::ReductionSum == reduction || diopiReduction_t::ReductionNone == reduction) {
24
DIOPI_ASCEND_CALL_ACLNN(aclnnInplaceZero, ctx, out);
25
}
0 commit comments