Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 142 for GetOperands (0.34 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_custom_call_to_composite.cc

        auto decomposition = mlir::cast<FlatSymbolRefAttr>(calledComputations[0]);
    
        auto composite = rewriter.create<mlir::stablehlo::CompositeOp>(
            op.getLoc(), op.getResultTypes(), op.getOperands(), name.str(), attrs,
            decomposition.getValue());
        rewriter.replaceOp(op, composite.getResults());
        return success();
      }
    };
    
    struct LegalizeStablehloCustomCallToCompositePass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/raise_custom_ops.cc

      for (auto *op : custom_ops) {
        builder.setInsertionPoint(op);
        Location loc = op->getLoc();
        auto custom_op = builder.create<CustomTfOp>(loc, op->getResultTypes(),
                                                    op->getOperands());
        Region region;
        Block *new_block = new Block;
        region.push_back(new_block);
    
        builder.setInsertionPointToEnd(&region.front());
        Operation *inner_op = builder.clone(*op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/legalize_tf_while.cc

      Operation* op = while_op.getOperation();
      // Create new TFL While op that will be used to replace TF While op.
      auto new_op = OpBuilder(op).create<TFL::WhileOp>(
          op->getLoc(), op->getResultTypes(), op->getOperands(),
          while_op.getIsStateless());
      Location loc = while_op->getLoc();
      CreateRegionWithCall(while_op.cond_function(), new_op.getCond(), loc);
      CreateRegionWithCall(while_op.body_function(), new_op.getBody(), loc);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/analyze_variables.cc

        // and mark the module as not valid for TFLite legalization.
        // Note: this might disable native variables in more than needed cases.
        // TODO(b/189370197): Enhance variable analysis.
        for (auto operand : op->getOperands()) {
          if (mlir::isa<TF::ResourceType>(
                  getElementTypeOrSelf(operand.getType()))) {
            legalize_to_tfl = false;
            return WalkResult::interrupt();
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/tac/transforms/pick_subgraphs.cc

        llvm::SetVector<Operation*>* unprocessed_subgraphs) {
      Subgraph& current_subgraph = subgraphs_.find(current_graph_call)->second;
    
      std::vector<Subgraph*> input_subgraphs;
      for (auto input : current_graph_call.getOperands()) {
        func::CallOp input_call = GetProducerCallOpOrNull(input);
        // If the input subgraph is not processed yet, we just go ahead and process
        // that one first.
        if (input_call == nullptr) continue;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 24 15:10:02 UTC 2022
    - 19.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

        // for function arguments.
        func.walk([&](Operation* op) {
          if (llvm::isa<TF::IdentityOp, TF::IdentityNOp>(op)) {
            op->replaceAllUsesWith(op->getOperands());
            return;
          }
          if (auto grad = llvm::dyn_cast<TF::TensorArrayGradV3Op>(op)) {
            insert(grad.getHandle(), grad.getSource().str(), func_block);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

        if (IsTrivialUnaryOperation(&cluster_op) ||
            HasOutsideCompilationAttribute(&cluster_op)) {
          auto walk_result = cluster_op.walk([&](Operation* op) {
            for (Value operand : op->getOperands()) {
              Operation* operand_op = GetOpOfValue(operand);
              if (head_outside_compiled_ops.count(operand_op)) continue;
    
              if (operand_op->getParentRegion() == cluster_region)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/cast_bf16_ops_to_f32.cc

      LogicalResult match(Operation* op) const override {
        if (isa<TF::CastOp, TF::ConstOp>(op) ||
            op->getName().hasTrait<OpTrait::ZeroOperands>()) {
          return failure();
        }
        for (Value input : op->getOperands()) {
          if (getElementTypeOrSelf(input).isBF16()) {
            return success();
          }
        }
        for (Value value : op->getResults()) {
          if (getElementTypeOrSelf(value).isBF16()) {
            return success();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tpu_identity_pruning.cc

    // results.
    void RemoveIdentityFromRegion(Region& region) {
      region.walk([](Operation* op) {
        if (isa<TF::IdentityOp, TF::IdentityNOp>(op)) {
          op->replaceAllUsesWith(op->getOperands());
          op->erase();
        }
      });
    }
    
    void TPUIdentityPruning::runOnOperation() {
      SmallVector<tf_device::ClusterOp, 4> clusters;
      getOperation().walk(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting.cc

        Block& front = region->front();
        auto old_return = front.getTerminator();
        assert(old_return->getNumOperands() == op_->getNumResults());
        auto new_return_operands = llvm::to_vector<4>(old_return->getOperands());
        new_return_operands.resize(num_new_results_);
    
        // initialize return values for written resources to be the hoisted reads.
        for (Value resource : written_resources_) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
Back to top