Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for add_function (0.16 sec)

  1. tensorflow/compiler/jit/compilability_check_util_test.cc

      FunctionDefLibrary flib;
      *flib.add_function() = FunctionDefHelper::Define(
          /*Function*/ kCompilableFunctionName,
          /*Inputs*/ {"n_a:float", "n_b:float"},
          /*Outputs*/ {"n_c:float"},
          /*Attribute*/ {},
          // Node info
          {{{kCompilableFunctionNodeName},
            "Add",
            {"n_a", "n_b"},
            {{"T", DT_FLOAT}}}});
      *flib.add_function() = FunctionDefHelper::Define(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 10 12:32:39 UTC 2022
    - 22.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/rearrange_function_argument_pass_test.cc

        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)
        // "ret0" = "arg0"
        // "ret1" = "arg1"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 11:36:41 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util_test.cc

          {{{"out"}, "Identity", {"in"}, {{"T", DataType::DT_RESOURCE}}}});
    }
    
    TEST(IsSupportedByNonReplicatedBridge, NonReplicatedGraph) {
      const FunctionDef& fd = PassThroughResource();
      FunctionDefLibrary flib;
      *flib.add_function() = fd;
      FunctionLibraryDefinition flib_def(OpRegistry::Global(), flib);
      Graph graph(flib_def);
      graph.SetConstructionContext(ConstructionContext::kEagerRuntime);
      tensorflow::set_tf2_execution(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)
  4. tensorflow/compiler/jit/extract_outside_compilation_pass_test.cc

        PartialTensorShape shape({2});
        node_name_image["identity1"]->AddAttr(
            kXlaInferredShapesAttrName, std::vector<PartialTensorShape>{shape});
    
        FunctionDef *xla_fdef = fdl.add_function();
        TF_CHECK_OK(GraphToFunctionDef(*g, "cluster", xla_fdef));
      }
      FunctionLibraryDefinition fld(OpRegistry::Global(), fdl);
    
      protobuf::Map<string, tensorflow::AttrValue> attrs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 41K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc

      GraphDef graphdef_expected;
    
      *library_expected.add_function() = test::function::XTimesTwo();
      *library_expected.add_function() = FunctionDefHelper::Create(
          "F1", {"a_0_arg:float"}, {"c_0_retval:float"}, {},
          {
              {{"C"}, "UnaryTest", {"a_0_arg"}},
          },
          {{"c_0_retval", "C:o:0"}});
      *library_expected.add_function() = FunctionDefHelper::Create(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 113.3K bytes
    - Viewed (0)
  6. tensorflow/cc/gradients/functional_grad_test.cc

        EXPECT_LT(max_error, 1e-3);
      }
    
      Scope scope_;
    };
    
    TEST_F(FunctionGradTest, PartitionedCallGrad) {
      FunctionDefLibrary f_lib_proto;
      *(f_lib_proto.add_function()) = test::function::XTimesTwo();
    
      // Construct a graph:
      //   A = Placeholder[dtype=int32]
      //   B = XTimesTwo[_tpu_replicate="cluster"](A)
      //   C = XTimesTwo[_xla_compile_id="cluster"](A)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 26 14:42:24 UTC 2021
    - 3K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/force_xla_constants_on_host_pass_test.cc

                                    {{"c", "t0:y:0"}});
    
      AttrValue true_attribute;
      true_attribute.set_b(true);
      (*called_func.mutable_attr())[kXlaMustCompileAttr] = true_attribute;
      *library.add_function() = called_func;
      TF_ASSERT_OK(root.graph()->AddFunctionLibrary(library));
      FunctionLibraryDefinition flib_def(OpRegistry::Global(), library);
      Output in = ops::Placeholder(root, DT_FLOAT);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/tests/device_compiler_test_helper.cc

           {{"k"}, "Add", {"j", "h"}, {{"T", DT_FLOAT}}},
           {{"l"}, "Add", {"k", "h"}, {{"T", DT_FLOAT}}},
           {{"m"}, "Identity", {"l"}, {{"T", DT_FLOAT}}}});
    
      GraphDef graph;
      *graph.mutable_library()->add_function() = make_test_fn;
      *graph.add_node() = MakeNode("a", "Placeholder", {},
                                   {{"dtype", DT_FLOAT}, {"shape", input_shape}});
      *graph.add_node() = MakeNode("b", "Placeholder", {},
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 08:24:16 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/xla_kernel_creator_test.cc

        TF_CHECK_OK(DeviceFactory::AddDevices(
            options, "/job:localhost/replica:0/task:0", &devices));
    
        FunctionDefLibrary proto;
        for (const auto& fdef : flib) {
          *(proto.add_function()) = fdef;
        }
        lib_def_ = std::make_unique<FunctionLibraryDefinition>(
            OpRegistry::Global(), proto);
        OptimizerOptions opts;
        device_mgr_ = std::make_unique<StaticDeviceMgr>(std::move(devices));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 16 01:39:55 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/build_xla_ops_pass_test.cc

          /*function_name=*/name, /*in_def=*/{}, /*out_def=*/{"out: float"},
          /*attr_def*/
          {}, /*node_def=*/{FunctionDefHelper::Const("one", 1.0f)},
          /*ret_def=*/{{"out", "out:output:0"}});
      *fdef_lib.add_function() = std::move(func);
      return fdef_lib;
    }
    
    TEST_F(BuildXlaOpsTest, ControlDepsPreserved) {
      const char* kXlaDeviceName = "/job:worker/replica:0/task:0/device:XLA_CPU:0";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 12.2K bytes
    - Viewed (0)
Back to top