MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / max

Method max

src/jit/impl/mlir/ir/common.cpp:73–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71#undef cb
72
73mlir::Value ValueBuilderHelper::max(mlir::Value lhs, mlir::Value rhs) {
74 mlir::Value cmp = m_builder.create<mlir::CmpFOp>(
75 m_location, mlir::CmpFPredicate::OGT, lhs, rhs);
76 return m_builder.create<mlir::SelectOp>(m_location, cmp, lhs, rhs);
77}
78
79mlir::Value ValueBuilderHelper::min(mlir::Value lhs, mlir::Value rhs) {
80 mlir::Value cmp = m_builder.create<mlir::CmpFOp>(

Callers 9

init_output_dtypeMethod · 0.45
atan2_approxFunction · 0.45
H_SWISH>Method · 0.45
RELU>Method · 0.45
FUSE_ADD_H_SWISH>Method · 0.45
FUSE_ADD_RELU>Method · 0.45
initFunction · 0.45
gen_nozeroFunction · 0.45
update_checkerMethod · 0.45

Calls

no outgoing calls

Tested by 2

gen_nozeroFunction · 0.36
update_checkerMethod · 0.36