이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
MATLAB에서의 GPU 연산
기본 GPU 연산을 사용하여 코드 실행 속도 향상
코드 실행 속도를 높이려면 먼저 코드를 프로파일링하고 벡터화해 보십시오. 자세한 내용은 성능과 메모리 항목을 참조하십시오. 프로파일링과 벡터화 후에 컴퓨터의 GPU를 사용하여 계산 속도를 높일 수도 있습니다. 사용하려는 모든 함수가 GPU에서 지원되는 경우, 간단히 gpuArray
를 사용하여 입력 데이터를 GPU로 전송하고 gather
를 호출하여 GPU에서 출력 데이터를 가져올 수 있습니다. GPU 연산을 시작하려면 GPU에서 MATLAB 함수 실행하기 항목을 참조하십시오.
딥러닝을 위해 MATLAB®은 다중 GPU에 대한 자동 병렬 연산을 지원합니다. 복수의 GPU에서 MATLAB을 사용한 딥러닝 (Deep Learning Toolbox) 항목을 참조하십시오.
함수
도움말 항목
GPU에서 MATLAB 코드 실행
- GPU에서 MATLAB 함수 실행하기
GPU에서 함수를 자동으로 실행할 수 있도록gpuArray
인수를 제공합니다. - GPU 장치를 식별하고 선택하기
이 예제에서는gpuDevice
를 사용하여 사용할 장치를 식별 및 선택하는 방법을 보여줍니다. - GPU 연산 요구 사항
NVIDIA® GPU 아키텍처 지원. - GPU에서 배열 설정하기
gpuArray
객체를 사용하여 GPU에 데이터를 저장하고 GPU에서 계산을 수행합니다. - Run MATLAB Functions on Multiple GPUs
This example shows how to run MATLAB® code on multiple GPUs in parallel, first on your local machine, then scaling up to a cluster. - Run MATLAB using GPUs in the Cloud
Take advantage of powerful GPUs in the cloud to accelerate your code. - Train Network Using Automatic Multi-GPU Support (Deep Learning Toolbox)
This example shows how to use multiple GPUs on your local machine for deep learning training using automatic parallel support. - GPU에서 희소 형식 배열 사용하기
GPU에서 희소 배열을 사용하는 조건에 대해 배웁니다. - GPU에서 복소수 사용하기
GPU에서 복소수 값을 반환할 수도 있는 함수를 적용할 때의 조건에 대해 알아봅니다.
GPU에서 성능 개선
- GPU 성능 측정 및 개선하기
GPU에서 실행 중인 코드의 시간을 측정하고 성능 개선을 위한 옵션을 살펴봅니다. - Improve Performance Using a GPU and Vectorized Calculations
This example shows you how to improve performance by running a function on the GPU instead of the CPU, and by vectorizing the calculations. - Improve Performance of Element-Wise MATLAB Functions on the GPU Using arrayfun
This example shows how to improve the performance of your code by running MATLAB® functions on the GPU usingarrayfun
. - Improve Performance of Small Matrix Problems on the GPU Using pagefun
This example shows how to usepagefun
to improve the performance of independent operations applied to multiple matrices arranged in a multidimensional array. - Benchmarking A\b on the GPU
This example looks at how we can benchmark the solving of a linear system on the GPU.
자세히 알아보기
- 코드를 프로파일링하여 성능 개선하기
프로파일러를 사용하여 코드 실행에 걸리는 시간을 측정하고 코드에서 시간이 가장 오래 걸리는 라인이나 실행되지 않는 라인을 식별합니다. - 벡터화
MATLAB 행렬과 벡터 연산을 사용하도록 루프 기반의, 스칼라 지향 코드를 수정합니다. - Random Number Streams on a GPU
Control the random number streams on a GPU to generate the same sequences of random numbers as on the CPU. - Generating Random Numbers on a GPU
This example shows how to switch between the different random number generators that are supported on the GPU. - Stencil Operations on a GPU
This example uses Conway's "Game of Life" to demonstrate how stencil operations can be performed using a GPU. - GPU 지원 함수를 사용하여 Mandelbrot 집합 계산하기
이 예제에서는 GPU 지원 MATLAB® 함수를 사용하여 잘 알려진 수학 구조인 Mandelbrot 집합을 계산하는 방법을 보여줍니다.