πͺ Windows νμ΄ν μΉ μ€μΉ κ°μ΄λ (NVIDIA CUDA & CPU)
Windows νκ²½μμλ NVIDIA μΈμ₯ κ·Έλν½ μΉ΄λ(GeForce RTX μλ¦¬μ¦ λ±)μ μ 무μ λ°λΌ μ€μΉ λͺ λ Ήμ΄κ° λλ©λλ€.
π 1λ¨κ³: NVIDIA κ·Έλν½ μΉ΄λ λ° λλΌμ΄λ² νμΈ
- λͺ λ Ή ν둬ννΈ(CMD) λλ PowerShellμ μ½λλ€.
- μλ λͺ
λ Ήμ΄λ‘ NVIDIA λλΌμ΄λ²κ° μΈμλλμ§ νμΈν©λλ€:
nvidia-smi - ν μ°μΈ‘ μλ¨μ νμλλ
CUDA Version: 12.xμ«μλ₯Ό νμΈν©λλ€. μ΄λ νμ¬ λλΌμ΄λ²κ° μ§μν μ μλ μ΅λ CUDA λ²μ μ μλ―Έν©λλ€.
π¦ 2λ¨κ³: PyTorch μ€μΉ λͺ λ Ήμ΄ μ€ν
μ΅μ A: NVIDIA GPU (CUDA 12.1 κΆμ₯)
μ΅μ RTX 30xx, 40xx κ·Έλν½ μΉ΄λλ₯Ό μ¬μ© μ€μ΄λΌλ©΄ μλ λͺ λ Ήμ΄λ₯Ό μ€νν©λλ€:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
μ΅μ B: NVIDIA GPU (CUDA 11.8 ꡬν κ·Έλν½ μΉ΄λ)
GTX 10xx, 16xx λ± κ΅¬ν κ·Έλν½ μΉ΄λλΌλ©΄ CUDA 11.8 λ²μ μ κΆμ₯ν©λλ€:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
μ΅μ C: μΈμ₯ κ·Έλν½ μΉ΄λκ° μλ κ²½μ° (CPU Only)
λ΄μ₯ κ·Έλν½λ§ νμ¬λ λ ΈνΈλΆμ΄λ μ¬λ¬΄μ© PCλΌλ©΄ CPU μ μ© λ²μ μ μ€μΉν©λλ€:
pip install torch torchvision torchaudio
π¨ Windows μ€μΉ μ μμ£Ό λ°μνλ λ¬Έμ ν΄κ²°
1) Microsoft Visual C++ Redistributable λλ½
νμ΄ν μΉ μν¬νΈ μ DLL load failed while importing _C μ€λ₯κ° λ°μνλ©΄, Microsoft 곡μ μΉμ¬μ΄νΈμμ Visual C++ 2015-2022 μ¬λ°°ν¬ κ°λ₯ ν¨ν€μ§(x64)λ₯Ό λ€μ΄λ‘λνμ¬ μ€μΉν΄μΌ ν©λλ€.
2) CUDA κ°μ νμΈ
PowerShellμμ μλ μ½λλ‘ GPU μΈμμ κ²μ¦ν©λλ€:
python -c "import torch; print('CUDA μ¬μ© κ°λ₯:', torch.cuda.is_available(), 'μ₯μΉλͺ
:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'μμ')"
μλΈλͺ©μ°¨