Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for MoveBefore (0.36 sec)

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

          builder.create<tf_device::ReturnOp>(op->getLoc(), op->getResults())
              .getOperation();
      MLIRContext* context = launch_op.getContext();
      op->removeAttr(StringAttr::get(context, kDeviceAttr));
      op->moveBefore(return_op);
    }
    
    void DeviceAttributeToLaunch::runOnOperation() {
      const Dialect* tf_dialect = getContext().getLoadedDialect("tf");
    
      getOperation().walk([&](Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 04 00:59:46 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/xla_inline_device_ops.cc

      llvm::SmallVector<Operation*, 4> non_terminator_ops;
      for (Operation& op : block.without_terminator()) {
        non_terminator_ops.push_back(&op);
      }
      for (auto op : non_terminator_ops) {
        op->moveBefore(cluster_op);
      }
    
      auto& return_op = cluster_op.GetBody().front();
      // This is the last op, should be tf_device::ReturnOp.
      assert(mlir::isa<mlir::tf_device::ReturnOp>(return_op));
    
      Value old_val, new_val;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 04 00:59:46 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/sink_constant.cc

              return;
            }
            if (constant.hasOneUse()) {
              LLVM_DEBUG(llvm::dbgs() << "Moved constant " << constant << "\n");
              const_op.getOperation()->moveBefore(&body.begin()->front());
              return;
            }
            map_entry.first->getSecond() = const_op.clone();
            body.begin()->getOperations().insert(body.begin()->begin(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util.cc

      launch.getBody().push_back(new mlir::Block);
    
      builder->setInsertionPointToEnd(&launch.GetBody());
      builder->create<mlir::tf_device::ReturnOp>(loc, op->getResults());
    
      // Move op inside cluster.
      op->moveBefore(launch.GetBody().getTerminator());
    
      builder->restoreInsertionPoint(insert_point);
    
      return launch;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 13 03:57:18 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_colocate_composite_resource_ops.cc

      op->replaceAllUsesWith(launch);
    
      builder->setInsertionPointToEnd(&launch.GetBody());
      builder->create<tf_device::ReturnOp>(loc, op->getResults());
    
      // Move op inside cluster.
      op->moveBefore(launch.GetBody().getTerminator());
    }
    
    llvm::SmallVector<Operation*, 4> GetResourceOpsUsingCompositeArgsInReplicate(
        tf_device::ReplicateOp replicate) {
      llvm::SmallVector<Operation*, 4> resource_users;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 16 17:41:12 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/internal/passes/hoist_broadcast_read.cc

          if (read->isBeforeInBlock(peer)) continue;
          if (llvm::isa<ReadVariableOp>(peer)) continue;
          has_conflicting_write = true;
        }
        if (has_conflicting_write) continue;
        read->moveBefore(replicate);
      }
    }
    
    // Hoist `ReadVariableOp`s above the `tf_device.replicate`s.
    void HoistBroadcastRead::runOnOperation() {
      FuncOp func = getOperation();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_cluster_formation.cc

      auto cluster = builder.create<mlir::tf_device::ClusterOp>(
          call_op->getLoc(), call_op->getResultTypes());
      cluster.getBody().push_back(new Block);
      call_op->replaceAllUsesWith(cluster.getResults());
      call_op->moveBefore(&cluster.GetBody(), cluster.GetBody().end());
      builder.setInsertionPointToEnd(&cluster.GetBody());
      builder.create<mlir::tf_device::ReturnOp>(call_op->getLoc(),
                                                call_op->getResults());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 19:09:44 UTC 2023
    - 6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_parallel_execute_sink_resource_write.cc

          // Move AssignVariableOp and update the value to be written to the
          // resource variable to be the non forwarded value from within the
          // parallel_execute region.
          assign_var.getOperation()->moveBefore(terminator);
          assign_var.getValueMutable().assign(
              terminator->getOperand(result.index()));
          results_to_remove.push_back(result.index());
        }
    
        rewrite |= !results_to_remove.empty();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 06 04:46:18 UTC 2022
    - 6.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/partitioned_topological_sort.cc

            num_partitions_after += op_partition && (scheduled_something == false);
            scheduled_something = true;
            // Schedule the operation by moving it to the start.
            unscheduled_op.moveBefore(block, next_unscheduled_op);
            if (&unscheduled_op == &*next_unscheduled_op) {
              ++next_unscheduled_op;
            }
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 15:05:28 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc

        // defined by tf_device.replicate.
        if (DescendantUsesVirtualDevice(virtual_device_list, &inner_op)) continue;
    
        if (IsOpReplicateInvariant(replicate_region, &inner_op))
          inner_op.moveBefore(replicate_op);
      }
    }
    
    void ReplicateInvariantOpHoistingPass::runOnOperation() {
      getOperation().walk(
          [](tf_device::ReplicateOp op) { HoistReplicateInvariantOps(op); });
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
Back to top