MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / SetStream

Method SetStream

paddle/phi/backends/gpu/gpu_context.cc:1059–1067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1057void GPUContext::set_nccl_comm(ncclComm_t comm) { impl_->SetNcclComm(comm); }
1058
1059void GPUContext::Init() {
1060 impl_->allocator_ = const_cast<Allocator*>(&this->GetAllocator()); // NOLINT
1061 impl_->Init();
1062}
1063
1064void GPUContext::SetStream(gpuStream_t stream) {
1065#if !defined(_WIN32)
1066 this->SetAllocator(paddle::memory::allocation::AllocatorFacade::Instance()
1067 .GetAllocator(impl_->GetPlace(), stream)
1068 .get());
1069#endif
1070 impl_->allocator_ = const_cast<Allocator*>(&this->GetAllocator()); // NOLINT

Callers

nothing calls this directly

Calls 5

InstanceFunction · 0.85
SetAllocatorMethod · 0.45
getMethod · 0.45
GetAllocatorMethod · 0.45
GetPlaceMethod · 0.45

Tested by

no test coverage detected