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

Method LEQ>

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

Source from the content-addressed store, hash-verified

314//! LEQ: x <= y ? 1 : 0
315template <>
316mlir::Value lower_mode<Mode::LEQ>(
317 mlir::OpBuilder& builder, mlir::Location loc, ValueRange operands) {
318 ValueBuilderHelper helper(builder, loc);
319 return helper.select(
320 helper.le(operands[0], operands[1]), helper.const_f32(1.f),
321 helper.const_f32(0.f));
322}
323
324//! LOG_SUM_EXP: log(exp(x) + exp(y))
325template <>

Callers

nothing calls this directly

Calls 2

const_f32Method · 0.80
selectMethod · 0.45

Tested by

no test coverage detected