Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ConsumePrefix (0.19 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/parse_text_proto.cc

    class NoOpErrorCollector : public protobuf::io::ErrorCollector {
     public:
      void AddError(int line, int column, const std::string& message) override {}
    };
    }  // namespace
    
    Status ConsumePrefix(absl::string_view str, absl::string_view prefix,
                         absl::string_view* output) {
      if (absl::StartsWith(str, prefix)) {
        *output = str.substr(prefix.size());
        return absl::OkStatus();
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/parse_text_proto.h

    #include "tensorflow/core/platform/protobuf.h"
    
    namespace tensorflow {
    
    // Sets output to the given input with `prefix` stripped, or returns an error if
    // the prefix doesn't exist.
    Status ConsumePrefix(absl::string_view str, absl::string_view prefix,
                         absl::string_view* output);
    
    // Strips `prefix_to_strip` from `text_proto`, parses, and returns the parsed
    // proto.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 06 09:43:41 UTC 2020
    - 1.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/mangling_util.cc

      return absl::StrCat(kDataTypePrefix, DataType_Name(dtype));
    }
    
    Status DemangleDataType(absl::string_view str, DataType* proto) {
      absl::string_view pbtxt;
      TF_RETURN_IF_ERROR(ConsumePrefix(str, kDataTypePrefix, &pbtxt));
      if (!DataType_Parse(string(pbtxt), proto)) {
        return errors::FailedPrecondition(
            "Could not parse TFDataType mangled proto");
      }
      return absl::OkStatus();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. tensorflow/cc/framework/scope.cc

      std::vector<string> node_constraints;
      if (TryGetNodeAttr(attrs, kColocationAttrName, &node_constraints)) {
        for (const string& entry : node_constraints) {
          StringPiece s(entry);
          if (absl::ConsumePrefix(&s, kColocationGroupPrefix)) {
            current_constraints.emplace(s);
          }
        }
      } else {
        current_constraints.insert(colocate_with_op.node()->name());
      }
      return current_constraints;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 05:57:22 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/flags.cc

            1;
        mark_for_compilation_flags->tf_xla_ops_to_cluster = "FUSIBLE";
        return true;
      }
    
      absl::string_view value_sv(value);
      if (!absl::ConsumePrefix(&value_sv, "single-gpu(") ||
          !absl::ConsumeSuffix(&value_sv, ")") ||
          !absl::SimpleAtoi(value_sv, &opt_level)) {
        return false;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 17 18:52:57 UTC 2024
    - 24.5K bytes
    - Viewed (0)
Back to top