Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Int32 (0.13 sec)

  1. tensorflow/c/c_test_util.cc

                           const int32_t* values) {
      int64_t num_values = 1;
      for (int i = 0; i < num_dims; ++i) {
        num_values *= dims[i];
      }
      TF_Tensor* t =
          TF_AllocateTensor(TF_INT32, dims, num_dims, sizeof(int32_t) * num_values);
      memcpy(TF_TensorData(t), values, sizeof(int32_t) * num_values);
      return t;
    }
    
    TF_Tensor* Int32Tensor(const std::vector<int32_t>& values) {
      int64_t dims = values.size();
    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)
  2. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

      while (n > 0) {
        // Some platforms, notably macs, throw `EINVAL` if `pread` is asked to read
        // more than fits in a 32-bit integer.
        size_t requested_read_length;
        if (n > INT32_MAX)
          requested_read_length = INT32_MAX;
        else
          requested_read_length = n;
    
        // `pread` returns a `ssize_t` on POSIX, but due to interface being
        // cross-platform, return type of `Read` is `int64_t`.
    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)
  3. tensorflow/c/eager/dlpack.cc

        case TF_DataType::TF_FLOAT:
        case TF_DataType::TF_DOUBLE:
          dtype.code = DLDataTypeCode::kDLFloat;
          break;
        case TF_DataType::TF_INT8:
        case TF_DataType::TF_INT16:
        case TF_DataType::TF_INT32:
        case TF_DataType::TF_INT64:
          dtype.code = DLDataTypeCode::kDLInt;
          break;
        case TF_DataType::TF_UINT8:
        case TF_DataType::TF_UINT16:
        case TF_DataType::TF_UINT32:
    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)
  4. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

    }
    
    std::unique_ptr<ParallelTensor> ParallelDevice::DeviceIDs(
        TFE_Context* context, TF_Status* status) const {
      std::vector<int32_t> ids;
      ids.reserve(num_underlying_devices());
      for (int i = 0; i < num_underlying_devices(); ++i) {
        ids.push_back(i);
      }
      return ScalarsFromSequence<int32_t>(ids, context, status);
    }
    
    absl::optional<std::vector<std::unique_ptr<ParallelTensor>>>
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  5. tensorflow/c/eager/c_api_test_util.cc

      return th;
    }
    
    TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, int value) {
      int data[] = {value};
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_INT32, nullptr, 0, status);
      memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t));
      TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status);
      CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 23.5K bytes
    - Viewed (2)
  6. tensorflow/c/eager/c_api_experimental_test.cc

        TFE_ContextSetExecutorForThread(ctx, executor);
        CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
        TF_Tensor* t =
            TF_AllocateTensor(TF_INT32, nullptr, 0, 1 * sizeof(tensorflow::int32));
        *reinterpret_cast<tensorflow::int32*>(TF_TensorData(t)) = 42;
        TFE_TensorHandle* h = TFE_NewTensorHandle(t, status);
        ASSERT_TRUE(TF_GetCode(status) == TF_OK) << TF_Message(status);
        TF_DeleteTensor(t);
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  7. tensorflow/c/c_api_experimental_test.cc

      TFE_Op* reshape_op = TFE_NewOp(tfe_context_, "Reshape", status_);
      CHECK_EQ(TF_OK, TF_GetCode(status_)) << TF_Message(status_);
      TFE_OpSetAttrType(reshape_op, "T", TF_FLOAT);
      TFE_OpSetAttrType(reshape_op, "Tshape", TF_INT32);
      CheckOutputShapes(reshape_op,
                        /* input_shapes*/ {unknown_shape(), unknown_shape()},
                        /* input_tensors*/ {nullptr, tensor_1X6},
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jan 17 22:27:52 GMT 2023
    - 13.1K bytes
    - Viewed (1)
Back to top