I found TVM::FloorMod included in the most recent code, So I wanted to look for the FloorMod front-end support, but After I have registered relay and topi for FloorMod , I find that the final calculation procedure calls is llvm
llvm::Value* CodeGenLLVM::VisitExpr_(const Mod* op) {
llvm::Value* a = MakeValue(op->a);
llvm::Value* b = MakeValue(op->b);
if (op->type.is_int()) {
return builder_->CreateSRem(a, b);
} else if (op->type.is_uint()) {
return builder_->CreateURem(a, b);
} else {
CHECK(op->type.is_float());
return builder_->CreateFRem(a, b);
}
}
in floormod if a*b<0 floormod(a,b)=a%b+b , so where should I do this in my code , I don’t think it’s in LLVM.
sorry I just touched on TVM, so can anyone help me?