- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 230 for GetOperation (0.17 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc
operands.push_back(operand); auto new_op = builder->create<OpT>(op->getLoc(), op->getResultTypes(), operands, attr.getAttrs()); op->replaceAllUsesWith(new_op.getOperation()->getResults()); op->erase(); return new_op; } // Returns success if the function has at most one op of the template type and // assigns it to `result`, if present. If there are multiple such ops, returns
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 15 22:55:42 UTC 2024 - 4.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc
llvm::SmallDenseMap<ResourceHandle, int64_t> &resource_handle_id_map, int64_t &next_id) { llvm::SmallVector<ResourceHandleValueAndId, 4> resource_vec; llvm::StringRef device = GetDeviceOrEmpty(getOperation()); for (const auto &iter : llvm::enumerate(getResults())) { auto index = iter.index(); if (mlir::isa<TF::ResourceType>( getElementTypeOrSelf(iter.value().getType()))) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/unfuse_mhlo_batch_norm.cc
MLIRContext* ctx = &getContext(); RewritePatternSet patterns(ctx); mhlo::populateUnfuseBatchNormPatterns(ctx, &patterns); if (failed( applyPatternsAndFoldGreedily(getOperation(), std::move(patterns)))) { return signalPassFailure(); } } } // namespace
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Oct 12 06:28:12 UTC 2023 - 2.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/dilated_conv.cc
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(IdentifyDilatedConvPass) void runOnOperation() override; }; void IdentifyDilatedConvPass::runOnOperation() { RewritePatternSet patterns(&getContext()); auto func = getOperation(); patterns.add<ConvertTFDilatedConvOp<TF::Conv2DOp>, ConvertTFDilatedConvOp<TF::DepthwiseConv2dNativeOp>>( &getContext()); (void)applyPatternsAndFoldGreedily(func, std::move(patterns)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Oct 07 21:08:41 UTC 2022 - 1.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/analysis/test_cost_analysis_pass.cc
return "Add remarks based on cost analysis for testing purpose."; } void runOnOperation() override { const auto& cost_analysis = getAnalysis<CostAnalysis>(); auto func_op = getOperation(); for (auto& op : func_op.front()) { op.emitRemark() << "Cost: " << cost_analysis.GetCost(&op); } } }; static mlir::PassRegistration<TestCostAnalysis> pass; } // namespace tfrt_compiler
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 01 23:46:29 UTC 2023 - 1.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_data_optimization_pass.cc
void runOnOperation() override { RewritePatternSet patterns(&getContext()); mlir::TF::PopulateTFDataOptimizationPatterns(&getContext(), &patterns); (void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns)); } }; } // namespace std::unique_ptr<OperationPass<func::FuncOp>> CreateTFDataOptimizationPass() { return std::make_unique<TFDataOptimization>(); } } // namespace TF
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 05 23:50:19 UTC 2022 - 1.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h
} // Use the min/max from the operands and the num_bits and narrow_range // attribute to create the quantization parameter for the new quantize op. rewriter.setInsertionPointAfter(tf_op.getOperation()); IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits()); BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange()); Type res_type = tf_op.getType();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/optimize.cc
#include "tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/optimize.inc" void OptimizeIntGraph::runOnOperation() { RewritePatternSet patterns(&getContext()); populateWithGenerated(patterns); auto func = getOperation(); if (failed(applyPatternsAndFoldGreedily(func, std::move(patterns)))) { signalPassFailure(); } } } // namespace std::unique_ptr<OperationPass<func::FuncOp>> CreateOptimizeIntGraphPass() {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Feb 24 02:26:47 UTC 2024 - 2.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/inference/inference_metrics_pass.cc
public: void runOnOperation() override; }; void InferenceMetricsPass::runOnOperation() { bool has_tpu_partitioned_call = false; ModuleOp module = getOperation(); for (auto func_op : module.getOps<func::FuncOp>()) { func_op->walk( [&](TF::TPUPartitionedCallOp op) { has_tpu_partitioned_call = true; }); if (has_tpu_partitioned_call) break; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Sep 05 21:24:51 UTC 2023 - 2.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc
if (auto block_arg = mlir::dyn_cast<BlockArgument>(value)) return block_arg.getOwner()->getParentOp(); return value.getDefiningOp(); } void TPUAnnotateDynamicShapeInputsPass::runOnOperation() { getOperation().walk([&](tf_device::ClusterFuncOp cluster_func_op) { Builder builder(cluster_func_op->getContext()); // Skip non-tpu device cluster_func. auto cluster_id =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0)