- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ConstantFoldQuantizableOperands (0.34 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold.h
SmallVector<Value> ConstantFoldOpIfPossible(Operation* op); // This pattern tries to constant-fold the quantizable operands of supported // TF operations. struct ConstantFoldQuantizableOperands : public RewritePattern { public: explicit ConstantFoldQuantizableOperands(MLIRContext* context) : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {} LogicalResult matchAndRewrite(Operation* op,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jul 04 14:27:31 UTC 2023 - 1.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold_test.cc
const auto test_func = module_op_ref->lookupSymbol<func::FuncOp>("test_fold_constant"); ASSERT_THAT(test_func, NotNull()); RewritePatternSet patterns(ctx_.get()); patterns.add<ConstantFoldQuantizableOperands>(ctx_.get()); EXPECT_TRUE( succeeded(applyPatternsAndFoldGreedily(test_func, std::move(patterns)))); auto depthwise_conv_op = FindOperationOfType<TF::DepthwiseConv2dNativeOp>(test_func);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 04 07:19:09 UTC 2024 - 10.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold.cc
OpBuilder builder(op); SmallVector<Value> results; if (failed(FoldOperation(builder, op, results))) { return op->getResults(); } return results; } LogicalResult ConstantFoldQuantizableOperands::matchAndRewrite( Operation* op, PatternRewriter& rewriter) const { absl::flat_hash_set<int> quantizable_operands = GetQuantizableOperands(op); if (quantizable_operands.empty()) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc
// with a constant operand to a preceding affine operation. RewritePatternSet patterns(ctx); populateWithGenerated(patterns); patterns.add<RemoveIdentity, ConstantFoldQuantizableOperands>(ctx); if (op_set_ != OpSet::XLA) { // Convert Einsum into BatchMatMul for non-XLA opsets. // For the uniform opset, it is requested to maintain the BatchMatmul logic.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 13.3K bytes - Viewed (0)