Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for DecodeShardingAttribute (0.34 sec)

  1. tensorflow/compiler/mlir/tensorflow/tests/xla_sharding_util_test.cc

    TEST(DecodeShardingAttributeTest, CheckInvalidString) {
      xla::OpSharding sharding;
      EXPECT_TRUE(DecodeShardingAttribute("", sharding).succeeded());
      EXPECT_TRUE(DecodeShardingAttribute("manual", sharding).failed());
    }
    
    TEST(DecodeShardingAttributeTest, CheckManualShardString) {
      xla::OpSharding sharding;
      EXPECT_TRUE(DecodeShardingAttribute("{manual}", sharding).succeeded());
      EXPECT_TRUE(sharding.type() == sharding.MANUAL);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.h

    // or human readable.
    mlir::LogicalResult DecodeShardingAttribute(const std::string& shard_str,
                                                xla::OpSharding& sharding,
                                                bool report_error = true);
    
    // Encodes the sharding in human readable form.
    mlir::LogicalResult DecodeShardingAttribute(mlir::Attribute shard_attr,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 28 22:18:34 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

    }
    
    bool IsReplicatedSharding(const xla::OpSharding& sharding) {
      return sharding.type() == xla::OpSharding::REPLICATED ||
             IsOtherReplicatedSharding(sharding);
    }
    
    mlir::LogicalResult DecodeShardingAttribute(const std::string& shard_str,
                                                xla::OpSharding& sharding,
                                                bool report_error) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_metadata_utils.cc

      auto sharding_attr = mlir::dyn_cast<StringAttr>(attr);
      if (!sharding_attr)
        return op->emitOpError(
            llvm::formatv(kBadStringArrayElementMsg, name, index));
      if (tensorflow::DecodeShardingAttribute(sharding_attr, *sharding_ptr)
              .failed()) {
        return op->emitOpError(llvm::formatv(kBadArrayElementMsg, name, index,
                                             sharding_attr.getValue(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

        const OpShardingVariant& sharding_or_op) {
      xla::OpSharding sharding;
      const auto sharding_string = GetShardingStringFromVariant(sharding_or_op);
      if (!sharding_string) return std::nullopt;
      if (tensorflow::DecodeShardingAttribute(sharding_string->str(), sharding,
                                              false)
              .failed()) {
        return std::nullopt;
      }
      return sharding;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

        const XlaShapeLayoutHelpers::ShapeDeterminationFns shape_determination_fns,
        xla::Shape* shape) {
      if (!sharding) return absl::OkStatus();
    
      xla::OpSharding op_sharding;
      if (tensorflow::DecodeShardingAttribute(sharding, op_sharding).failed()) {
        return errors::InvalidArgument("failed to parse sharding '",
                                       sharding.getValue().str(), "'");
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

          // _XlaSharding attribute in TF is a serialized string of the OpSharding
          // proto, so convert to a text form here.
          ::xla::OpSharding sharding_proto;
          if (tensorflow::DecodeShardingAttribute(
                  op.get_XlaSharding().value().str(), sharding_proto)
                  .failed()) {
            return failure();
          }
          // Token is a control signal and not a real data, so arbitrarily assign
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
Back to top