Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for getParentOp (0.35 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_program_key.cc

      bool in_launch = isa<tf_device::LaunchOp>(preprocess_op->getParentOp());
      Operation* preprocess_or_launch =
          in_launch ? preprocess_op->getParentOp() : preprocess_op;
    
      Operation* tpu_compile_successor = nullptr;
      func_op->walk([&](TF::_TPUCompileMlirOp compile_op) {
        if (compile_op->getParentOp() == nullptr ||
            !isa<tf_device::LaunchOp>(compile_op->getParentOp()))
          return WalkResult::advance();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/extract_tpu_copy_with_dynamic_shape_op.cc

        return block_arg.getOwner()->getParentOp();
    
      return value.getDefiningOp();
    }
    
    // Check if the TPUCopyWithDynamicShapeOp is valid.
    // 1. The op should be wrapped inside a launch op.
    // 2. The wrapped launch op should be placed on CPU.
    LogicalResult CheckOpIsValid(Operation* op) {
      auto launch_op = llvm::dyn_cast<tf_device::LaunchOp>(op->getParentOp());
      if (!launch_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tpu_dynamic_layout_pass.cc

            // For a block argument, consider transforms only when it is a
            // replicated input (defining ops will be outside the replicate node).
            if (maybe_replicate != block_arg.getParentRegion()->getParentOp() ||
                !HandleReplicatedInputs(execute_arg_index, execute.getKey(),
                                        execute_launch, compile_launch, block_arg,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/internal/passes/hoist_broadcast_read.cc

      void runOnOperation() override;
    };
    
    // Get the ancestor of `descendant` that is a direct child of `ancestor`.
    Operation* GetAncestorBelow(Operation* descendant, Operation* ancestor) {
      Operation* parent = descendant->getParentOp();
      if (!parent) return nullptr;
      if (parent == ancestor) return descendant;
      return GetAncestorBelow(parent, ancestor);
    }
    
    // `is_cpu_read` is set to `true` iff `read` is on a resource with device type
    // CPU.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/analysis/resource_dataflow.cc

    }
    ResourceConstructingOps ResourceConstructingOps::EntryState(Value value) {
      if (auto barg = mlir::dyn_cast<BlockArgument>(value)) {
        if (func::FuncOp func =
                dyn_cast<func::FuncOp>(barg.getOwner()->getParentOp())) {
          SymbolTable symbol_table(func->getParentOfType<ModuleOp>());
          auto global_tensor = tf_saved_model::LookupBoundInputOfType<
              tf_saved_model::GlobalTensorOp>(func, barg.getArgNumber(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc

      // Use tf_executor.island op if present as non v1 control flow op results are
      // forwarded by a parent tf_executor.island op.
      if (llvm::isa<tf_executor::IslandOp>(op_to_update->getParentOp()))
        op_to_update = op_to_update->getParentOp();
    
      for (Value result : op_to_update->getResults()) {
        if (mlir::isa<tf_executor::TokenType>(result.getType())) continue;
        if (mlir::isa<tf_executor::ControlType>(result.getType())) break;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/passes/mark_ops_for_outside_compilation.cc

          getElementTypeOrSelf(value.getType()));
    }
    
    bool HasOutsideCompiledAncestor(Operation* op) {
      Operation* parent = op->getParentOp();
      while (parent) {
        if (parent->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr))
          return true;
        parent = parent->getParentOp();
      }
      return false;
    }
    
    // If any tf.variants are inputs/outputs to the another outside compiled
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top