Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jiweibo committed Jul 23, 2022
1 parent cea6739 commit c24b13e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions paddle/fluid/inference/api/resource_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,12 @@ void GPUContextResource::ReBindSparseHandle(gpuStream_t stream) const {

void GPUContextResource::ReBindEigenDevice(gpuStream_t stream,
GPUPlace place) const {
auto* allocator = paddle::memory::allocation::AllocatorFacade::Instance()
.GetAllocator(place_)
.get();
eigen_stream_->Reinitialize(stream, allocator, place);
if (eigen_stream_) {
auto* allocator = paddle::memory::allocation::AllocatorFacade::Instance()
.GetAllocator(place_)
.get();
eigen_stream_->Reinitialize(stream, allocator, place);
}
}

#endif
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/backends/gpu/gpu_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ struct GPUContext::Impl {
eigen_device_creator_ = std::move(creator);
}

Eigen::GpuDevice* eigen_device() const {
Eigen::GpuDevice* eigen_device() {
std::call_once(flag_eigen_device_, [&]() {
if (!eigen_device_) {
if (!eigen_device_creator_)
Expand Down

0 comments on commit c24b13e

Please sign in to comment.