Skip to main content
QUICK REVIEW

[논문 리뷰] DELTA: Dynamically Optimizing GPU Memory beyond Tensor Recomputation

Yu Tang, Chenyu Wang|arXiv (Cornell University)|2022. 03. 30.
Tensor decomposition and applications인용 수 6
한 줄 요약

DELTA는 런타임에서 텐서 스위핑과 재계산을 공동 최적화하는 혁신적인 동적 GPU 메모리 관리자로, 수동 튜닝을 제거하고 메모리 압박을 줄입니다. 필터, 디렉터, 프리페치 모듈을 사용해 지능적으로 텐서를 오프로드하여 최대 70%의 메모리 절감과 최소한의 학습 지연으로 2.25배 큰 배치 크기를 달성합니다.

ABSTRACT

The further development of deep neural networks is hampered by the limited GPU memory resource. Therefore, the optimization of GPU memory resources is highly demanded. Swapping and recomputation are commonly applied to make better use of GPU memory in deep learning. However, as an emerging domain, several challenges remain:1)The efficiency of recomputation is limited for both static and dynamic methods. 2)Swapping requires offloading parameters manually, which incurs a great time cost. 3) There is no such dynamic and fine-grained method that involves tensor swapping together with tensor recomputation nowadays. To remedy the above issues, we propose a novel scheduler manager named DELTA(Dynamic tEnsor offLoad and recompuTAtion). To the best of our knowledge, we are the first to make a reasonable dynamic runtime scheduler on the combination of tensor swapping and tensor recomputation without user oversight. In DELTA, we propose a filter algorithm to select the optimal tensors to be released out of GPU memory and present a director algorithm to select a proper action for each of these tensors. Furthermore, prefetching and overlapping are deliberately considered to overcome the time cost caused by swapping and recomputing tensors. Experimental results show that DELTA not only saves 40%-70% of GPU memory, surpassing the state-of-the-art method to a great extent but also gets comparable convergence results as the baseline with acceptable time delay. Also, DELTA gains 2.04$ imes$ maximum batchsize when training ResNet-50 and 2.25$ imes$ when training ResNet-101 compared with the baseline. Besides, comparisons between the swapping cost and recomputation cost in our experiments demonstrate the importance of making a reasonable dynamic scheduler on tensor swapping and tensor recomputation, which refutes the arguments in some related work that swapping should be the first and best choice.

연구 동기 및 목표

  • 정적 재계산을 초월해 메모리 사용을 최적화함으로써 대규모 딥 네트워크 학습에서 GPU 메모리 장벽을 해결한다.
  • 수동 튜닝, 정적 체크포인팅 또는 비효율적 스위핑에 의존하는 기존 방법의 한계를 극복한다.
  • 텐서 스위핑과 재계산을 통합한 완전히 동적이고 사용자에게 투명한 런타임 메모리 관리자를 개발한다.
  • 지능적인 프리페치 및 계산-계산 오버랩을 통해 오프로딩으로 인한 학습 시간 오버헤드를 최소화한다.
  • 제한된 GPU 메모리 조건에서 더 큰 모델(예: ResNet-101)을 훨씬 더 큰 배치 크기로 학습할 수 있도록 한다.

제안 방법

  • 세 가지 구성 요소로 이루어진 시스템을 제안한다: 필터(히우리스틱 함수를 사용해 해제할 텐서를 선택함), 디렉터(메모리에서 CPU로 오프로드할지 재계산할지 결정함), 프리페처(통신을 계산과 겹침으로써 숨김).
  • 메모리 절감과 데이터 이동 감소를 균형 잡는 기본 히어리스틱 필터 함수($h^{base}_{filter}$)를 적용하여, 동적 환경에서 LRU 및 게으른 대안보다 뛰어난 성능을 발휘한다.
  • 실시간으로 각 텐서의 해제 비용과 이점 평가를 통해 동적 결정보 프레임워크를 도입하여 수동 모델 분석을 피한다.
  • 통신 지연을 숨기기 위해 프리페치 및 오버랩 기법을 활용하여 오프로딩으로 인한 시간 오버헤드를 감소시킨다.
  • 프레임워크에 종속되지 않는 아키텍처를 설계하여 PyTorch, TensorFlow, MXNet 및 기타 딥 러닝 프레임워크와의 통합을 가능하게 한다.
  • 지속적으로 메모리 압력을 모니터링하고 학습 중 텐서 해제 전략을 동적으로 조정하는 런타임 관리자를 구현한다.

실험 결과

연구 질문

  • RQ1수동 개입 없이 텐서 스위핑과 재계산을 효과적으로 조합하여 GPU 메모리 사용을 줄일 수 있는 동적 자동 시스템은 가능한가?
  • RQ2실제로 스위핑과 재계산 간의 선택이 학습 시간과 메모리 절감에 어떤 영향을 미치는가?
  • RQ3메모리 감소와 런타임 오버헤드 사이의 최적 균형을 이룰 수 있는 텐서 선택 히어리스틱 함수는 무엇인가?
  • RQ4동적 메모리 관리가 ResNet-50 및 ResNet-101과 같은 대규모 모델에서 배치 크기를 얼마나 늘릴 수 있는가?
  • RQ5프리페치 및 오버랩을 결합하면 오프로딩으로 인한 성능 저하를 상당히 줄일 수 있는가?

주요 결과

  • DELTA는 ResNet-50, ResNet-101 및 BERT에서 GPU 메모리 소비를 40%에서 70%까지 줄여, 최신 기술보다 뚜렷이 뛰어난 성능을 발휘한다.
  • DELTA를 적용하면 ResNet-50의 최대 배치 크기가 기준선 대비 2.04배 증가하고, ResNet-101의 경우 2.25배 증가한다.
  • 기본 히어리스틱 필터($h^{base}_{filter}$)는 오프로딩 빈도 감소와 더 나은 오버랩 덕분에, 특히 작은 메모리 예산 조건에서 LRU 및 게으른 필터보다 뛰어난 성능을 발휘한다.
  • 실험 결과 재계산이 스위핑보다 더 효율적인 경우가 많음을 확인하여, 스위핑을 기본 전략으로 삼아야 한다는 주장에 도전한다.
  • DELTA는 수렴 행동이 기준선과 유사하여, 강력한 메모리 최적화에도 불구하고 모델 학습 품질에 거의 영향을 주지 않음을 보여준다.
  • 프리페치 및 오버랩 전략은 시간 지연을 상당히 감소시켜, 실질적으로 수용 가능한 수준의 메모리 관리 오버헤드를 유지한다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.