File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ paddle::framework::GarbageCollector* Tracer::MutableGarbageCollectorIfNotExists(
8383 if (gcs_.count (place) == 0 ) {
8484 std::unique_ptr<framework::GarbageCollector> gc;
8585 if (platform::is_gpu_place (place)) {
86- #ifdef PADDLE_WITH_CUDA
86+ #if defined( PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
8787 gc.reset (new framework::DefaultStreamGarbageCollector (
8888 BOOST_GET_CONST (platform::CUDAPlace, place), 0 ));
8989
@@ -94,7 +94,7 @@ paddle::framework::GarbageCollector* Tracer::MutableGarbageCollectorIfNotExists(
9494 " Please recompile or reinstall Paddle with GPU support." ));
9595#endif
9696 } else if (platform::is_cuda_pinned_place (place)) {
97- #ifdef PADDLE_WITH_CUDA
97+ #if defined( PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
9898 gc.reset (new framework::CUDAPinnedGarbageCollector (
9999 BOOST_GET_CONST (platform::CUDAPinnedPlace, place), 0 ));
100100
You can’t perform that action at this time.
0 commit comments