- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 86 for GetOperation (0.43 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/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/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) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/tflite_legalize_hlo.cc
// TODO: b/304003568 - Add TF_TransposeOp folding logic to tflite. target.addIllegalOp<mhlo::DotGeneralOp, mhlo::DotOp, mhlo::TransposeOp>(); if (failed(applyPartialConversion(getOperation(), target, std::move(patterns)))) { getOperation().emitError("mhlo to TFLite legalization failed."); signalPassFailure(); } } } // namespace
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc
var_handle_op.erase(); } } void QuantizeVariablesPass::runOnOperation() { ResourceIdMap resource_id_map; ResourceMap resource_map; // Collect all resource identities. getOperation().walk([&](TFL::VarHandleOp var_handle_op) { auto identity = std::make_pair(var_handle_op.getContainer().str(), var_handle_op.getSharedName().str()); resource_id_map.insert(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc
if (op.use_empty() && (op.getIsStateless() || (IsSideEffectFree(then_func) && IsSideEffectFree(else_func)))) { rewriter.eraseOp(op.getOperation()); return success(); } // Extract the constant cond value. DenseElementsAttr cond; if (!matchPattern(op.getCond(), m_Constant(&cond))) return failure();
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/lite/stablehlo/odml_converter/transforms/shlo_simplify.cc
class SHLOSimplifyPass : public impl::SHLOSimplifyPassBase<SHLOSimplifyPass> { public: MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SHLOSimplifyPass) void runOnOperation() override { ModuleOp module = getOperation(); RewritePatternSet patterns(&getContext()); populateWithGenerated(patterns); PopulateFolderPatterns(patterns); if (failed(applyPatternsAndFoldGreedily(module, std::move(patterns)))) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 10 03:05:20 UTC 2024 - 2.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc
replicate_op.GetReplicaOperandForBlockArgument(block_arg, /*replica=*/0)); shape_op.replaceAllUsesWith(new_shape_op.getOperation()); shape_op.erase(); } } // Checks if op and inner op operands are all replicate invariant. bool IsOpReplicateInvariant(Region* replicate_region, Operation* op) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/cluster_outlining.cc
} void ClusterOutliningPass::runOnOperation() { ModuleOp module = getOperation(); SymbolTable symbol_table(module); OpBuilder builder(module.getContext()); module.walk([&](tf_device::ClusterOp cluster) { OutlineCluster(cluster, &symbol_table, &builder); }); } void LaunchOutliningPass::runOnOperation() { ModuleOp module = getOperation(); SymbolTable symbol_table(module);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 21:25:12 UTC 2024 - 7.2K bytes - Viewed (0)