- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for ReplaceOpWithNewOp (0.3 sec)
-
tensorflow/compiler/mlir/lite/transforms/legalize_hashtables.cc
auto table_id = static_cast<int32_t>(::llvm::hash_value(hashtable_op.getSharedName())); auto key_dtype = hashtable_op.getKeyDtype(); auto value_dtype = hashtable_op.getValueDtype(); rewriter.replaceOpWithNewOp<TFL::HashtableOp>( hashtable_op, output_type, table_id, key_dtype, value_dtype); return success(); } }; class LegalizeHashTableFindOpPattern
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/batchmatmul_to_einsum.cc
std::string equation("...mk,...kn->...mn"); if (op.getAdjX()) std::swap(equation[3], equation[4]); if (op.getAdjY()) std::swap(equation[6 + 3], equation[6 + 4]); rewriter.replaceOpWithNewOp<TF::EinsumOp>( op, op.getType(), /*inputs=*/ValueRange({input_lhs, input_rhs}), /*equation=*/equation); return success(); } }; #define GEN_PASS_DEF_BATCHMATMULTOEINSUMPASS
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc
const Value output = rewriter.create<mlir::stablehlo::BitcastConvertOp>( op->getLoc(), op.getResult().getType(), adaptor.getOperand()); rewriter.replaceOpWithNewOp<mlir::stablehlo::ConvertOp>( op, getTypeConverter()->convertType(op.getResult().getType()), output); } else if (is_output_legal) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/ConvertConst.cc
{qbarrier.getArg().getDefiningOp()->getLoc(), qbarrier.getLoc()}); auto newConstOp = rewriter.create<arith::ConstantOp>( fusedLoc, newConstValueType, cast<TypedAttr>(newConstValue)); rewriter.replaceOpWithNewOp<StorageCastOp>(qbarrier, qbarrier.getType(), newConstOp); return success(); } void ConvertConstPass::runOnOperation() {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/folders.cc
return failure(); } res.push_back(signed_lhs_val / signed_rhs_val); } auto res_attr = DenseElementsAttr::get( const_oprs[0].getType().cast<RankedTensorType>(), res); rewriter.replaceOpWithNewOp<stablehlo::ConstantOp>(adaptor.value().Op(), res_attr); return success(); } static LogicalResult FoldDivOp(stablehlo::DivOp op, PatternRewriter& rewriter) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 06:11:55 UTC 2024 - 4.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc
auto newAttr = DenseElementsAttr::getFromRawBuffer( shaped_type, mlir::cast<DenseElementsAttr>(op.getValue()).getRawData()); rewriter.replaceOpWithNewOp<arith::ConstantOp>(op, newAttr); return success(); } }; class SanitizeGatherOpOutputToI4 : public OpRewritePattern<TFL::GatherOp> { public: using OpRewritePattern<TFL::GatherOp>::OpRewritePattern;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc
// which should be removed. So the replaced PartitionedCall op should keep // its original arguments except for the last element. SmallVector<Value> args = call_op.getOperands().drop_back(); rewriter.replaceOpWithNewOp<TF::PartitionedCallOp>( call_op, float_func.getResultTypes(), args, f_attr); return success(); } }; void ConvertTpuModelToCpuPass::runOnOperation() { MLIRContext* ctx = &getContext();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/ConvertSimQuant.cc
// this is a forced/hard-coded constraint. auto qbarrier = rewriter.create<QuantizeCastOp>(op.getLoc(), quantizedType, op.getInputs()); rewriter.replaceOpWithNewOp<DequantizeCastOp>(op, converter.input_type, qbarrier.getResult()); return false; } }; class ConstFakeQuantRewrite
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc
mlir::cast<DenseIntOrFPElementsAttr>(input_values) .mapValues(FloatType::getF32(rewriter.getContext()), llvm::function_ref<DequantizeFuncType>(dequantize_func)); rewriter.replaceOpWithNewOp<TFL::ConstOp>(dequant_op, dequant_op.getType(), dequant_values); return success(); } }; // If the quant op has no consumer, we will remove them.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc
op.getInput(), new_reshape_shape); TF::ConstOp new_broadcast_shape = GetI64ConstantTensor(rewriter, reshape_shape, op.getLoc()); rewriter.replaceOpWithNewOp<BroadcastToOp>( reshape_op, reshape_op.getOutput().getType(), new_reshape, new_broadcast_shape); return success(); } }; #define GEN_PASS_DEF_TENSORFLOWOPTIMIZEPASS
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.1K bytes - Viewed (0)