Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for TryGetNodeAttr (0.2 sec)

  1. tensorflow/compiler/jit/force_xla_constants_on_host_pass_test.cc

      bool found = false;
      for (Node* node : graph->nodes()) {
        if (CanCreateXlaKernel(node->def())) {
          EXPECT_FALSE(found);
          found = true;
          std::vector<int32> hostmem_attr;
          EXPECT_TRUE(TryGetNodeAttr(node->def(), "_input_hostmem", &hostmem_attr));
          EXPECT_EQ(hostmem_attr.size(), 1);
          EXPECT_EQ(hostmem_attr[0], 1);
        }
      }
      EXPECT_TRUE(found);
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/encapsulate_xla_computations_pass.cc

    namespace {
    
    const char* const kXlaClusterOutput = "XlaClusterOutput";
    
    bool IsCpuGpuCompile(const Graph* graph) {
      for (Node* n : graph->nodes()) {
        string name;
        // Only consider nodes being compiled.
        if (!TryGetNodeAttr(n->attrs(), kXlaClusterIdAttr, &name)) continue;
        // Early return for any node with a device that is not a CPU or GPU.
        DeviceNameUtils::ParsedName parsed;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/node_matchers.cc

                      << node->name();
          }
          return false;
        }
    
        if (constant_value) {
          const TensorProto* proto = nullptr;
          if (!TryGetNodeAttr(node->def(), "value", &proto)) {
            if (listener->IsInterested()) {
              *listener << "\ncould not find \"value\" attribute in node";
            }
            return false;
          }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 03 16:15:20 UTC 2022
    - 16.8K bytes
    - Viewed (0)
  4. tensorflow/cc/framework/scope.cc

      std::unordered_set<string> current_constraints(colocation_constraints_);
      const AttrSlice attrs = colocate_with_op.node()->attrs();
      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)) {
    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/mark_for_compilation_pass.cc

      if (!n) {
        return false;
      }
    
      if (n->type_string() != "AssignAddVariableOp" &&
          n->type_string() != "AssignSubVariableOp") {
        return false;
      }
    
      DataType dtype;
      if (!TryGetNodeAttr(n->def(), "dtype", &dtype) || !DataTypeIsInteger(dtype)) {
        return false;
      }
    
      Node* const_input = nullptr;
      for (const Edge* e : n->in_edges()) {
        if (!e->IsControlEdge() && e->src()->IsConstant()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 12:19:41 UTC 2024
    - 85.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/mark_for_compilation_pass_test.cc

    std::unordered_map<string, string> GetClusters(const Graph& graph) {
      std::unordered_map<string, string> ids;
      for (Node* node : graph.nodes()) {
        string cluster;
        if (TryGetNodeAttr(node->attrs(), kXlaClusterAttr, &cluster)) {
          CHECK(!cluster.empty());
          ids[node->name()] = cluster;
        }
      }
    
      if (VLOG_IS_ON(2)) {
        VLOG(2) << "Clusters:";
        for (const auto& p : ids) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 14 10:11:10 UTC 2024
    - 79.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/extract_outside_compilation_pass.cc

      std::unordered_map<string, Node*> outside_compilation_attr_to_node;
      for (Node* n : g.op_nodes()) {
        bool is_lifted_arg;
        string outside_compilation_attr;
        if (TryGetNodeAttr(n->def(), kXlaIsLiftedArgAttrName, &is_lifted_arg) &&
            TryGetNodeAttr(n->def(), "_xla_outside_compilation",
                           &outside_compilation_attr)) {
          TF_RET_CHECK(is_lifted_arg);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 104.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/encapsulate_subgraphs_pass.cc

      }
      return absl::OkStatus();
    }
    
    bool IsXlaCompiledKernel(const Node& node) {
      bool is_compiled = false;
      bool has_compilation_attr =
          TryGetNodeAttr(node.attrs(), kXlaCompiledKernelAttr, &is_compiled) &&
          is_compiled;
      return has_compilation_attr ? is_compiled : false;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 51K bytes
    - Viewed (0)
Back to top