Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for Bytes (0.23 sec)

  1. tensorflow/c/c_api.cc

      // make sure there is no information loss.
      if (proto_len > std::numeric_limits<int>::max()) {
        status->status = InvalidArgument(
            "proto_len (", proto_len,
            " bytes) is too large to be parsed by the protocol buffer library");
        return;
      }
      TensorShapeProto shape;
      if (shape.ParseFromArray(proto, static_cast<int>(proto_len))) {
        desc->node_builder.Attr(attr_name, shape);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

        if (begin < end) {
          size_t bytes_to_copy = end - begin;
          memcpy(&buffer[total_bytes_transferred], &*begin, bytes_to_copy);
          total_bytes_transferred += bytes_to_copy;
        }
        if (data.size() < block_size_) {
          // The block was a partial block and thus signals EOF at its upper bound.
          break;
        }
      }
      TF_SetStatus(status, TF_OK, "");
      return total_bytes_transferred;
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 16 01:39:09 GMT 2020
    - 11.1K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

        int64_t bytes_transferred;
        if (offset < buf.size()) {
          size_t bytes_to_copy = std::min<size_t>(buf.size() - offset, n);
          memcpy(buffer, buf.data() + offset, bytes_to_copy);
          bytes_transferred = bytes_to_copy;
        } else {
          bytes_transferred = 0;
        }
        TF_SetStatus(status, TF_OK, "");
        return bytes_transferred;
      };
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:57 GMT 2021
    - 23.2K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/filesystem/plugins/posix/copy_file_portable.cc

        while (total_write < total_read && rc > 0) {
          rc = write(dst_fd, buffer.get() + total_write, chunk - total_write);
          if (rc < 0) return -1;
    
          total_write += rc;
          bytes_transferred += rc;
          offset += rc;
        }
      }
    
      return bytes_transferred;
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Nov 22 21:23:55 GMT 2019
    - 1.9K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

          dst += r;
          offset += static_cast<uint64_t>(r);
          n -= r;  // safe as 0 < r <= n so n will never underflow
          read += r;
        } else if (r == 0) {
          TF_SetStatus(status, TF_OUT_OF_RANGE, "Read fewer bytes than requested");
          break;
        } else if (errno == EINTR || errno == EAGAIN) {
          // Retry
        } else {
          TF_SetStatusFromIOError(status, errno, posix_file->filename);
          break;
        }
      }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Mar 24 20:08:23 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  6. tensorflow/c/c_api_test.cc

        tensorflow::AttrValue attr;
        for (const string& v : list) {
          attr.mutable_list()->add_s(v);
        }
        string bytes;
        attr.SerializeToString(&bytes);
        TF_SetAttrValueProto(desc, tensorflow::kColocationAttrName, bytes.data(),
                             bytes.size(), s_);
        ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
      }
    
      void VerifyCollocation(TF_Operation* op,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
  7. tensorflow/c/c_test_util.cc

    }
    
    TF_Tensor* Int32Tensor(int32_t v) {
      const int num_bytes = sizeof(int32_t);
      int32_t* values = new int32_t[1];
      values[0] = v;
      return TF_NewTensor(TF_INT32, nullptr, 0, values, num_bytes,
                          &Int32Deallocator, nullptr);
    }
    
    TF_Tensor* DoubleTensor(double v) {
      const int num_bytes = sizeof(double);
      double* values = new double[1];
      values[0] = v;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  8. tensorflow/c/eager/dlpack.cc

            "Unsupported byte_offset (", dl_tensor->byte_offset,
            ") from DLPack, must be zero");
        return nullptr;
      }
    
      size_t total_bytes = dl_tensor->dtype.bits / 8;
      for (int i = 0; i < num_dims; i++) {
        total_bytes *= dims[i];
      }
    
      if (dl_tensor->strides != nullptr &&
          !IsValidStrideCompactRowMajorData(dl_tensor->shape, dl_tensor->strides,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  9. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

                                            TF_Status* status) {
      const int num_bytes = v.size() * sizeof(float);
      float* values = new float[v.size()];
      memcpy(values, v.data(), num_bytes);
      int64_t dims = v.size();
      std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor(
          TF_NewTensor(TF_FLOAT, &dims, 1 /* num_dims */, values, num_bytes,
                       &FloatDeallocator, nullptr),
          TF_DeleteTensor);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/filesystem/plugins/posix/copy_file_linux.cc

    #include "tensorflow/c/experimental/filesystem/plugins/posix/copy_file.h"
    
    namespace tf_posix_filesystem {
    
    // Transfers up to `size` bytes from `dst_fd` to `src_fd`.
    //
    // This method uses `sendfile` specific to linux after 2.6.33.
    int CopyFileContents(int dst_fd, int src_fd, off_t size) {
      off_t offset = 0;
      int bytes_transferred = 0;
      int rc = 1;
      // When `sendfile` returns 0 we stop copying and let callers handle this.
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Nov 22 21:23:55 GMT 2019
    - 1.5K bytes
    - Viewed (0)
Back to top