Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for takeBody (0.38 sec)

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

          replicate_op->getLoc(), new_result_types, replicate_op->getOperands(),
          replicate_op->getAttrs());
    
      // Move region to the new op.
      new_replicate_op.getRegion().takeBody(replicate_op.getRegion());
    
      // Replace all old uses with new op results.
      int old_num_results = replicate_op->getNumResults();
      replicate_op->replaceAllUsesWith(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util.cc

        int new_idx = child_idx >= cluster_idx ? child_idx + num_cores_per_replica
                                               : child_idx;
        new_parallel_execute->getRegions()[new_idx].takeBody(
            old_parallel_execute.getRegions()[old_idx]);
      }
    
      return cluster_idx;
    }
    
    mlir::tf_device::LaunchOp WrapOpInLaunch(mlir::OpBuilder* builder,
                                             mlir::Location loc,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 13 03:57:18 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/raise_custom_ops.cc

          inner_op->setOperand(idx_args.index(), idx_args.value());
        }
        custom_op->setAttrs(inner_op->getAttrs());
        builder.create<YieldOp>(loc, inner_op->getResults());
        custom_op.getBody().takeBody(region);
    
        op->replaceAllUsesWith(custom_op);
        op->erase();
      }
    }
    }  // namespace
    
    std::unique_ptr<OperationPass<func::FuncOp>> CreateRaiseCustomOpsPass() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tpu_parallel_execute_sink_resource_write.cc

          parallel_execute.getLoc(), num_regions, new_result_types);
    
      for (auto region : llvm::zip(new_parallel_execute.getRegions(),
                                   parallel_execute.getRegions()))
        std::get<0>(region).takeBody(std::get<1>(region));
    
      for (auto result :
           llvm::zip(results_to_remap, new_parallel_execute.getResults()))
        std::get<0>(result).replaceAllUsesWith(std::get<1>(result));
    
      parallel_execute.erase();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 06 04:46:18 UTC 2022
    - 6.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/cluster_formation.cc

      tf_device::LaunchOp launch_op = builder->create<tf_device::LaunchOp>(
          builder->getUnknownLoc(), builder->getStringAttr(c.target),
          live_out_types);
    
      // Attach the region to launch_op.
      launch_op.getBody().takeBody(region);
    
      // Replace any external uses of live-out values with return values of launch
      // op. So live-out values no longer escape the region.
      ReplaceLiveOutExternalUses(live_outs, launch_op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Oct 05 13:30:21 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/extract_tpu_copy_with_dynamic_shape_op.cc

      auto new_launch_op = builder.create<tf_device::LaunchOp>(
          old_launch_op->getLoc(), old_launch_op->getDeviceAttr(),
          /*result_types=*/new_launch_op_results_types);
    
      new_launch_op.getBody().takeBody(old_launch_op->getBody());
      new_launch_op.GetBody().getTerminator()->setOperands(new_launch_op_results);
    
      return new_launch_op;
    }
    
    // Create the new device launch op which wraps the copy 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)
  7. tensorflow/compiler/mlir/lite/transforms/pin_ops_with_side_effects.cc

        region.push_back(new_block);
        builder.setInsertionPointToEnd(&region.front());
        Operation *inner_op = builder.clone(*op);
        builder.create<YieldOp>(loc, inner_op->getResults());
        outer_op.getBody().takeBody(region);
        // Careful: We can't use outer_op.getResults(), because that also includes
        // the control token.
        op->replaceAllUsesWith(outer_op.getOutputs());
        op->erase();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc

        // We will "steal" the body of the island and replace it with a call to the
        // new function later.
        {
          YieldOp yield_op = island_op.GetYield();
          outlined_func.getBody().takeBody(island_op.getBody());
    
          // Replace the yield with a return
          OpBuilder replacer(yield_op);
          island_op.getBody().push_back(new Block);
          replacer.create<mlir::func::ReturnOp>(yield_op.getLoc(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top