validateGPU
R2026b설명
예제
현재 선택된 GPU 장치를 검증합니다. 선택된 GPU 장치가 없으면, 함수는 디폴트 장치를 검증합니다. validateGPU 함수는 수행된 검증 단계와 각 단계가 통과했는지 실패했는지 또는 건너뛰었는지 여부를 출력합니다. 검증 단계가 실패하면 함수는 진단 메시지를 출력합니다.
validateGPU
# Beginning GPU validation # Performing system validation # CUDA-supported platform .................................................PASSED # CUDA-enabled graphics driver exists .....................................PASSED # Version: 537.70 # CUDA-enabled graphics driver load .......................................PASSED # CUDA environment variables ..............................................PASSED # CUDA device count .......................................................PASSED # Found 2 devices. # GPU libraries load ......................................................PASSED # # Performing device validation for device index 1 # Device exists ...........................................................PASSED # NVIDIA RTX A5000 # Device supported ........................................................PASSED # Device available ........................................................PASSED # Device is in 'Default' compute mode. # Device selectable .......................................................PASSED # Device memory allocation ................................................PASSED # Device kernel launch ....................................................PASSED # # Finished GPU validation with no failures.
시스템에 있는 모든 GPU 장치를 검증합니다. validateGPU 함수는 일련의 시스템 검증 검사를 한 번 수행한 다음, 감지된 각 장치에 대해 일련의 장치 검증 단계를 한 번씩 수행합니다.
validateGPU("all")# Beginning GPU validation # Performing system validation # CUDA-supported platform .................................................PASSED # CUDA-enabled graphics driver exists .....................................PASSED # Version: 570.133.07 # CUDA-enabled graphics driver load .......................................PASSED # CUDA environment variables ..............................................PASSED # CUDA_VISIBLE_DEVICES: "0,1" # CUDA device count .......................................................PASSED # Found 2 devices. # GPU libraries load ......................................................PASSED # # Performing device validation for device index 1 # Device exists ...........................................................PASSED # NVIDIA RTX A5000 # Device supported ........................................................PASSED # Device available ........................................................PASSED # Device is in 'Default' compute mode. # Device selectable .......................................................PASSED # Device memory allocation ................................................PASSED # Device kernel launch ....................................................PASSED # # Performing device validation for device index 2 # Device exists ...........................................................PASSED # NVIDIA RTX A5000 # Device supported ........................................................PASSED # Device available ........................................................PASSED # Device is in 'Default' compute mode. # Device selectable .......................................................PASSED # Device memory allocation ................................................PASSED # Device kernel launch ....................................................PASSED # # Finished GPU validation with no failures.
인덱스가 2인 GPU 장치를 검증합니다.
validateGPU(2)
# Beginning GPU validation # Performing system validation # CUDA-supported platform .................................................PASSED # CUDA-enabled graphics driver exists .....................................PASSED # Version: 570.133.07 # CUDA-enabled graphics driver load .......................................PASSED # CUDA environment variables ..............................................PASSED # CUDA_VISIBLE_DEVICES: "0,1" # CUDA device count .......................................................PASSED # Found 2 devices. # GPU libraries load ......................................................PASSED # # Performing device validation for device index 2 # Device exists ...........................................................PASSED # NVIDIA RTX A5000 # Device supported ........................................................PASSED # Device available ........................................................PASSED # Device is in 'Default' compute mode. # Device selectable .......................................................PASSED # Device memory allocation ................................................PASSED # Device kernel launch ....................................................PASSED # # Finished GPU validation with no failures.
GPU 장치가 여러 개 있는 경우, 장치 인덱스로 구성된 벡터를 입력값으로 전달하여 validateGPU를 한 번 호출함으로써 여러 장치를 검증할 수 있습니다. 예를 들어, GPU 장치 1과 2를 검증하려면 validateGPU([1 2])를 호출하십시오.
입력 인수
검증할 GPU 장치의 인덱스로, 1에서 gpuDeviceCount 사이의 정수 또는 정수로 구성된 벡터로 지정됩니다.
예: 2
예: [1 3]
데이터형: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
팁
원격 GPU를 검증하려면 클러스터를 사용하여 병렬 풀을 시작한 후,
spmd블록 내에서validateGPU함수를 호출하십시오. 워커에 GPU가 두 개 이상 있는 경우"all"옵션을 사용하십시오.원격 GPU 사용에 대한 자세한 내용은 Work with Remote GPUs 항목을 참조하십시오.cluster = parcluster("myRemoteGPUCluster"); pool = parpool(cluster); spmd validateGPU("all") end
알고리즘
validateGPU 함수는 다음과 같은 시스템 수준의 검증 단계를 수행합니다.
| 검증 단계 | 설명 |
|---|---|
CUDA-supported platform | CUDA®가 운영 체제에서 지원됩니다. |
CUDA-enabled graphics driver exists | 지원되는 CUDA 드라이버가 발견되었습니다. |
CUDA-enabled graphics driver load | MATLAB®이 CUDA 드라이버를 불러올 수 있습니다. |
CUDA environment variables |
|
CUDA device count | 적어도 하나의 장치가 있습니다. |
GPU libraries load | MATLAB이 Parallel Computing Toolbox™ GPU 라이브러리를 불러올 수 있습니다. |
validateGPU 함수는 다음과 같은 장치 수준의 검증 단계를 수행합니다. 두 개 이상의 장치를 검증하는 경우 각 장치에 대해 이러한 단계가 반복됩니다.
| 검증 단계 | 설명 |
|---|---|
Device exists | MATLAB이 장치를 감지할 수 있습니다. |
Device supported | 장치의 Compute Capability가 MATLAB에서 지원됩니다. |
Device available | 장치가 사용 가능한 상태입니다. |
Device selectable | MATLAB이 장치를 선택할 수 있습니다. |
Device memory allocation | MATLAB이 |
Device kernel launch | MATLAB이 GPU 커널을 시작할 수 있습니다. |
버전 내역
R2024b에 개발됨
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)