Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for ToGraph (0.09 sec)

  1. tensorflow/compiler/jit/rearrange_function_argument_pass_test.cc

        auto ret0 = ops::_Retval(s.WithOpName("ret0"), arg1, 0);
        auto ret1 = ops::_Retval(s.WithOpName("ret1"), arg0, 1);
        std::unique_ptr<Graph> g(new Graph(OpRegistry::Global()));
        TF_CHECK_OK(s.ToGraph(g.get()));
        FunctionDef *xla_fdef = fdl.add_function();
        TF_CHECK_OK(GraphToFunctionDef(*g, "f1", xla_fdef));
      }
      {
        // Function for While's "body".
        // "arg0" (T=DT_RESOURCE), "arg1" (T=DT_BOOL)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 11:36:41 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/mark_for_compilation_pass_test.cc

      ops::PartitionedCall c(root.WithOpName("C"), {a}, {DT_FLOAT}, c_name_attr);
      Output d = ops::Add(root.WithOpName("D"), b.output.front(), c.output.front());
    
      TF_ASSERT_OK(root.ToGraph(graph.get()));
      TF_ASSERT_OK(
          MarkForCompilationPassTestHelper::MarkForCompilation(&graph, &flib_def));
      auto clusters = GetClusters(*graph);
    
      EXPECT_EQ(2, clusters.size());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 14 10:11:10 UTC 2024
    - 79.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/partially_decluster_pass_test.cc

      auto graph = std::make_unique<Graph>(OpRegistry::Global());
      TF_ASSERT_OK(s.ToGraph(graph.get()));
    
      // This is needed to register the XLA_GPU device.
      std::vector<std::unique_ptr<Device>> devices;
      TF_ASSERT_OK(DeviceFactory::AddDevices(
          SessionOptions(), "/job:localhost/replica:0/task:0", &devices));
    
      // Scope::ToGraph loses the assigned device name since it goes through
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 10 12:32:39 UTC 2022
    - 23K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/shape_inference_test.cc

      auto f = ops::Neg(root.WithOpName("F"), e);
      auto g = ops::AddN(root.WithOpName("G"), std::initializer_list<Output>{e, f});
    
      std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
      TF_CHECK_OK(root.ToGraph(graph.get()));
    
      GraphShapeInfo shape_info;
      TF_ASSERT_OK(InferShapes(graph.get(), /*arg_shapes=*/{},
                               /*fnlib_def=*/nullptr, &shape_info));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 00:41:19 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util_test.cc

              .Attr("Tout", {DT_RESOURCE})
              .Attr("f", f_name_attr)
              .Finalize(root.graph(), &call));
      call->AddAttr(std::string(kMustCompileAttr), true);
    
      TF_ASSERT_OK(root.ToGraph(&graph));
    
      // Required for passing the PS server parameter check.
      for (Node* node : graph.nodes()) {
        node->set_assigned_device_name("/job:ps/replica:0/task:0/device:GPU:0");
      }
    
      EXPECT_TRUE(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 17 19:51:50 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/extract_outside_compilation_pass_test.cc

      auto ret0 = ops::_Retval(s.WithOpName("ret0"), add, 0);
      auto ret1 = ops::_Retval(s.WithOpName("ret1"), arg1, 1);
      std::unique_ptr<Graph> g(new Graph(OpRegistry::Global()));
      TF_CHECK_OK(s.ToGraph(g.get()));
      auto node_name_image = g->BuildNodeNameIndex();
      Node *add_node = node_name_image["add"];
      EXPECT_NE(add_node, nullptr);
      add_node->AddAttr(kXlaConnectedToXlaComputationAttrName, "cluster");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 41K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/encapsulate_xla_computations_pass_test.cc

      auto consumer2 = ops::Identity(scope.WithOpName("consumer2"), out2);
      auto consumer3 = ops::Identity(scope.WithOpName("consumer3"), out3);
    
      std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
      TF_CHECK_OK(scope.ToGraph(graph.get()));
      return graph;
    }
    
    // Makes an encapsulate body graph for use in tests.
    static std::unique_ptr<Graph> MakeBodyGraph() {
      Scope scope = Scope::NewRootScope().ExitOnError();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 16 18:03:15 UTC 2023
    - 14.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/encapsulate_util_test.cc

      Output add = ops::Add(s.WithOpName("add"), const_0, const_1);
      Output identity = ops::Identity(s.WithOpName("identity"), add);
      Graph g(OpRegistry::Global());
      TF_CHECK_OK(s.ToGraph(&g));
    
      TF_CHECK_OK(PerformStaticShapeInferenceBeforeEncapsulation(&g));
    
      // Check that "add" node now has _xla_inferred_shapes attr.
      auto node_index = g.BuildNodeNameIndex();
      Node *add_node = node_index["add"];
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 05 22:06:22 UTC 2019
    - 2.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/clone_constants_for_better_clustering_test.cc

          ->mutable_optimizer_options()
          ->set_global_jit_level(OptimizerOptions::ON_2);
      GraphOptimizationPassOptions options;
      options.graph = &graph;
      options.session_options = &session_options;
    
      // Scope::ToGraph seems to drop assigned devices, probably because it goes
      // through a GraphDef.  So explicitly maintain the device assignment.
      // std::unordered_map<string, string> assigned_device_names;
      // for (Node* n : s.graph()->nodes()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/force_xla_constants_on_host_pass_test.cc

      SessionOptions session_options;
      session_options.env = Env::Default();
      options.graph = &graph;
      options.session_options = &session_options;
      options.flib_def = flib_def;
      TF_RETURN_IF_ERROR(s.ToGraph(graph.get()));
      ForceXlaConstantsOnHostPass rewriter;
      TF_RETURN_IF_ERROR(rewriter.Run(options));
      *result = std::move(graph);
      return absl::OkStatus();
    }
    
    TEST(ForceXlaConstantsOnHostPassTest, Simple) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top