Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 46 for getParentOp (0.17 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/tpu_cluster_util.cc

        tf_device::ClusterOp tpu_cluster = pair.second;
        if (node_to_cluster.count(node)) {
          if (node_to_cluster[node].getOperation() != tpu_cluster) {
            node->getCallableRegion()->getParentOp()->emitOpError(
                "The same function is reachable from multiple TPU Clusters.");
          }
        } else {
          node_to_cluster[node] = tpu_cluster;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 04:50:13 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

      while (block_arg || cast_op_input) {
        if (block_arg) {
          // Change on device function type/shape.
          HandleFuncOp(block_arg.getOwner()->getParentOp());
          block_arg = nullptr;
          cast_op_input = nullptr;
        } else {
          auto cast_input = cast_op_input.getX();
          // Update input type.
          auto transform_result_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/executor_island_coarsening.cc

          Operation* def = input.getDefiningOp();
          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/quantization/tensorflow/passes/merge_duplicate_resource_ops.cc

              "This op has the same `shared_name` but different type with another "
              "resource op in the function");
          signalPassFailure();
          return;
        }
        op.replaceAllUsesWith(existing_resource->getParentOp()->getResults());
        ops_to_remove.push_back(&op);
      }
    
      // Remove op after the loop to avoid crash.
      for (Operation* op : ops_to_remove) {
        op->erase();
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 04:26:16 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

    // returns the owner of the Block.
    Operation* GetOpOfValue(Value value) {
      if (auto block_arg = mlir::dyn_cast<BlockArgument>(value))
        return block_arg.getOwner()->getParentOp();
    
      return value.getDefiningOp();
    }
    
    // TODO(b/158596585): Replace this with a cost model analysis.
    bool IsTrivialUnaryOperation(Operation* op) {
      return llvm::isa<TF::CastOp, TF::IdentityOp>(op);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc

      if (!op) return false;
      if (llvm::isa<tf_device::ReplicateOp>(op)) return false;
      if (DirectUseOfVirtualDevice(*virtual_devices, op)) return true;
      return AncestorUsesVirtualDevice(virtual_devices, op->getParentOp());
    }
    
    // Check if op or its descendant uses a key in `virtual_devices`.
    bool DescendantUsesVirtualDevice(
        const std::optional<DictionaryAttr>& virtual_devices,
        Operation* operation) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/breakup-islands.cc

        bool has_in_island_operands = false;
        for (auto operand : sub_op.getOperands()) {
          auto defining_op = operand.getDefiningOp();
          if (!defining_op || defining_op->getParentOp() != island) continue;
          has_in_island_operands = true;
    
          // Remove operands from sinks.
          // We don't remove the operand if it is a stateful functional control flow
    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/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc

    // returns the owner of the Block.
    Operation* GetOpOfValue(Value value) {
      if (auto block_arg = mlir::dyn_cast<BlockArgument>(value))
        return block_arg.getOwner()->getParentOp();
    
      return value.getDefiningOp();
    }
    
    void TPUAnnotateDynamicShapeInputsPass::runOnOperation() {
      getOperation().walk([&](tf_device::ClusterFuncOp cluster_func_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/lower_variable_ops_to_ml_program.cc

        if (!initial_value) {
          initial_value = builder.getArrayAttr({});
        }
      }
    
      if (!type) return nullptr;
    
      auto globalOp = builder.create<ml_program::GlobalOp>(
          builder.getBlock()->getParentOp()->getLoc(), name, type, false,
          initial_value, nullptr);
      symbol_table.insert(globalOp);
    
      return globalOp;
    }
    
    }  // namespace
    
    #define GEN_PASS_DEF_LOWERVARIABLEOPSTOMLPROGRAMPASS
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 06 23:53:00 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/graph_pruning.cc

                        llvm::SmallPtrSetImpl<Operation*>* reachable_ops,
                        llvm::SmallVectorImpl<Operation*>* ops_to_visit) {
      Operation* def = operand.getDefiningOp();
      if (def && def->getParentOp() == graph && reachable_ops->insert(def).second) {
        // Op has not been visited, add to queue to visit later.
        ops_to_visit->push_back(def);
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 7.6K bytes
    - Viewed (0)
Back to top