Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for eraseOperand (0.16 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc

        cond_arg.replaceAllUsesWith(while_operand);
        result.replaceAllUsesWith(while_operand);
        body.front().getTerminator()->eraseOperand(result_idx);
        body.eraseArgument(result_idx);
        cond.eraseArgument(result_idx);
        op.getOperation()->eraseOperand(result_idx);
        can_eliminate.set(result_idx);
      }
      EliminateUnusedResults(op, &can_eliminate);
      return success();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tpu_parallel_execute_sink_resource_write.cc

            parallel_execute.GetRegionBlockWithIndex(results_to_remove.index());
        Operation* terminator = block.getTerminator();
        for (int index_to_remove : llvm::reverse(results_to_remove.value()))
          terminator->eraseOperand(index_to_remove);
      }
    
      // Replace old parallel_execute with new parallel_execute by moving the
      // regions to a new parallel_execute and remapping the results.
      llvm::SmallVector<Type, 4> new_result_types;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 06 04:46:18 UTC 2022
    - 6.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

            !HasSingleOpInBlock<YieldOp>(&op.GetBody()))
          return failure();
    
        for (auto &use : llvm::make_early_inc_range(op.getControl().getUses()))
          use.getOwner()->eraseOperand(use.getOperandNumber());
    
        rewriter.eraseOp(op);
    
        return success();
      }
    };
    
    // This pattern matches and removes IslandOps with no inner ops, no control
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/executor_island_coarsening.cc

        // operand list). We replace them all with the island's single control
        // operand.
        if (i <= fetch_control_idx) {
          fetch.setOperand(i, island.getResult(i));
        } else {
          fetch.getOperation()->eraseOperand(fetch.getNumOperands() - 1);
        }
      }
    }
    
    //===----------------------------------------------------------------------===//
    // Pass Entry Point
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting.cc

        auto return_val = entry.value();
        if (auto arg = mlir::dyn_cast<BlockArgument>(return_val)) {
          auto it = infos.find(arg.getArgNumber());
          if (it != infos.end() && !it->getSecond().used) {
            return_op->eraseOperand(entry.index() - skipped_retvals++);
          }
        }
      }
      llvm::BitVector indices_to_erase(func_op.getNumArguments());
      llvm::SmallVector<Type, 4> new_types;
      int64_t skipped_args = 0;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

            continue;
          }
          result.replaceAllUsesWith(result_to_extern_value[result]);
          for (Region* branch : branches)
            branch->front().getTerminator()->eraseOperand(next_index);
        }
    
        // Move region bodies to the new op.
        for (auto region_index : llvm::seq<int>(0, branches.size()))
          new_op.getRegion(region_index).takeBody(op.getRegion(region_index));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

        // Erase control outputs from feed.
        auto control_uses = island->getResult(1).getUses();
        for (auto& control_use : llvm::make_early_inc_range(control_uses))
          control_use.getOwner()->eraseOperand(control_use.getOperandNumber());
    
        if (!arg_node.node->requested_device().empty())
          arg_attrs[i].set("tf.device", builder_.getStringAttr(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_arguments.cc

    void EraseReturnOperands(Region* region, llvm::BitVector& erase) {
      for (Block& block : region->getBlocks()) {
        for (Operation& op : block.getOperations()) {
          if (!op.hasTrait<OpTrait::ReturnLike>()) continue;
          op.eraseOperands(erase);
        }
      }
    }
    
    // Erases the given results from an operation, similar to what
    // Operation::eraseArguments does (but for results).
    // This is a lengthy bit of code, since it has to recreate the operation.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc

        // as the function arguments will be removed below once that function is
        // processed.
        for (auto it : remove_operands) {
          it.first->eraseOperands(it.second);
        }
    
        func.eraseArguments(args_to_erase);
      }
    
      // Erase all global tensors that were frozen.
      for (auto global_tensor : frozen_global_tensors) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc

            erase_indices.set(use.getOperandNumber());
          }
        }
        func.getArgument(arg_index).dropAllUses();
      }
      if (llvm::isa<func::ReturnOp, TF::YieldOp>(func.front().getTerminator())) {
        terminator->eraseOperands(erase_indices);
      }
    }
    
    // Updates 'while_op' signatures based on which arguments should be removed
    // in 'arguments_to_erase'.
    template <typename T, typename U>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 19.4K bytes
    - Viewed (0)
Back to top