Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for HasValidCompilationAndReplicationAttributes (0.42 sec)

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

      void runOnOperation() override;
    };
    
    LogicalResult ConvertToLegacyAttributes(func::FuncOp func_op) {
      auto result = func_op->walk([&](mlir::Operation* op) {
        if (failed(TF::HasValidCompilationAndReplicationAttributes(*op)))
          return WalkResult::interrupt();
        if (op->hasAttr(TF::kReplicationInfoAttr)) {
          op->setAttr(TF::kTpuReplicateAttr, op->getAttr(TF::kReplicationInfoAttr));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.cc

    #include "mlir/IR/Operation.h"  // from @llvm-project
    #include "tensorflow/compiler/tf2xla/tf2xla_defs.h"
    
    namespace mlir {
    namespace TF {
    
    using ::tensorflow::kValidDeviceTypes;
    
    LogicalResult HasValidCompilationAndReplicationAttributes(Operation& op) {
      auto replicate_attr = op.getAttrOfType<StringAttr>(kReplicationInfoAttr);
      auto compile_attr = op.getAttrOfType<StringAttr>(kCompileDeviceTypeAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 22:03:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.h

      }
      return matchPattern(val, m_Constant(&attr));
    }
    
    // Checks if both compilation and replication attributes are present in the
    // operation, and if their values are valid.
    LogicalResult HasValidCompilationAndReplicationAttributes(Operation &op);
    
    // Checks if the device attribute is valid.
    LogicalResult IsValidDeviceTypeOrEmpty(StringAttr attr);
    
    using ParallelExecutionIdPairs =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_cluster_formation.cc

      LogicalResult result = HasValidDeviceTypeAttribute(block);
      if (failed(result)) return result;
    
      for (Operation& op : *block) {
        LogicalResult result =
            mlir::TF::HasValidCompilationAndReplicationAttributes(op);
        if (failed(result)) return result;
    
        // Skip ops with non-TPU device type, they are handled elsewhere.
        auto device_type_attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 22:03:30 UTC 2024
    - 39.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

      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.
        auto cluster_id = op->getAttrOfType<StringAttr>(TF::kReplicationInfoAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
Back to top