Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 142 for GetOperands (0.13 sec)

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

    void VisitOpOperands(GraphOp graph, Operation* op,
                         llvm::SmallPtrSetImpl<Operation*>* reachable_ops,
                         llvm::SmallVectorImpl<Operation*>* ops_to_visit) {
      for (Value operand : op->getOperands())
        VisitOpOperand(graph, operand, reachable_ops, ops_to_visit);
    }
    
    // Visits an op and it's associated operands. IslandOps are handled differently
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 7.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.h

      if (!return_op) return failure();
      if (return_op.getNumOperands() != 1) return failure();
    
      ReductionOp reduce_op = dyn_cast_or_null<ReductionOp>(
          return_op.getOperands().front().getDefiningOp());
      if (!reduce_op) return failure();
      if (reduce_op.getLhs() != body.getArgument(0) ||
          reduce_op.getRhs() != body.getArgument(1))
        return failure();
    
      return success();
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 08 11:35:25 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/executor_island_coarsening.cc

          DCHECK_EQ(def->getParentOp(), graph);
          try_update_current_candidate(def);
        }
    
        // Check island data operands.
        island.walk([&](Operation* op) {
          for (Value input : op->getOperands()) {
            Operation* def = input.getDefiningOp();
            if (!def || def->getParentOp() != graph) continue;
    
            try_update_current_candidate(def);
          }
        });
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc

    bool IsOpReplicateInvariant(Region* replicate_region, Operation* op) {
      auto ancestor_of_replicate = [&](Region* region) {
        return region && region->isProperAncestor(replicate_region);
      };
    
      for (Value operand : op->getOperands())
        if (!ancestor_of_replicate(operand.getParentRegion())) return false;
    
      // _TPUDeviceOrdinalPlaceholder implicitly depends on the replica.
      if (llvm::isa<TF::_TPUDeviceOrdinalPlaceholderOp>(op)) return false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_communication.cc

      llvm::SmallDenseMap<Value, Value> rewritten_operands;
      auto new_results =
          GetValueWithToken(builder, llvm::to_vector(terminator->getOperands()),
                            token, rewritten_operands, flatten_tuple);
      terminator->setOperands(new_results);
    }
    
    // Rewrites a `mhlo.if` op to receive and forward a `mhlo.token`. As If op does
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 40.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/replicate_to_island.cc

      // Replace replicate terminator with YieldOp.
      builder.setInsertionPoint(&terminator);
      builder.create<tf_executor::YieldOp>(terminator.getLoc(),
                                           terminator.getOperands());
      terminator.erase();
    
      builder.setInsertionPoint(island_op);
      IRMapping mapping;
      for (int i : llvm::seq<int>(0, num_replicas)) {
        // Create new island for replica.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 24 21:01:40 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/breakup-islands.cc

        yield.setOperand(0, identity.getOutput());
      } else {
        auto identity_n = builder.create<TF::IdentityNOp>(
            island.getLoc(), yield.getOperandTypes(), yield.getOperands());
        for (auto it : llvm::enumerate(identity_n.getResults()))
          yield.setOperand(it.index(), it.value());
      }
    }
    
    // Helper that creates an island. If `sub_op` is not nullptr, it will be moved
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 16.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.cc

        cost_map_[op] = kDefaultCheapCost;
        return;
      }
    
      // For other ops, use the sum of input sizes as its cost.
      int64_t cost = kDefaultCheapCost;
      for (auto operand : op->getOperands()) {
        auto type = mlir::cast<mlir::TensorType>(operand.getType());
        if (type.hasRank()) {
          cost += GetRankedTensorSize(type);
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/cluster_outlining.cc

                                        OpBuilder* builder) {
      builder->create<func::ReturnOp>(cluster_return_op.getLoc(),
                                      cluster_return_op.getOperands());
      cluster_return_op.erase();
    }
    
    // Builds a function that outlines region attached to cluster_op or launch_op,
    // and inserts built function into given module.
    template <typename ClusterOrLaunchOp>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/translate/split_into_island_per_op_pass.cc

        yield.setOperand(0, identity.getOutput());
      } else {
        auto identity_n = builder.create<TF::IdentityNOp>(
            island.getLoc(), yield.getOperandTypes(), yield.getOperands());
        for (const auto& it : llvm::enumerate(identity_n.getResults()))
          yield.setOperand(it.index(), it.value());
      }
    }
    
    // Helper that creates an island that `sub_op` will be moved to.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 7.3K bytes
    - Viewed (0)
Back to top