- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 57 for Memcpy (0.28 sec)
-
src/cmd/cgo/internal/testsanitizers/testdata/msan2.go
package main /* #include <string.h> #include <stdint.h> #include <stdlib.h> void f(int32_t *p, int n) { int32_t * volatile q = (int32_t *)malloc(sizeof(int32_t) * n); memcpy(p, q, n * sizeof(*p)); free(q); } void g(int32_t *p, int n) { if (p[4] != 1) { abort(); } } */ import "C" import ( "unsafe" ) func main() { a := make([]int32, 10)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 644 bytes - Viewed (0) -
tensorflow/compiler/jit/xla_host_recv_device_context.cc
Status status = XLAShapeToTensorShape(shape_, &tensor_shape); if (!status.ok()) { done(status); return; } *cpu_tensor = Tensor(dtype, tensor_shape); status = stream_->Memcpy(cpu_tensor->data(), device_memory_base_, device_memory_base_.size()); if (!status.ok()) { done(status); return; } status = stream_->RecordEvent(done_event_.get().get());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 22:46:36 UTC 2024 - 1.9K bytes - Viewed (0) -
tensorflow/compiler/jit/xla_host_send_recv_device_context_test.cc
xla::Shape shape; TF_ASSERT_OK(TensorShapeToXLAShape(DT_FLOAT, TensorShape({2, 2}), &shape)); // Copy the cpu_tensor to the GPU first before trying to copy it back. TF_ASSERT_OK( stream->Memcpy(&gpu_dst, origin_cpu_tensor.data(), gpu_dst.size())); TF_ASSERT_OK(stream->BlockHostUntilDone()); TF_ASSERT_OK_AND_ASSIGN(auto se_event, executor->CreateEvent()); tsl::AsyncValueRef<std::unique_ptr<se::Event>> done_event =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 22:46:36 UTC 2024 - 7.2K bytes - Viewed (0) -
tensorflow/compiler/jit/xla_host_send_device_context.cc
namespace tensorflow { void XlaHostSendDeviceContext::CopyCPUTensorToDevice( const Tensor* cpu_tensor, Device* device, Tensor* device_tensor, StatusCallback done, bool sync_dst_compute) const { auto status = stream_->Memcpy(device_memory_base_, cpu_tensor->data(), device_memory_base_->size()); if (!status.ok()) { done(status); return; } status = stream_->RecordEvent(done_event_.get().get());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 22:46:36 UTC 2024 - 1.6K bytes - Viewed (0) -
tensorflow/c/eager/c_api_remote_test.cc
TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); float product[4] = {0}; EXPECT_EQ(sizeof(product), TF_TensorByteSize(t)); memcpy(&product[0], TF_TensorData(t), TF_TensorByteSize(t)); TF_DeleteTensor(t); EXPECT_EQ(7, product[0]); EXPECT_EQ(10, product[1]); EXPECT_EQ(15, product[2]); EXPECT_EQ(22, product[3]);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 12 00:14:22 UTC 2020 - 5.4K bytes - Viewed (0) -
tensorflow/c/experimental/stream_executor/stream_executor.h
// Records a stop event for an interval timer. void (*stop_timer)(const SP_Device* device, SP_Stream stream, SP_Timer timer, TF_Status* status); /*** MEMCPY CALLBACKS ***/ // Enqueues a memcpy operation onto stream, with a host destination location // `host_dst` and a device memory source, with target size `size`. void (*memcpy_dtoh)(const SP_Device* device, SP_Stream stream, void* host_dst,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 24 08:40:35 UTC 2022 - 21.6K bytes - Viewed (0) -
tensorflow/c/tf_buffer.cc
extern "C" { TF_Buffer* TF_NewBuffer() { return new TF_Buffer{nullptr, 0, nullptr}; } TF_Buffer* TF_NewBufferFromString(const void* proto, size_t proto_len) { void* copy = tensorflow::port::Malloc(proto_len); std::memcpy(copy, proto, proto_len); TF_Buffer* buf = new TF_Buffer; buf->data = copy; buf->length = proto_len; buf->data_deallocator = [](void* data, size_t length) { tensorflow::port::Free(data); };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun Apr 14 21:57:32 UTC 2024 - 3K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test.cc
EXPECT_EQ(TF_FLOAT, TFE_TensorHandleDataType(h)); TF_Tensor* t = TFE_TensorHandleResolve(h, status.get()); ASSERT_EQ(16, TF_TensorByteSize(t)); float data[4] = {0}; memcpy(&data[0], TF_TensorData(t), TF_TensorByteSize(t)); EXPECT_EQ(1.0, data[0]); EXPECT_EQ(2.0, data[1]); EXPECT_EQ(3.0, data[2]); EXPECT_EQ(4.0, data[3]); TF_DeleteTensor(t); TFE_DeleteTensorHandle(h);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Aug 03 20:50:20 UTC 2023 - 94.6K bytes - Viewed (0) -
tensorflow/c/experimental/grappler/grappler.cc
tsl::Set_TF_Status_from_Status( status, absl::InvalidArgumentError( "Not enough storage to hold the requested list of nodes")); return; } memcpy(values[index], s.data(), s.size()); p += s.size(); index++; } } void TF_GetFetchNodesListSize(const TF_GrapplerItem* item, int* num_values,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 15K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental_test.cc
ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get()); TF_Tensor* result_tensor = TFE_TensorHandleResolve(result_t, status.get()); // Copy Tensor data into an array. float result_data[4] = {0}; memcpy(&result_data[0], TF_TensorData(result_tensor), TF_TensorByteSize(result_tensor)); int data_len = 4; // length of result_data for (int i = 0; i < data_len; i++) { EXPECT_EQ(result_data[i], 0); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 19 21:44:52 UTC 2023 - 39.1K bytes - Viewed (0)