[Mlir-commits] [mlir] [MLIR][NVVM] Add rsqrt Op (PR #195854)
Varad Rahul Kamthe
llvmlistbot at llvm.org
Fri May 8 04:44:50 PDT 2026
================
@@ -3515,6 +3515,25 @@ Ex2Op::getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
return {id, {mt.lookupValue(thisOp.getSrc())}};
}
+mlir::NVVM::IDArgPair
+RsqrtApproxOp::getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
+ llvm::IRBuilderBase &builder) {
+ auto thisOp = cast<NVVM::RsqrtApproxOp>(op);
+ Type t = thisOp.getRes().getType();
+ bool isFtz = thisOp.getFtz();
+
+ llvm::Intrinsic::ID id = [&] {
+ if (t.isF32())
+ return isFtz ? llvm::Intrinsic::nvvm_rsqrt_approx_ftz_f
----------------
varadk27 wrote:
Updated in the latest revision. Thanks @grypp! Added the {}
https://github.com/llvm/llvm-project/pull/195854
More information about the Mlir-commits
mailing list