Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for mutable_attr (0.25 sec)

  1. tensorflow/compiler/jit/xla_kernel_creator_test.cc

    TEST_F(XlaKernelCreatorTest, OneFloatOneResourceArgument) {
      FunctionDef fdef = XTimesY();
      (*fdef.mutable_attr())["_XlaMustCompile"] = BoolAttr(true);
      Init({fdef});
      XlaKernelCreator xla_kernel_creator;
      auto callsite =
          ToNodeProperties(R"pb(
            name: 'XTimesY' op: 'XTimesY' input: 'a' input: 'b'
          )pb");
      (*(callsite->node_def.mutable_attr()))["_XlaMustCompile"] = BoolAttr(true);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 16 01:39:55 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. tensorflow/c/kernels/bitcast_op_test.cc

      def.set_device(DEVICE_CPU);
    
      AttrValue typeAttr;
      SetAttrValue(input_tensor->dtype(), &typeAttr);
    
      AttrValue outTypeAttr;
      SetAttrValue(out_type, &outTypeAttr);
    
      (*def.mutable_attr())["T"] = typeAttr;
      (*def.mutable_attr())["type"] = outTypeAttr;
    
      def.add_input(
          strings::StrCat("input1: ", DataTypeString(input_tensor->dtype())));
    
      std::unique_ptr<OpKernel> kernel =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 18 15:10:51 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/translate/upgrade_graph.cc

                (*node_def.mutable_attr())["shared_name"].set_s(node_def.name());
              } else {
                // Use the concat of function name and node name for such ops in a
                // function as the shared_name. "@" is used as the separator because
                // it is not allowed in the function name or the node name.
                (*node_def.mutable_attr())["shared_name"].set_s(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 27 14:33:47 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. tensorflow/cc/gradients/functional_grad.cc

                               std::vector<Output>* grad_outputs) {
      NameAttrList f;
      TF_RETURN_IF_ERROR(GetNodeAttr(op.node()->attrs(), "f", &f));
      for (const auto& attr : op.node()->attrs()) {
        (*f.mutable_attr())[attr.first] = attr.second;
      }
    
      std::vector<Output> func_inputs;
      std::vector<DataType> input_dtypes;
      const int num_inputs = op.num_inputs();
      func_inputs.reserve(num_inputs + grad_inputs.size());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Oct 15 20:09:06 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

          }
    
          (*node_def->mutable_attr())["_handle_dtypes"] = handle_dtypes_attr;
          (*node_def->mutable_attr())["_handle_shapes"] = handle_shapes_attr;
        }
      }
    
      TF_RETURN_IF_ERROR(
          SetShapeAttribute("_output_shapes", arg_type, node_def->mutable_attr()));
    
      DataType dtype;
      TF_RETURN_IF_ERROR(ConvertToDataType(arg_type.getElementType(), &dtype));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

          }
    
          (*node_def->mutable_attr())["_handle_dtypes"] = handle_dtypes_attr;
          (*node_def->mutable_attr())["_handle_shapes"] = handle_shapes_attr;
        }
      }
    
      TF_RETURN_IF_ERROR(
          SetShapeAttribute("_output_shapes", arg_type, node_def->mutable_attr()));
    
      DataType dtype;
      TF_RETURN_IF_ERROR(ConvertToDataType(arg_type.getElementType(), &dtype));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 23:04:51 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  7. tensorflow/cc/tools/freeze_saved_model.cc

                                   NodeDef* const_node) {
      const_node->set_name(variable_node.name());
      const_node->set_op("Const");
      (*const_node->mutable_attr())["dtype"] = variable_node.attr().at("dtype");
      variable_value.AsProtoTensorContent(
          (*const_node->mutable_attr())["value"].mutable_tensor());
    }
    
    // Converts a ReadVariableOp NodeDef to an Identity NodeDef.
    void ConvertReadVariableOpToIdentity(const NodeDef& node,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 11 08:05:36 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  8. tensorflow/cc/gradients/functional_grad_test.cc

      //   C = XTimesTwo[_xla_compile_id="cluster"](A)
      TF_ASSERT_OK(scope_.graph()->AddFunctionLibrary(f_lib_proto));
    
      Output x = Placeholder(scope_, DT_FLOAT);
      NameAttrList f;
      f.set_name("XTimesTwo");
      (*f.mutable_attr())["T"].set_type(DT_FLOAT);
      auto results =
          PartitionedCall(scope_, std::initializer_list<Input>{x}, {DT_FLOAT}, f);
      RunTest(x, {}, results[0], {});
    
      auto stateful_results = StatefulPartitionedCall(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 26 14:42:24 UTC 2021
    - 3K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/extract_outside_compilation_pass_test.cc

      std::map<string, int> host_compute_core = {{"0", 1}, {"1", 0}};
      std::vector<string> shape_inference_graphs;
      bool has_outside_compilation;
      NameAttrList name_attrs;
      name_attrs.set_name("cluster");
      *name_attrs.mutable_attr() = attrs;
      TF_CHECK_OK(ExtractOutsideCompilationTest(
          "_xla", "_oc", "cluster", name_attrs, "cluster_rewritten", "host_graph",
          host_compute_core, &fld, &shape_inference_graphs,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 41K bytes
    - Viewed (0)
  10. 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);
    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