Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 66 for Dtype (0.04 sec)

  1. tensorflow/c/eager/dlpack.cc

      owner->reference.Unref();
      delete owner;
    }
    
    // Converts TF_DATAType to DLPack data type.
    DLDataType GetDlDataType(TF_DataType data_type, TF_Status* status) {
      DLDataType dtype;
      dtype.lanes = 1;
      dtype.bits = TF_DataTypeSize(data_type) * 8;
      switch (data_type) {
        case TF_DataType::TF_BOOL:
          dtype.code = DLDataTypeCode::kDLBool;
          break;
        case TF_DataType::TF_HALF:
        case TF_DataType::TF_FLOAT:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 15 09:49:45 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  2. tensorflow/c/tf_tensor.cc

      return CreateTensor(buf, dtype, dims, num_dims, len);
    }
    
    TF_Tensor* TF_NewTensor(TF_DataType dtype, const int64_t* dims, int num_dims,
                            void* data, size_t len,
                            void (*deallocator)(void* data, size_t len, void* arg),
                            void* deallocator_arg) {
      TF_ManagedBuffer* buf = nullptr;
      if (dtype != TF_STRING && dtype != TF_RESOURCE &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  3. tensorflow/c/c_test_util.cc

    void PlaceholderHelper(TF_Graph* graph, TF_Status* s, const char* name,
                           TF_DataType dtype, const std::vector<int64_t>& dims,
                           TF_Operation** op) {
      TF_OperationDescription* desc = TF_NewOperation(graph, "Placeholder", name);
      TF_SetAttrType(desc, "dtype", dtype);
      if (!dims.empty()) {
        TF_SetAttrShape(desc, "shape", dims.data(), dims.size());
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Oct 15 03:16:52 UTC 2021
    - 17.8K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/gradients/math_grad.cc

      auto dtype = input->DataType();
      if (DataTypeIsFloating(BaseType(dtype)) ||
          DataTypeIsInteger(BaseType(dtype))) {
        return tensorflow::ops::Identity(ctx, input, output, name);
      } else if (!DataTypeIsComplex(BaseType(dtype)) &&
                 BaseType(dtype) != DT_VARIANT) {
        return errors::InvalidArgument(
            "Expected numeric or variant tensor, got dtype ", dtype);
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 28 13:53:47 UTC 2024
    - 15.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/node_matchers.cc

      if (tensor.dtype() != expected_tensor.dtype()) {
        if (listener->IsInterested()) {
          *listener << "\nexpected tensor of type "
                    << DataType_Name(expected_tensor.dtype())
                    << " but found one of type " << DataType_Name(tensor.dtype());
          return false;
        }
      }
    
      switch (tensor.dtype()) {
        case DT_HALF:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 03 16:15:20 UTC 2022
    - 16.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/shape_inference.cc

              DataType dtype = n->output_type(0);
              AddNodeAttr("dtype", dtype, &const_def);
              TensorProto value;
              value.set_dtype(dtype);
              value.mutable_tensor_shape()->add_dim()->set_size(
                  shape_proto.dim_size());
              for (const auto& dim : shape_proto.dim()) {
                if (dtype == DT_INT32) {
                  value.add_int_val(dim.size());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 00:41:19 UTC 2024
    - 13K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/xla_launch_util.cc

      // Copy XLA results to the OpOutputList.
      int output_num = 0;
      for (int i = 0, end = ctx->num_outputs(); i < end; ++i) {
        const DataType& type = compilation_result.outputs[i].type;
        VLOG(2) << "Populating output for retval " << i << " type "
                << DataTypeString(type);
        if (type == DT_VARIANT) {
          return absl::UnimplementedError(
              "Support for TensorList crossing the XLA/TF boundary "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/pjrt_device_context.cc

          shape_determination_fns.layout_preference_fn(
              cpu_tensor->shape(), cpu_tensor->dtype(), std::nullopt);
      TF_ASSIGN_OR_RETURN(xla::Shape shape,
                          shape_determination_fns.shape_representation_fn(
                              cpu_tensor->shape(), cpu_tensor->dtype(),
                              /*fast_mem=*/false, layout_preference));
      const xla::Layout* device_layout = &(shape.layout());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 08:49:31 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_metadata_utils.cc

      for (auto operand_type_and_idx : llvm::enumerate(op.getOperandTypes())) {
        Type operand_type = operand_type_and_idx.value();
        int index = operand_type_and_idx.index();
        tensorflow::tpu::TPUCompileMetadataProto::Arg* arg = metadata->add_args();
        tensorflow::DataType dtype;
        tensorflow::Status status =
            tensorflow::ConvertToDataType(operand_type, &dtype);
        if (!status.ok())
          return op.emitOpError(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_flags.cc

            absl::StrSplit(type, absl::ByAnyChar("()"));
        // If type has subtypes then parts[0] = type, parts[1] = subtypes,
        // parts[2] = ""
        if (parts.size() != 3 && parts.size() != 1) {
          return errors::InvalidArgument("Invalid type '", type, "'");
        } else if (parts.size() == 3) {
          // First part is the type, second is the subtype
          ArrayInfo::SubTypeInfo subtype;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top