Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for AttrValue (0.13 sec)

  1. tensorflow/compiler/mlir/tensorflow/translate/export_tf_dialect_op.h

    #include "tensorflow/core/platform/status.h"
    
    namespace tensorflow {
    
    // Extracts the attributes of a MLIR operation and populates the converted
    // attributes in a proto map<string, AttrValue>.
    Status GetAttrValuesFromOperation(
        mlir::Operation* inst, llvm::StringRef name,
        const tensorflow::OpRegistrationData* op_reg_data,
        bool ignore_unregistered_attrs, AttrValueMap* attributes);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

              mlir::dyn_cast<mlir::TF::ResourceType>(arg_type.getElementType())) {
        llvm::ArrayRef<mlir::TensorType> subtypes = resource_type.getSubtypes();
        if (!subtypes.empty()) {
          AttrValue handle_dtypes_attr;
          AttrValue handle_shapes_attr;
          for (mlir::TensorType subtype : subtypes) {
            DataType dtype;
            TF_RETURN_IF_ERROR(ConvertToDataType(subtype.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)
  3. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

              mlir::dyn_cast<mlir::TF::ResourceType>(arg_type.getElementType())) {
        llvm::ArrayRef<mlir::TensorType> subtypes = resource_type.getSubtypes();
        if (!subtypes.empty()) {
          AttrValue handle_dtypes_attr;
          AttrValue handle_shapes_attr;
          for (mlir::TensorType subtype : subtypes) {
            DataType dtype;
            TF_RETURN_IF_ERROR(ConvertToDataType(subtype.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)
  4. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

          const std::string& func_name);
    
      // Converts the given non-function-call AttrValue to an MLIR Attribute.
      absl::StatusOr<mlir::Attribute> ConvertAttributeValue(const AttrValue& value);
    
      // Converts the given function-call AttrValue to MLIR Attributes and pushes
      // them to the given attributes list. For example, if there is a kFunc
      // AttrValue {name : foo, attrs : {k1 : bar, k2 : rfc}}, it will convert it to
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
  5. tensorflow/c/c_api_function.cc

                                      const void* proto, size_t proto_len,
                                      TF_Status* status) {
      tensorflow::AttrValue attr_value;
      if (!attr_value.ParseFromArray(proto, proto_len)) {
        status->status = InvalidArgument(
            "Unparseable AttrValue proto passed to "
            "TF_FunctionSetAttrValueProto");
        return;
      }
    
      auto fdef_or = func->record->mutable_fdef();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/custom_aggregator_op.cc

        .SetShapeFn([](::tensorflow::shape_inference::InferenceContext* c) {
          c->set_output(0, c->input(0));
          c->set_output(1, c->Scalar());
          c->set_output(2, c->Scalar());
    
          const tensorflow::AttrValue* num_bins_attr;
          TF_RETURN_IF_ERROR(c->GetAttr("num_bins", &num_bins_attr));
          c->set_output(3, c->MakeShape({num_bins_attr->i()}));
    
          return absl::OkStatus();
        });
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util.cc

            for (const auto& attr : node->attrs()) {
              auto attr_key = attr.first;
              auto attr_value = attr.second;
              if (attr_key == attrKey &&
                  attr_value.value_case() == AttrValue::kType &&
                  attr_value.type() == DT_RESOURCE) {
                return true;
                break;
              }
            }
          }
        }
      }
      return false;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 12:22:33 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.cc

        }
    
        OpBuilder builder(loc.getContext());
        for (const auto& name_and_value : node_def.attr()) {
          const std::string& attr_name = name_and_value.first;
          const tensorflow::AttrValue& attr_value = name_and_value.second;
          absl::StatusOr<Attribute> mlir_attr =
              tensorflow::ConvertAttributeValue(attr_value, &builder);
          if (!mlir_attr.ok()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

            break;
          }
          case ::tensorflow::AttrValue::kI:
            flex_builder->Int(key, attr.i());
            break;
          case ::tensorflow::AttrValue::kF:
            flex_builder->Float(key, attr.f());
            break;
          case ::tensorflow::AttrValue::kB:
            flex_builder->Bool(key, attr.b());
            break;
          case tensorflow::AttrValue::kList:
            if (attr.list().s_size() > 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
  10. tensorflow/c/c_api_test.cc

      EXPECT_EQ(0, TF_OperationOutputNumConsumers(TF_Output{feed, 0}));
      EXPECT_EQ(0, TF_OperationNumControlInputs(feed));
      EXPECT_EQ(0, TF_OperationNumControlOutputs(feed));
    
      tensorflow::AttrValue attr_value;
      ASSERT_TRUE(GetAttrValue(feed, "dtype", &attr_value, s)) << TF_Message(s);
      EXPECT_EQ(attr_value.type(), tensorflow::DT_INT32);
    
      // Test not found errors in TF_Operation*() query functions.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 96.9K bytes
    - Viewed (0)
Back to top