Home
last modified time | relevance | path

Searched refs:DeviceMemoryBase (Results 1 – 25 of 97) sorted by relevance

1234

/external/tensorflow/tensorflow/compiler/xla/service/interpreter/
Dexecutor.h50 using Args = absl::Span<const DeviceMemoryBase>;
72 void *AllocateSubBuffer(DeviceMemoryBase *mem, uint64 offset_bytes,
74 void Deallocate(DeviceMemoryBase *mem) override;
83 bool Memcpy(Stream *stream, void *host_dst, const DeviceMemoryBase &pop_src,
85 bool Memcpy(Stream *stream, DeviceMemoryBase *pop_dst, const void *host_src,
87 bool MemcpyDeviceToDevice(Stream *stream, DeviceMemoryBase *pop_dst, in MemcpyDeviceToDevice()
88 const DeviceMemoryBase &host_src, in MemcpyDeviceToDevice()
93 bool MemZero(Stream *stream, DeviceMemoryBase *location, in MemZero()
97 bool Memset(Stream *stream, DeviceMemoryBase *location, uint8 pattern, in Memset()
101 bool Memset32(Stream *stream, DeviceMemoryBase *location, uint32 pattern, in Memset32()
[all …]
Dexecutor.cc38 void *XlaInterpreterExecutor::AllocateSubBuffer(DeviceMemoryBase *parent, in AllocateSubBuffer()
44 void XlaInterpreterExecutor::Deallocate(DeviceMemoryBase *mem) { in Deallocate()
51 const DeviceMemoryBase &dev_src, in Memcpy()
60 bool XlaInterpreterExecutor::Memcpy(Stream *stream, DeviceMemoryBase *dev_dst, in Memcpy()
70 DeviceMemoryBase *dev_dst, const void *host_src, uint64 size) { in SynchronousMemcpy()
76 void *host_dst, const DeviceMemoryBase &dev_src, uint64 size) { in SynchronousMemcpy()
/external/tensorflow/tensorflow/stream_executor/
Ddevice_memory.h56 class DeviceMemoryBase {
61 explicit DeviceMemoryBase(void *opaque = nullptr, uint64 size = 0,
75 bool operator<(const DeviceMemoryBase &other) const {
92 bool IsSameAs(const DeviceMemoryBase &other) const { in IsSameAs()
119 class DeviceMemory final : public DeviceMemoryBase {
122 DeviceMemory() : DeviceMemoryBase(nullptr, 0) {} in DeviceMemory()
127 explicit DeviceMemory(const DeviceMemoryBase &other) in DeviceMemory()
128 : DeviceMemoryBase(const_cast<DeviceMemoryBase &>(other).opaque(), in DeviceMemory()
151 DeviceMemoryBase::Reset(opaque, bytes); in ResetFromByteSize()
163 DeviceMemory(void *opaque, uint64 size) : DeviceMemoryBase(opaque, size) {} in DeviceMemory()
[all …]
Dstream_executor_internal.h199 virtual void *AllocateSubBuffer(DeviceMemoryBase *parent, uint64 offset,
201 virtual void Deallocate(DeviceMemoryBase *mem) = 0;
216 virtual bool SynchronousMemZero(DeviceMemoryBase *location, uint64 size) = 0;
217 virtual bool SynchronousMemSet(DeviceMemoryBase *location, int value,
219 virtual port::Status SynchronousMemcpy(DeviceMemoryBase *gpu_dst,
222 const DeviceMemoryBase &gpu_src,
225 DeviceMemoryBase *gpu_dst, const DeviceMemoryBase &gpu_src,
227 virtual bool MemZero(Stream *stream, DeviceMemoryBase *location,
229 virtual bool Memset(Stream *stream, DeviceMemoryBase *location, uint8 pattern, in Memset()
233 virtual bool Memset32(Stream *stream, DeviceMemoryBase *location,
[all …]
Dstream_executor_pimpl.h191 port::StatusOr<DeviceMemoryBase> GetUntypedSymbol(
202 void Deallocate(DeviceMemoryBase *mem);
249 bool SynchronousMemZero(DeviceMemoryBase *location,
254 bool SynchronousMemSet(DeviceMemoryBase *location, int value,
261 bool SynchronousMemcpy(DeviceMemoryBase *device_dst, const void *host_src,
268 bool SynchronousMemcpy(void *host_dst, const DeviceMemoryBase &device_src,
273 DeviceMemoryBase *device_dst);
280 DeviceMemoryBase *device_dst) { in SynchronousMemcpyH2D()
287 port::Status SynchronousMemcpyD2H(const DeviceMemoryBase &device_src,
303 bool SynchronousMemcpy(DeviceMemoryBase *device_dst,
[all …]
Dtemporary_memory_manager.cc32 DeviceMemoryBase device_memory = it->first; in ForceDeallocateAll()
38 const DeviceMemoryBase& device_memory, uint64 generation, bool must_exist) { in MarkFinalized()
56 DeviceMemoryBase device_memory = it->first; in DeallocateFinalizedTemporaries()
67 bool TemporaryMemoryManager::IsFinalized(const DeviceMemoryBase& device_memory, in IsFinalized()
83 bool TemporaryMemoryManager::HasAllocated(const DeviceMemoryBase& device_memory, in HasAllocated()
97 DeviceMemoryBase device_memory = in AllocateArrayBase()
Dtemporary_device_memory.h62 DeviceMemoryBase* mutable_device_memory();
65 const DeviceMemoryBase& device_memory() const;
93 TemporaryDeviceMemoryBase(Stream* parent, DeviceMemoryBase device_memory,
97 DeviceMemoryBase device_memory_;
Dtemporary_memory_manager.h77 void MarkFinalized(const DeviceMemoryBase& device_memory, uint64 generation,
91 bool IsFinalized(const DeviceMemoryBase& device_memory,
99 bool HasAllocated(const DeviceMemoryBase& device_memory,
117 std::map<DeviceMemoryBase, TemporaryMemoryRecord> records_ GUARDED_BY(mutex_);
Dstream_executor_pimpl.cc252 void StreamExecutor::Deallocate(DeviceMemoryBase *mem) { in Deallocate()
518 port::StatusOr<DeviceMemoryBase> StreamExecutor::GetUntypedSymbol( in GetUntypedSymbol()
525 return DeviceMemoryBase(opaque, bytes); in GetUntypedSymbol()
604 bool StreamExecutor::SynchronousMemZero(DeviceMemoryBase *location, in SynchronousMemZero()
612 bool StreamExecutor::SynchronousMemSet(DeviceMemoryBase *location, int value, in SynchronousMemSet()
621 bool StreamExecutor::SynchronousMemcpy(DeviceMemoryBase *device_dst, in SynchronousMemcpy()
639 const DeviceMemoryBase &device_src, in SynchronousMemcpy()
653 bool StreamExecutor::SynchronousMemcpy(DeviceMemoryBase *device_dst, in SynchronousMemcpy()
654 const DeviceMemoryBase &device_src, in SynchronousMemcpy()
669 const DeviceMemoryBase &device_src, int64 size, void *host_dst) { in SynchronousMemcpyD2H()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dbuffer_allocations.h45 se::DeviceMemoryBase address);
56 absl::flat_hash_map<BufferAllocation::Index, se::DeviceMemoryBase>
71 se::DeviceMemoryBase GetDeviceAddress(
76 se::DeviceMemoryBase GetDeviceAddress(
79 se::DeviceMemoryBase GetTempBufferBase() const { return temp_buffer_base_; } in GetTempBufferBase()
83 Status TearDown(const std::set<se::DeviceMemoryBase>& live_addresses);
96 se::DeviceMemoryBase buffer);
101 std::vector<se::DeviceMemoryBase> buffers_;
104 se::DeviceMemoryBase temp_buffer_base_;
Dbuffer_allocations.cc36 se::DeviceMemoryBase address) { in RegisterBuffer()
61 if (se::DeviceMemoryBase* address = in Build()
78 se::DeviceMemoryBase buffer_address; in Build()
129 const std::set<se::DeviceMemoryBase>& live_addresses) { in TearDown()
136 se::DeviceMemoryBase buffer_address = GetDeviceAddress(allocation.index()); in TearDown()
153 se::DeviceMemoryBase BufferAllocations::GetDeviceAddress( in GetDeviceAddress()
160 se::DeviceMemoryBase BufferAllocations::GetDeviceAddress( in GetDeviceAddress()
162 se::DeviceMemoryBase base = GetDeviceAddress(buffer_slice.index()); in GetDeviceAddress()
165 return se::DeviceMemoryBase( in GetDeviceAddress()
171 se::DeviceMemoryBase buffer) { in SetBuffer()
Dcudnn_conv_runner.h54 absl::Span<se::DeviceMemoryBase> operand_buffers,
55 se::DeviceMemoryBase result_buffer,
56 se::DeviceMemoryBase scratch_buf, se::Stream* stream,
60 absl::Span<se::DeviceMemoryBase> operand_buffers,
61 se::DeviceMemoryBase result_buffer,
Dcudnn_conv_runner.cc31 using se::DeviceMemoryBase;
58 se::DeviceMemoryBase bias_buf;
59 se::DeviceMemoryBase side_input_buf; // nullable
66 se::DeviceMemoryBase input_buf;
67 se::DeviceMemoryBase filter_buf;
68 se::DeviceMemoryBase output_buf;
82 explicit ScratchBufAllocator(se::DeviceMemoryBase scratch) in ScratchBufAllocator()
108 se::DeviceMemoryBase scratch_;
322 absl::Span<se::DeviceMemoryBase> operand_buffers, in GetCudnnConvParams()
323 se::DeviceMemoryBase result_buffer) { in GetCudnnConvParams()
[all …]
/external/tensorflow/tensorflow/stream_executor/host/
Dhost_gpu_executor.h64 void *AllocateSubBuffer(DeviceMemoryBase *mem, uint64 offset_bytes,
66 void Deallocate(DeviceMemoryBase *mem) override;
75 bool Memcpy(Stream *stream, void *host_dst, const DeviceMemoryBase &gpu_src,
77 bool Memcpy(Stream *stream, DeviceMemoryBase *gpu_dst, const void *host_src,
79 bool MemcpyDeviceToDevice(Stream *stream, DeviceMemoryBase *gpu_dst,
80 const DeviceMemoryBase &host_src,
83 bool MemZero(Stream *stream, DeviceMemoryBase *location,
85 bool Memset(Stream *stream, DeviceMemoryBase *location, uint8 pattern,
87 bool Memset32(Stream *stream, DeviceMemoryBase *location, uint32 pattern,
92 bool SynchronousMemZero(DeviceMemoryBase *location, uint64 size) override;
[all …]
Dhost_gpu_executor.cc44 void *HostExecutor::AllocateSubBuffer(DeviceMemoryBase *parent, in AllocateSubBuffer()
49 void HostExecutor::Deallocate(DeviceMemoryBase *mem) { in Deallocate()
55 bool HostExecutor::SynchronousMemZero(DeviceMemoryBase *location, uint64 size) { in SynchronousMemZero()
60 bool HostExecutor::SynchronousMemSet(DeviceMemoryBase *location, int value, in SynchronousMemSet()
67 const DeviceMemoryBase &gpu_src, uint64 size) { in Memcpy()
76 bool HostExecutor::Memcpy(Stream *stream, DeviceMemoryBase *gpu_dst, in Memcpy()
87 DeviceMemoryBase *gpu_dst, in MemcpyDeviceToDevice()
88 const DeviceMemoryBase &gpu_src, in MemcpyDeviceToDevice()
100 bool HostExecutor::MemZero(Stream *stream, DeviceMemoryBase *location, in MemZero()
110 bool HostExecutor::Memset(Stream *stream, DeviceMemoryBase *location, in Memset()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/
Downing_device_memory.h46 explicit OwningDeviceMemory(se::DeviceMemoryBase mem, int device_ordinal, in OwningDeviceMemory()
56 other.mem_ = se::DeviceMemoryBase(); in OwningDeviceMemory()
68 other.mem_ = se::DeviceMemoryBase();
103 se::DeviceMemoryBase AsDeviceMemoryBase() { in AsDeviceMemoryBase()
104 return se::DeviceMemoryBase(opaque(), size(), /*is_sub_buffer=*/false); in AsDeviceMemoryBase()
109 TF_MUST_USE_RESULT se::DeviceMemoryBase Forget() { in Forget()
114 se::DeviceMemoryBase mem(mem_); in Forget()
115 mem_ = se::DeviceMemoryBase(); in Forget()
124 se::DeviceMemoryBase mem_;
Dshaped_buffer.h72 const se::DeviceMemoryBase& root_buffer() const { in root_buffer()
78 const se::DeviceMemoryBase& buffer(const ShapeIndex& index) const { in buffer()
83 void set_buffer(const se::DeviceMemoryBase& buffer, const ShapeIndex& index) { in set_buffer()
90 void set_buffers(ShapeTree<se::DeviceMemoryBase> buffers) { in set_buffers()
97 const ShapeTree<se::DeviceMemoryBase>& buffers() const { return buffers_; } in buffers()
98 ShapeTree<se::DeviceMemoryBase>& buffers() { return buffers_; } in buffers()
119 ShapeTree<se::DeviceMemoryBase> buffers_;
169 *buffers_.mutable_element(index) = se::DeviceMemoryBase(); in set_buffer()
Dtransfer_manager.h168 const se::DeviceMemoryBase& dest,
172 const se::DeviceMemoryBase& source,
178 const se::DeviceMemoryBase& dest,
182 const se::DeviceMemoryBase& source,
270 const se::DeviceMemoryBase& source,
279 se::DeviceMemoryBase* destination);
285 se::Stream* stream, absl::Span<const se::DeviceMemoryBase> elements,
286 const Shape& shape, se::DeviceMemoryBase* region) = 0;
Dmaybe_owning_device_memory.h34 explicit MaybeOwningDeviceMemory(se::DeviceMemoryBase unowned) in MaybeOwningDeviceMemory()
39 MaybeOwningDeviceMemory& operator=(se::DeviceMemoryBase unowned) {
53 se::DeviceMemoryBase AsDeviceMemoryBase();
65 absl::variant<OwningDeviceMemory, se::DeviceMemoryBase> mem_;
Dtransfer_manager.cc112 se::Stream* stream, const Shape& shape, const se::DeviceMemoryBase& source, in TransferArrayFromDevice()
141 const se::DeviceMemoryBase& dest, in TransferArrayToDevice()
156 const se::DeviceMemoryBase& dest, in TransferArrayToDeviceAsync()
178 se::Stream* stream, const Shape& shape, const se::DeviceMemoryBase& source, in TransferArrayFromDevice()
247 se::DeviceMemoryBase device_memory = device_buffer.buffer(index); in WriteTupleIndexTablesAsync()
251 std::vector<se::DeviceMemoryBase> elements; in WriteTupleIndexTablesAsync()
270 se::DeviceMemoryBase device_memory = device_buffer.buffer({}); in WriteRootTupleIndexTable()
274 std::vector<se::DeviceMemoryBase> elements; in WriteRootTupleIndexTable()
284 se::Stream* stream, const se::DeviceMemoryBase& source, int64 size, in TransferBufferFromDevice()
298 se::DeviceMemoryBase* destination) { in TransferBufferToDevice()
[all …]
Dshaped_buffer_test.cc69 return OwningDeviceMemory(se::DeviceMemoryBase(buf, size), device_ordinal, in Allocate()
73 Status Deallocate(int device_ordinal, se::DeviceMemoryBase mem) override { in Deallocate()
121 [&](const xla::ShapeIndex& index, se::DeviceMemoryBase* buffer) { in TEST()
127 ShapeTree<se::DeviceMemoryBase> buffers = sb.buffers(); in TEST()
134 const se::DeviceMemoryBase& buffer) { in TEST()
142 [&](const xla::ShapeIndex& index, const se::DeviceMemoryBase& buffer) { in TEST()
/external/tensorflow/tensorflow/stream_executor/gpu/
Dgpu_executor.h91 void* AllocateSubBuffer(DeviceMemoryBase* mem, uint64 offset_bytes,
94 void Deallocate(DeviceMemoryBase* mem) override;
122 bool SynchronousMemZero(DeviceMemoryBase* location, uint64 size) override;
124 bool SynchronousMemSet(DeviceMemoryBase* location, int value,
127 port::Status SynchronousMemcpy(DeviceMemoryBase* gpu_dst,
131 const DeviceMemoryBase& gpu_src,
134 port::Status SynchronousMemcpyDeviceToDevice(DeviceMemoryBase* gpu_dst,
135 const DeviceMemoryBase& gpu_src,
138 bool MemZero(Stream* stream, DeviceMemoryBase* location,
140 bool Memset(Stream* stream, DeviceMemoryBase* location, uint8 pattern,
[all …]
/external/tensorflow/tensorflow/core/common_runtime/gpu/
Dgpu_debug_allocator_test.cc50 se::DeviceMemory<int64> gpu_array_ptr{se::DeviceMemoryBase{gpu_array}}; in TEST()
79 se::DeviceMemoryBase{gpu_array}}; in TEST()
84 se::DeviceMemoryBase{gpu_array - 1}}; in TEST()
115 se::DeviceMemoryBase{gpu_array}}; in TEST()
121 se::DeviceMemoryBase{gpu_array + s}}; in TEST()
148 se::DeviceMemory<float> gpu_array_ptr{se::DeviceMemoryBase{gpu_array}}; in TEST()
195 se::DeviceMemory<float> gpu_array_ptr{se::DeviceMemoryBase{gpu_array}}; in TEST()
Dgpu_util.cc60 using se::DeviceMemoryBase;
161 DeviceMemoryBase gpu_src_ptr(src_ptr, total_bytes); in SetProtoFromGPU()
215 DeviceMemoryBase gpu_src_ptr(src_ptr, total_bytes); in DeviceToDeviceCopy()
217 DeviceMemoryBase gpu_dst_ptr(dst_ptr, total_bytes); in DeviceToDeviceCopy()
282 DeviceMemoryBase gpu_src_ptr(src_ptr, total_bytes); in CopyGPUTensorToCPU()
329 DeviceMemoryBase gpu_dst_ptr(dst_ptr, total_bytes); in CopyCPUTensorToGPU()
382 DeviceMemoryBase gpu_ptr(ptr, num_bytes); in MemoryDebugString()
440 DeviceMemoryBase gpu_src_ptr(src_ptr, total_bytes); in CopyGPUTensorToSameGPU()
442 DeviceMemoryBase gpu_dst_ptr(dst_ptr, total_bytes); in CopyGPUTensorToSameGPU()
/external/tensorflow/tensorflow/stream_executor/rocm/
Drocm_gpu_executor.cc81 static hipDeviceptr_t AsROCmDevicePtr(const DeviceMemoryBase& gpu_mem) { in AsROCmDevicePtr()
86 static hipDeviceptr_t AsROCmDevicePtr(DeviceMemoryBase* gpu_mem) { in AsROCmDevicePtr()
429 void* GpuExecutor::AllocateSubBuffer(DeviceMemoryBase* mem, uint64 offset_bytes, in AllocateSubBuffer()
435 void GpuExecutor::Deallocate(DeviceMemoryBase* mem) { in Deallocate()
460 bool GpuExecutor::SynchronousMemZero(DeviceMemoryBase* location, uint64 size) { in SynchronousMemZero()
470 bool GpuExecutor::SynchronousMemSet(DeviceMemoryBase* location, int value, in SynchronousMemSet()
485 port::Status GpuExecutor::SynchronousMemcpy(DeviceMemoryBase* gpu_dst, in SynchronousMemcpy()
492 const DeviceMemoryBase& gpu_src, in SynchronousMemcpy()
499 DeviceMemoryBase* gpu_dst, const DeviceMemoryBase& gpu_src, uint64 size) { in SynchronousMemcpyDeviceToDevice()
504 bool GpuExecutor::MemZero(Stream* stream, DeviceMemoryBase* location, in MemZero()
[all …]

1234