Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for attr_value (0.27 sec)

  1. tensorflow/c/experimental/ops/gen/cpp/views/attr_view.cc

    string AttrView::DefaultValue() const {
      const AttrValue &attr_value = attr_.default_value();
      switch (attr_value.value_case()) {
        case AttrValue::VALUE_NOT_SET:
          return "";
        case AttrValue::kType:
          return DataType_Name(attr_value.type());
        case AttrValue::kS:
          return "\"" + attr_value.s() + "\"";
        case AttrValue::kI:
          return std::to_string(attr_value.i());
        case AttrValue::kF:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 03 07:02:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

          *list->add_tensor() = tensor;
        } else if (auto attr = mlir::dyn_cast<mlir::FlatSymbolRefAttr>(a)) {
          AttrValue attr_val;
          TF_RETURN_IF_ERROR(ConvertAttribute(attr, &attr_val));
          *list->add_func() = attr_val.func();
        } else if (auto attr = mlir::dyn_cast<mlir::TypeAttr>(a)) {
          AttrValue attr_val;
          // For type attributes, we only propagate the element type.
          mlir::Type elt_type = attr.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.cc

        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()) {
            return emitError(loc, mlir_attr.status().message());
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/convert_attr.h

    absl::StatusOr<mlir::Attribute> ConvertNonFuncAttributeValue(
        const AttrValue& value, mlir::Builder* builder);
    
    // Converts all kinds of AttrValue proto into an MLIR attribute.
    absl::StatusOr<mlir::Attribute> ConvertAttributeValue(const AttrValue& value,
                                                          mlir::Builder* builder);
    
    }  // namespace tensorflow
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util.cc

              device.has_job && device.job == jobType) {
            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)
  6. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc

                                         IntegerAttr attr_value, Operation* op,
                                         ModuleOp& module) {
      const auto ex_attr_value = module->getAttrOfType<IntegerAttr>(attr_name);
      if (ex_attr_value == nullptr) {
        module->setAttr(attr_name, attr_value);
        return success();
      }
      if (ex_attr_value == attr_value) {
        return success();
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

        }
      }
      return true;
    }
    
    bool HasSymbolRefAttr(Operation* op) {
      for (const auto& attr : op->getAttrs()) {
        Attribute attr_value = attr.getValue();
        if (mlir::isa<SymbolRefAttr>(attr_value)) {
          return true;
        } else if (auto array_attr = mlir::dyn_cast<ArrayAttr>(attr_value)) {
          if (!array_attr.empty() &&
              mlir::isa<SymbolRefAttr>(*array_attr.begin())) {
            return true;
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/translate/export_tf_dialect_op.h

    #include "llvm/ADT/StringRef.h"
    #include "mlir/IR/Operation.h"  // from @llvm-project
    #include "tensorflow/compiler/mlir/tensorflow/utils/export_utils.h"
    #include "tensorflow/core/framework/attr_value.pb.h"
    #include "tensorflow/core/framework/node_def.pb.h"
    #include "tensorflow/core/framework/node_def_util.h"
    #include "tensorflow/core/framework/op_def_builder.h"
    #include "tensorflow/core/platform/status.h"
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. 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)
  10. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

      }
      return true;
    }
    
    bool HasSymbolRefAttr(Operation* op) {
      for (const auto& attr : op->getAttrs()) {
        Attribute attr_value = attr.getValue();
        if (mlir::isa<SymbolRefAttr>(attr_value)) {
          return true;
        } else if (auto array_attr = mlir::dyn_cast<ArrayAttr>(attr_value)) {
          if (!array_attr.empty() &&
              mlir::isa<SymbolRefAttr>(*array_attr.begin())) {
            return true;
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
Back to top