MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / LOG_SUM_EXP>

Method LOG_SUM_EXP>

src/jit/impl/mlir/ir/each_mode.cpp:326–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324//! LOG_SUM_EXP: log(exp(x) + exp(y))
325template <>
326mlir::Value lower_mode<Mode::LOG_SUM_EXP>(
327 mlir::OpBuilder& builder, mlir::Location loc, ValueRange operands) {
328 ValueBuilderHelper helper(builder, loc);
329 return helper.log(helper.add(helper.exp(operands[0]), helper.exp(operands[1])));
330}
331
332//! LT: x < y ? 1 : 0
333template <>

Callers

nothing calls this directly

Calls 3

logMethod · 0.45
addMethod · 0.45
expMethod · 0.45

Tested by

no test coverage detected