Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for ClusterFuncOp (0.49 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_metadata_utils.cc

      return llvm::formatv("requires attribute '{0}'", attribute).str();
    }
    
    // Populates a TPUCompileMetadataProto with StepMarkerLocation from a
    // `tf_device::ClusterFuncOp`.
    LogicalResult SetMetadataProtoStepMarkerLocation(
        tf_device::ClusterFuncOp op,
        tensorflow::tpu::TPUCompileMetadataProto* metadata) {
      auto step_marker_location =
          op->getAttrOfType<StringAttr>(kStepMarkerLocationAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_read_for_write.cc

      SmallVector<tf_device::ClusterFuncOp, 4> cluster_funcs;
      getOperation().walk([&](tf_device::ClusterFuncOp cluster_func) {
        cluster_funcs.push_back(cluster_func);
      });
    
      OpBuilder builder(&getContext());
      // Add resource reads for resource writes from TPU cluster where for such
      // resources the TPU cluster does not read from.
      for (tf_device::ClusterFuncOp cluster_func : cluster_funcs) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 16:54:40 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util_test.cc

      llvm::SmallVector<mlir::tf_device::ClusterFuncOp, 4> cluster_func_ops;
      module->walk([&](mlir::tf_device::ClusterFuncOp cluster_func) {
        cluster_func_ops.push_back(cluster_func);
      });
      EXPECT_EQ(cluster_func_ops.size(), 1);
    
      EXPECT_TRUE(mlir::succeeded(tensorflow::EraseClusterFuncs(cluster_func_ops)));
    
      llvm::SmallVector<mlir::tf_device::ClusterFuncOp, 4> new_cluster_func_ops;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.h

        int num_cores_per_replica, mlir::tf_device::ClusterFuncOp cluster_func,
        mlir::OpBuilder* builder,
        llvm::SmallVectorImpl<llvm::SmallVector<mlir::Value, 4>>* input_list);
    
    // Extracts a list of OpSharding that represent output sharding configuration of
    // `tf_device.cluster`.
    mlir::LogicalResult ParseAndValidateOutputSharding(
        int num_cores_per_replica, mlir::tf_device::ClusterFuncOp cluster_func,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 28 22:18:34 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/xla_rewrite.cc

                                               callee.getBody().getArgumentTypes(),
                                               callee.getResultTypes()));
    }
    
    void RewriteCall(tf_device::ClusterFuncOp cluster_func_op, SymbolTable &symtab,
                     OpBuilder &builder) {
      llvm::SmallVector<Value> non_resource_args, resource_args;
      bool has_resources = false, in_order = true;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/mark_input_output_aliases.cc

        assert(aliasing_attr.getInt() == alias_info.output_index);
      }
    }
    
    void MarkInputOutputAliasesPass::runOnOperation() {
      SmallVector<tf_device::ClusterFuncOp, 4> cluster_funcs;
      ModuleOp module = getOperation();
      module.walk([&](tf_device::ClusterFuncOp cluster_func) {
        // Map resource values to pair of input-output indices.
        llvm::DenseMap<Value, AliasInfo> resource_alias_info_map;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 04:14:26 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

    }
    
    void TPUSpaceToDepthPass::runOnOperation() {
      std::optional<tf_device::ClusterFuncOp> cluster_func;
      // Space to depth only supports training loop.
      auto func_result = getOperation().walk([&](tf_device::ClusterFuncOp cluster) {
        cluster_func = cluster;
        return WalkResult::interrupt();
      });
    
      // Return if there is no tf_device::ClusterFuncOp in training loop.
      if (!func_result.wasInterrupted() || !cluster_func.has_value()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

        return WalkResult::advance();
      });
      if (result_init.wasInterrupted()) return signalPassFailure();
      llvm::SmallVector<tf_device::ClusterFuncOp> to_be_erased;
      OpBuilder builder(&getContext());
      auto result = getOperation().walk([&](tf_device::ClusterFuncOp op) {
        if (failed(TF::HasValidCompilationAndReplicationAttributes(*op)))
          return WalkResult::interrupt();
        // Skip non-tpu device cluster_func.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

    // XlaSharding op.
    void IdentifyXlaShardingForComputationInputs(
        const llvm::SmallVector<std::string>& logical_device_vec,
        bool infer_from_computation, mlir::tf_device::ClusterFuncOp cluster_func,
        mlir::func::FuncOp func, Builder* builder,
        OptionalOpShardingVector& sharding_for_args) {
      // Look up function definition from module.
      Block& function_block = func.front();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

        v = op->getOperand(0);
      }
      return v;
    }
    
    void AnnotateParameterReplicationPass::runOnOperation() {
      ModuleOp m = getOperation();
      OpBuilder builder(m.getContext());
      m.walk([&](tf_device::ClusterFuncOp cluster_func) {
        auto replicate = cluster_func->getParentOfType<tf_device::ReplicateOp>();
        if (!replicate) return;
        auto mirrored_variable_indices_attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top