Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 136 for Dtype (0.06 sec)

  1. tensorflow/compiler/mlir/lite/utils/constant_utils.cc

        } else {
          return tensorflow::Status(absl::StatusCode::kInvalidArgument,
                                    "Unsupported type");
        }
      } else if (auto itype = mlir::dyn_cast<mlir::IntegerType>(element_type)) {
        if (element_type.isSignedInteger()) {
          switch (itype.getWidth()) {
            case 8:
              return DenseElementsAttr::get<int8_t>(shaped_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/extract_outside_compilation_pass_test.cc

        for (int i = 0; i < 2; ++i) {
          tensor_proto.add_int_val(1);
        }
        NodeDef const_def;
        TF_CHECK_OK(NodeDefBuilder("const", "Const")
                        .Attr("dtype", DT_INT32)
                        .Attr("value", tensor_proto)
                        .Finalize(&const_def));
        Status s;
        Node *const_node = g->AddNode(const_def, &s);
        TF_CHECK_OK(s);
    
        NodeDef fn_def;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 41K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        Location loc = graph_func.getLoc();
        FunctionType ftype = graph_func.getFunctionType();
    
        func::FuncOp func = rewriter.create<func::FuncOp>(
            graph_func.getLoc(),
            graph_func->getAttrOfType<StringAttr>(SymbolTable::getSymbolAttrName())
                .getValue(),
            ftype);
    
        func->setAttrs(graph_func->getAttrs());
    
        llvm::SmallVector<Type> arg_types;
        llvm::SmallVector<Type> res_types;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  4. 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)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

                        Attribute value) {
      // Handle the case where the type and value are already tensors.
      if (mlir::isa<TensorType>(type) && mlir::isa<ElementsAttr>(value)) {
        result.addTypes(type);
        result.addAttribute("value", value);
        return;
      }
    
      // Otherwise, default to the attribute builder.
      ConstOp::build(builder, result, value);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc

          assert(while_caller.body_function() == func);
          while_callers.push_back(while_caller);
        }
      }
      return while_callers;
    }
    
    bool IsResourceType(Type type) {
      return mlir::isa<TF::ResourceType>(getElementTypeOrSelf(type));
    }
    
    bool OnlyOperatesOnCompositeDevices(
        TF::TPUExecuteAndUpdateVariablesOp& op,
        const TF::SideEffectAnalysis::Info& side_effect_analysis,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

        }
        if (ftype.isF64()) {
          return tflite::TensorType_COMPLEX128;
        }
        return Status(absl::StatusCode::kInvalidArgument, "Unsupported type");
      } else if (auto itype = mlir::dyn_cast<mlir::IntegerType>(type)) {
        switch (itype.getWidth()) {
          case 1:
            return tflite::TensorType_BOOL;
          case 4:
            if (itype.isUnsigned()) {
              return Status(absl::StatusCode::kInvalidArgument,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

      else
        return UnrankedTensorType::get(type.getValue());
    }
    }  // namespace
    
    // Returns whether type can be further refined.
    bool CanBeRefined(Type type) {
      auto shape_type = mlir::dyn_cast<ShapedType>(type);
      if (!shape_type) return false;
    
      // Returns whether type with subtypes can be further refined.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc

    func::FuncOp BuildGELUDecomposition(RankedTensorType type,
                                        PatternRewriter& rewriter,
                                        Block* insertion_point) {
      rewriter.setInsertionPointToStart(insertion_point);
    
      auto ftype = FunctionType::get(rewriter.getContext(), {type}, {type});
      auto name = rewriter.getStringAttr("gelu_decomp");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc

    LogicalResult ConstantFoldMul(mhlo::MulOp op, PatternRewriter &rewriter) {
      ShapedType type = mlir::dyn_cast<ShapedType>(op.getType());
      Type etype = type.getElementType();
      Attribute result = {};
      if (mlir::isa<FloatType>(etype)) {
        result =
            BinaryFolder<mhlo::MulOp, FloatType, APFloat, std::multiplies<APFloat>>(
                &op);
      } else if (mlir::isa<IntegerType>(etype)) {
        result =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.5K bytes
    - Viewed (0)
Back to top