MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AllocateWorkspace

Function AllocateWorkspace

tensorflow/stream_executor/cuda/cuda_blas.cc:3323–3330  ·  view source on GitHub ↗

Helper function to allocate workspace.

Source from the content-addressed store, hash-verified

3321
3322// Helper function to allocate workspace.
3323port::Status AllocateWorkspace(void** workspace,
3324 ScratchAllocator* scratch_allocator,
3325 size_t num_bytes) {
3326 SE_ASSIGN_OR_RETURN(DeviceMemory<uint8> workspace_bytes,
3327 scratch_allocator->AllocateBytes(num_bytes));
3328 *workspace = (void*)GpuMemoryMutable(&workspace_bytes);
3329 return port::Status::OK();
3330}
3331
3332template<typename T>
3333blas::ComputationType ToComputationType();

Callers 1

Calls 2

GpuMemoryMutableFunction · 0.85
AllocateBytesMethod · 0.45

Tested by

no test coverage detected