- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 178 for getDefiningOp (0.43 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/sink_constant.cc
Region &body = cluster.getBody(); visitUsedValuesDefinedAbove(body, [&](OpOperand *use) { Value constant = use->get(); auto const_op = dyn_cast_or_null<TF::ConstOp>(constant.getDefiningOp()); if (!const_op) return; // Filter constants using user provided predicate function. if (filter && !filter(cluster, const_op.getValue())) return;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 4.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc
// returns the owner of the Block. Operation* GetOpOfValue(Value value) { if (auto block_arg = mlir::dyn_cast<BlockArgument>(value)) return block_arg.getOwner()->getParentOp(); return value.getDefiningOp(); } // TODO(b/158596585): Replace this with a cost model analysis. bool IsTrivialUnaryOperation(Operation* op) { return llvm::isa<TF::CastOp, TF::IdentityOp>(op); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/optimize.td
def F32ElementsAttr : ElementsAttrBase< CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">; def DefinedByConv2D : Constraint<CPred<"llvm::isa_and_nonnull<mlir::TF::Conv2DOp>($0.getDefiningOp())">>; // Checks if the value has only one user. def HasOneUse : Constraint<CPred<"$0.hasOneUse()">>; // If we see a Conv2D op followed by Mul, then multiply the filter // with the value in Mul. def FuseMulAndConv2D :
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 22 07:31:23 UTC 2023 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc
// Broadcast bias value if unmatched with output shape. auto bcast_op = TryCast<BroadcastInDimOp>(bias_op.getDefiningOp(), /*name=*/"broadcast_in_dim_op"); if (failed(bcast_op)) { bcast_op = TryCast<DynamicBroadcastInDimOp>( bias_op.getDefiningOp(), /*name=*/"dynamic_broadcast_in_dim_op"); } // Update the bias type for both static and dynamic broadcasts.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 06:04:36 UTC 2024 - 41.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc
mlir::Operation* GetXlaShardingFromOperand(Value value) { Value value_to_visit = value; if (auto read_var = value_to_visit.getDefiningOp<mlir::TF::ReadVariableOp>()) value_to_visit = read_var.getResource(); if (auto partitioned_input = value_to_visit.getDefiningOp<mlir::TF::TPUPartitionedInputV2Op>()) { return NullUnlessSharded(partitioned_input); } return nullptr; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 02:01:13 UTC 2024 - 28.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc
// Only values defined by IslandOp were inserted in the worklist. IslandOp current_island = cast<IslandOp>(control_barrier.getDefiningOp()); for (auto control_input : current_island.getControlInputs()) { ops_connected_to_fetch->insert(control_input.getDefiningOp()); if (IsNoOpControlBarrier(control_input)) control_barrier_worklist.push(control_input); } current_island.erase();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/localize_var_handles.cc
resource = write.getResource(); } else if (auto next = llvm::dyn_cast<TF::IteratorGetNextOp>(op)) { resource = next.getIterator(); } if (llvm::dyn_cast_or_null<TF::VarHandleOp>(resource.getDefiningOp())) { return; // We're already directly after a VarHandleOp. } const TF::ResourceDataflowState* state = solver.lookupState<TF::ResourceDataflowState>(resource); if (!state) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Mar 06 23:53:00 UTC 2024 - 5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_xla_call_module_op_to_bfloat16.cc
op_result.setType(ToBfloat16Type(original_type)); const Value cast = builder.create<TF::CastOp>(op->getLoc(), original_type, op_result); op_result.replaceAllUsesExcept(cast, cast.getDefiningOp()); } } return WalkResult::advance(); }); if (result.wasInterrupted()) return signalPassFailure(); } } // namespace
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 08:32:43 UTC 2024 - 5.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_read_for_write.cc
if (handle_user == assign_var) continue; auto assign_var_user = dyn_cast<TF::AssignVariableOp>(handle_user); if (!assign_var_user) continue; if (assign_var_user.getValue().getDefiningOp() == cluster_func) return resource; } resource.resource = assign_var.getResource(); resource.subtype = assign_var.getValue().getType(); return resource; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 16:54:40 UTC 2024 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/hoist_loop_invariant.cc
// hoisted. auto read_var_op = llvm::dyn_cast<ReadVariableOp>(op); if (!read_var_op) return false; auto var_handle_op = llvm::dyn_cast_or_null<VarHandleOp>( read_var_op.getResource().getDefiningOp()); if (!var_handle_op) return false; return read_only_vars.contains(GetResourceHandle(var_handle_op)); } bool ShouldMoveOutOfRegion( Operation *op, Region *region,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0)