- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 51 for use_empty (0.12 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_island_coarsening.cc
auto island_op = llvm::dyn_cast<IslandOp>(*iter); if (llvm::dyn_cast_or_null<TF::IdentityOp>(island_op.GetBody().front())) { if (island_op.getOutputs().use_empty()) { tpu_ops.erase(iter); return true; } std::vector<IslandOp> ops; if (incoming) { collect_output_users_islands(island_op, ops); } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 27.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc
Value control_barrier = control_barrier_worklist.front(); control_barrier_worklist.pop(); // We can only erase control barriers whose uses have been erased as well. if (!control_barrier.use_empty()) continue; // Only values defined by IslandOp were inserted in the worklist. IslandOp current_island = cast<IslandOp>(control_barrier.getDefiningOp());
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/tensor_array_ops_decomposition.cc
return std::nullopt; }); if (!elem_type) return std::nullopt; return llvm::to_vector<8>(elem_type->getShape()); } void ReplaceAllUsesWithCast(Value old_val, Value new_val) { if (old_val.use_empty()) return; auto cast_op = OpBuilder(old_val.getDefiningOp()) .create<tensor::CastOp>(old_val.getLoc(), old_val.getType(), new_val); old_val.replaceAllUsesWith(cast_op); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Mar 02 20:41:19 UTC 2023 - 40.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc
// Now check if the operand is unused in both regions as well as the // result. If so, mark it for removal. if (body_block.getArgument(op_idx).use_empty() && cond_block.getArgument(op_idx).use_empty() && while_op.getResult(op_idx).use_empty()) { removed_operand.set(op_idx); new_num_operands--; } } if (new_num_operands == old_num_operands) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 22:07:10 UTC 2024 - 170.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc
LogicalResult matchAndRewrite(IslandOp op, PatternRewriter &rewriter) const override { if (op.getNumOperands() != 0 || op.getNumResults() != 2 || !op.getControl().use_empty() || !HasSingleOpInBlock<YieldOp>(&op.GetBody())) return failure(); rewriter.replaceOp(op, {op.GetYield().getOperand(0), nullptr}); return success(); } };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 42.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_communication.cc
return; } auto value = values[0]; auto replacement = replacements[0]; auto tuple_type = mlir::dyn_cast<TupleType>(value.getType()); if (!tuple_type) { if (!value.use_empty()) { auto new_element = builder.create<GetTupleElementOp>(replacement.getLoc(), replacement, 0); value.replaceAllUsesWith(new_element.getResult()); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 40.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_cluster_formation.cc
op->getResult(0).replaceAllUsesWith(op->getOperand(0)); // Leftover TPUReplicatedInput/TPUReplicatedOutput that are not of // `num_replicas` to 1. if (!op->use_empty()) { op->emitOpError() << "is expected to have no uses, but it is operand#" << op->use_begin()->getOperandNumber() << " of " << *op->use_begin()->getOwner();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 22:03:30 UTC 2024 - 39.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc
func.walk([&](quantfork::QuantizeCastOp q) { auto input_op = q.getArg().getDefiningOp(); if (auto stats = dyn_cast_or_null<quantfork::StatisticsOp>(input_op)) { q.setOperand(stats.getArg()); if (stats.use_empty()) stats.erase(); } }); // Step 1: forward pass: propagate any value scales which are not produces // by `SameOperandsAndResultsScale`. Additionally, remove the value scales
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 43.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/ir/tfl_ops.cc
auto value = while_op.getOperand(while_index); if (body_block.getArgument(arg_index).use_empty() && cond_block.getArgument(arg_index).use_empty() && // Note: since we are not erasing results, need to use while_index // to check if the corresponding result is unused. while_op.getResult(while_index).use_empty()) { unchanged = false; body_block.eraseArgument(arg_index);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 169.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc
if (failed(mergeDequantizeOpFollowingQuantizedFunction(call_op, args, rewriter))) { return failure(); } } if (call_op->use_empty()) return success(); DenseMap<Value, quantfork::StorageCastOp> replace_map; rewriter.setInsertionPointAfter(call_op); SmallVector<Type, 4> result_types;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 54.5K bytes - Viewed (0)