Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 37 for Memcpy (0.43 sec)

  1. tensorflow/c/tf_tensor.cc

        buf = new TF_ManagedBuffer(tensorflow::allocate_tensor("TF_NewTensor", len),
                                   len, tensorflow::deallocate_buffer, nullptr,
                                   /*owns_memory=*/true);
        std::memcpy(buf->data(), data, len);
        // Free the original buffer.
        deallocator(data, len, deallocator_arg);
      } else {
        buf = new TF_ManagedBuffer(data, len, deallocator, deallocator_arg,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  2. tensorflow/c/kernels.cc

      absl::Status s = cc_ctx->GetAttr(attr_name, &v);
      ::tensorflow::Set_TF_Status_from_Status(status, s);
    
      if (!status->status.ok()) return;
    
      if (max_length <= 0) {
        return;
      }
      std::memcpy(value, v.data(), std::min<size_t>(v.length(), max_length));
    }
    
    void TF_OpKernelConstruction_GetAttrStringList(TF_OpKernelConstruction* ctx,
                                                   const char* attr_name,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 36K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/partially_decluster_pass.cc

          // Check if `dst` is in a different cluster, unclustered, or about to be
          // partially declustered (here we rely on the post-order traversal order).
          // If yes, decluster `n` to avoid the device-to-host memcpy.
          std::optional<absl::string_view> dst_cluster =
              result->count(dst) ? std::nullopt : GetXlaClusterForNode(*dst);
          if (from_cluster != dst_cluster) {
            CHECK(result->insert(n).second);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 11:36:41 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/test.go

    		X))
    }
    
    // issue 30065
    
    func test30065(t *testing.T) {
    	var a [256]byte
    	b := []byte("a")
    	C.memcpy(unsafe.Pointer(&a), unsafe.Pointer(&b[0]), 1)
    	if a[0] != 'a' {
    		t.Errorf("&a failed: got %c, want %c", a[0], 'a')
    	}
    
    	b = []byte("b")
    	C.memcpy(unsafe.Pointer(&a[0]), unsafe.Pointer(&b[0]), 1)
    	if a[0] != 'b' {
    		t.Errorf("&a[0] failed: got %c, want %c", a[0], 'b')
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
  5. tensorflow/c/c_api.cc

      status->status = s->session->PRunSetup(input_names, output_names,
                                             target_oper_names, &new_handle);
      if (status->status.ok()) {
        char* buf = new char[new_handle.size() + 1];
        memcpy(buf, new_handle.c_str(), new_handle.size() + 1);
        *handle = buf;
      }
    }
    
    void TF_PRun(TF_DeprecatedSession* s, const char* handle,
                 // Input tensors
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

        size_t copy_size = 0;
        if (offset < buffer_end && gcs_file->buffer_start) {
          copy_size = (std::min)(n, static_cast<size_t>(buffer_end - offset));
          memcpy(buffer,
                 gcs_file->buffer.data() + (offset - gcs_file->buffer_start),
                 copy_size);
        }
        bool consumed_buffer_to_eof =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 23 06:55:53 UTC 2023
    - 46.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_to_mhlo_int_test.cc

          TF_RETURN_IF_ERROR(
              tensorflow::XLAShapeToTensorShape(xla_literal->shape(), &shape));
          tensorflow::Tensor tensor(data_type, shape);
          std::memcpy(static_cast<char*>(tensor.data()),
                      xla_literal->untyped_data(),
                      xla::ShapeUtil::ByteSizeOfPrimitiveType(
                          xla_literal->shape().element_type()) *
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 01:03:21 UTC 2024
    - 35.8K bytes
    - Viewed (0)
  8. tensorflow/c/kernels_test.cc

      OpKernelContext* cc_ctx = reinterpret_cast<OpKernelContext*>(ctx);
      cc_ctx->eigen_gpu_device().memcpyHostToDevice(data, values,
                                                    tensor_size_bytes);
    #else
      memcpy(data, values, tensor_size_bytes);
    #endif
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 50.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

        auto status = absl::OkStatus();
    
        std::vector<uint8_t> custom_options;
    
        if (IsValidBufferOffset(op.large_custom_options_offset)) {
          custom_options.resize(op.large_custom_options_size);
          memcpy(custom_options.data(),
                 reinterpret_cast<const uint8_t*>(model_ptr->allocation()->base()) +
                     op.large_custom_options_offset,
                 op.large_custom_options_size);
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

    //             [11, 23]]   # == 2nd column in filter
    // This is exactly what the EmbeddedLookup operator is doing, on the transposed
    // matrix, without doing any arithmetic but only memcpy.
    def ReplaceOneHotFullyConnectedWithLookup : Pat<
      (TFL_FullyConnectedOp:$outputs
        (TFL_OneHotOp
          AnyStaticShapeTensor:$indices,
          (Arith_ConstantOp $depth),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
Back to top