- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for use_empty (0.5 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc
// results of the operation will be eliminated. void EliminateUnusedResults( Operation *op, const llvm::BitVector *results_to_eliminate = nullptr) { auto can_eliminate = [&](OpResult &result) -> bool { if (!result.use_empty()) return false; if (results_to_eliminate) return results_to_eliminate->test(result.getResultNumber()); else return true; }; SmallVector<Type, 4> new_result_types;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 19.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/reduce_while_operands.cc
// i is consumed element if result(i) is used outside whileOp or // argument(i) is used in whileOp.getCond(). for (auto i = 0; i < n; ++i) { if (!while_op.getResult(i).use_empty() || !cond.getArgument(i).use_empty()) { explicitly_consumed_ids.push_back(i); } } // Empty consumed_element_ids implies none of results is used. if (explicitly_consumed_ids.empty()) { while_op.erase();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/replicate_to_island.cc
// Add sink island to pin all replicas as a control dependency if there is a // control dependency leading from the replicate originally. if (!island_op.getControl().use_empty()) { llvm::SmallVector<Value, 8> island_operands; for (auto& replica : replicas) island_operands.push_back(replica.getControl()); builder.setInsertionPoint(island_op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Jul 24 21:01:40 UTC 2023 - 16.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/tests/canonicalize.mlir
// CHECK: return %0#1 : tensor<f32> func.return %0#1 : tensor<f32> } // ----- // Test case to test bug due to checking // `while_op.getResult(arg_index).use_empty()` instead of // `while_op.getResult(while_index).use_empty()` in the tfl.while // canonicalization. // arg0 is a pass through. After first iteration, arg_index = 0 // and while_index = 1. Make arg1 use empty in block and condition, but not in
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 20.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc
for (Operation* connected_op : op.getResult().getUsers()) { ConvertOp convert_op = dyn_cast_or_null<ConvertOp>(connected_op); // Skip if no convert op exists. if (!convert_op || convert_op.getResult().use_empty()) continue; // Get types. const Type old_result_type = op.getResult().getType(); const ShapedType new_result_type = mlir::dyn_cast<ShapedType>(convert_op.getType());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc
if (failed(UpdateReadUses(read_var, partitioned_input, partitioned_read, partitioned_reads, is_packed))) return failure(); read_var->erase(); if (partitioned_input->use_empty()) partitioned_input->erase(); } return mlir::TF::RemoveSingletonParallelExecuteOp(parallel_execute, &builder); } void TPUResourceReadsWritesPartitioningPass::runOnOperation() {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 11.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc
for (int i = 0; i < expected_num_outputs; ++i) { auto it = expected_consumer_indices.find(i); if (it == expected_consumer_indices.end()) { // Unexpected consumer. if (!call_op->getResult(i).use_empty()) return failure(); } } return success(); } LogicalResult CheckFusableKerasLstm(func::FuncOp lstm_func, ModuleOp module) { for (auto func : module.getOps<func::FuncOp>()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
if (op.getOperation()->template hasTrait<OpTrait::IsTerminator>()) { return failure(); } for (auto result : op.getOperation()->getOpResults()) { if (!result.use_empty()) { return failure(); } } // Remove if the custom op is in the provided map and is NoSideEffect. auto custom_op = llvm::isa<CustomOp>(op); if (custom_op) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc
arith::ConstantOp op) const { for (auto connected_op : op.getResult().getUsers()) { auto cast_op = dyn_cast_or_null<CastOp>(connected_op); if (!cast_op || cast_op.getResult().use_empty()) continue; // Get types Type old_result_type = op.getResult().getType(); ShapedType new_result_type = mlir::dyn_cast<ShapedType>(cast_op.getType());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 20.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc
for (auto [src_arg_idx, src_arg] : llvm::enumerate(src_func_op.getArguments())) { // No need to create a mapping when there is no usage - it will not affect // the cloning. if (src_arg.use_empty()) continue; const unsigned main_arg_idx = main_func_op.getNumArguments(); const DictionaryAttr main_arg_attr = src_func_op.getArgAttrDict(src_arg_idx);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun May 12 12:54:52 UTC 2024 - 15.3K bytes - Viewed (0)