728x90

출처

리눅스 확인

bluesanta@bluesanta-AI-Series:~/Application/Llama$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.3 LTS
Release:        24.04
Codename:       noble
bluesanta@bluesanta-AI-Series:~/Application/Llama$ dkms status
amdgpu/6.16.6-2255209.24.04, 6.14.0-37-generic, x86_64: installed
xrt-amdxdna/2.21.0, 6.14.0-37-generic, x86_64: installed

가상환경 생성

bluesanta@bluesanta-AI-Series:~/Application/Llama$ python3 -m venv .venv
bluesanta@bluesanta-AI-Series:~/Application/Llama$ source .venv/bin/activate

PyTorch 설치 (HX 390/gfx1150 아키텍처용)

(.venv) bluesanta@bluesanta-AI-Series:~/Application/Llama$ pip install torch torchvision torchaudio --index-url https://repo.amd.com/rocm/whl/gfx1150/

설치 확인

gpu_check.py

import sys
import torch

# 시스템 및 PyTorch 정보 출력
print(f"Python Version: {sys.version.split()[0]}")
print(f"PyTorch Version: {torch.__version__}")
print(f"GPU 인식 성공: {torch.cuda.is_available()}")

if torch.cuda.is_available():
    print(f"사용 가능 기기: {torch.cuda.get_device_name(0)}")
else:
    print("현재 GPU를 사용할 수 없습니다. 드라이버나 ROCm 설정을 확인하세요.")
 
 
# 실제 텐서 연산 테스트
if torch.cuda.is_available():
    x = torch.randn(1, 3).to("cuda")
    print("GPU 텐서 연산 테스트 완료:", x)

실행

(.venv) bluesanta@bluesanta-AI-Series:~/Application/Llama$ python gpu_check.py
Python Version: 3.12.3
PyTorch Version: 2.9.1+rocm7.10.0
GPU 인식 성공: True
사용 가능 기기: AMD Radeon 890M Graphics
/home/bluesanta/Application/Llama/gpu_check.py:17: UserWarning: expandable_segments not supported on this platform (Triggered internally at /__w/rockrel/rockrel/external-builds/pytorch/pytorch/c10/hip/HIPAllocatorConfig.h:36.)
  x = torch.randn(1, 3).to("cuda")
GPU 텐서 연산 테스트 완료: tensor([[-0.5998, -1.3418, -0.5339]], device='cuda:0')
[W121 10:44:08.608317046 AllocatorConfig.cpp:28] Warning: PYTORCH_CUDA_ALLOC_CONF is deprecated, use PYTORCH_ALLOC_CONF instead (function operator())

PYTORCH_ALLOC_CONF 환경 변수 추가

~/.bashrc 수정

(.venv) bluesanta@bluesanta-AI-Series:~/Application/Llama$ vi ~/.bashrc

내용

export PYTORCH_ALLOC_CONF="expandable_segments:True"

실행

(.venv) bluesanta@bluesanta-AI-Series:~/Application/Llama$ python gpu_check.py 
Python Version: 3.12.3
PyTorch Version: 2.9.1+rocm7.10.0
GPU 인식 성공: True
사용 가능 기기: AMD Radeon 890M Graphics
GPU 텐서 연산 테스트 완료: tensor([[-1.0138, -0.4262,  1.2874]], device='cuda:0')
728x90
728x90

출처

리눅스 버전 확인

bluesanta@bluesanta-AI-Series:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.3 LTS
Release:        24.04
Codename:       noble
bluesanta@bluesanta-AI-Series:~$ lsmod | grep amdgpu
amdgpu              19836928  5
amddrm_ttm_helper      12288  1 amdgpu
amdttm                131072  2 amdgpu,amddrm_ttm_helper
amddrm_buddy           24576  1 amdgpu
amdxcp                 16384  1 amdgpu
amddrm_exec            12288  1 amdgpu
drm_suballoc_helper    20480  1 amdgpu
amd_sched              61440  1 amdgpu
amdkcl                 36864  4 amd_sched,amdttm,amddrm_exec,amdgpu
drm_panel_backlight_quirks    12288  1 amdgpu
drm_display_helper    278528  1 amdgpu
cec                    94208  2 drm_display_helper,amdgpu
i2c_algo_bit           16384  1 amdgpu
drm_ttm_helper         16384  1 amdgpu
video                  77824  1 amdgpu
bluesanta@bluesanta-AI-Series:~$ dkms status
amdgpu/6.16.6-2255209.24.04, 6.14.0-37-generic, x86_64: installed

ComfyUI 설치

가상환경실행

bluesanta@bluesanta-AI-Series:~$ cd Application/stable_diffusion/
bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ source .venv/bin/activate
(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ 

ComfyUI 다운로드

(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ git clone https://github.com/comfyanonymous/ComfyUI.git

ComfyUI 참조 패키지 설치

(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ cd ComfyUI/
(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion/ComfyUI$ pip install -r requirements.txt

ComfyUI 실행

(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion/ComfyUI$ python main.py
Checkpoint files will always be loaded safely.
Total VRAM 14844 MB, total RAM 29688 MB
pytorch version: 2.9.1+rocm7.10.0
Set: torch.backends.cudnn.enabled = False for better AMD performance.
AMD arch: gfx1150
ROCm version: (7, 2)
Set vram state to: NORMAL_VRAM
Device: cuda:0 AMD Radeon 890M Graphics : native
Using async weight offloading with 2 streams
Enabled pinned memory 28203.0
Using sub quadratic optimization for attention, if you have memory or speed issues try using: --use-split-cross-attention
Python version: 3.12.3 (main, Nov  6 2025, 13:44:16) [GCC 13.3.0]
ComfyUI version: 0.7.0
****** User settings have been changed to be stored on the server instead of browser storage. ******
****** For multi-user setups add the --multi-user CLI argument to enable multiple user profiles. ******
ComfyUI frontend version: 1.35.9
[Prompt Server] web root: /home/bluesanta/Application/stable_diffusion/.venv/lib/python3.12/site-packages/comfyui_frontend_package/static
Total VRAM 14844 MB, total RAM 29688 MB
pytorch version: 2.9.1+rocm7.10.0
Set: torch.backends.cudnn.enabled = False for better AMD performance.
AMD arch: gfx1150
ROCm version: (7, 2)
Set vram state to: NORMAL_VRAM
Device: cuda:0 AMD Radeon 890M Graphics : native
Using async weight offloading with 2 streams
Enabled pinned memory 28203.0
 
Import times for custom nodes:
   0.0 seconds: /home/bluesanta/Application/stable_diffusion/ComfyUI/custom_nodes/websocket_image_save.py
 
Context impl SQLiteImpl.
Will assume non-transactional DDL.
No target revision found.
Starting server
 
To see the GUI go to: http://127.0.0.1:8188

ComfyUI Manager 설치

(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion/ComfyUI$ cd custom_nodes/
(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion/ComfyUI/custom_nodes$ git clone https://github.com/Comfy-Org/ComfyUI-Manager.git
(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion/ComfyUI/custom_nodes$ pip install -r ComfyUI-Manager/requirements.txt
728x90
728x90

출처

리눅스 버전 확인

bluesanta@bluesanta-AI-Series:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.3 LTS
Release:        24.04
Codename:       noble

AMD GPU 드라이버 설치

AMD GPU 설치 프로그램 설치

bluesanta@bluesanta-AI-Series:~$ wget https://repo.radeon.com/amdgpu-install/30.20.1/ubuntu/noble/amdgpu-install_7.1.1.70101-1_all.deb
bluesanta@bluesanta-AI-Series:~$ sudo dpkg -i amdgpu-install_7.1.1.70101-1_all.deb 
[sudo] password for bluesanta: 
Selecting previously unselected package amdgpu-install.
(Reading database ... 215673 files and directories currently installed.)
Preparing to unpack amdgpu-install_7.1.1.70101-1_all.deb ...
Unpacking amdgpu-install (30.20.1.0.30200100-2255209.24.04) ...
Setting up amdgpu-install (30.20.1.0.30200100-2255209.24.04) ...

ROCm 패키지 설치

bluesanta@bluesanta-AI-Series:~$ sudo amdgpu-install --usecase=rocm,hiplibsdk --no-dkms

설치 확인

(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ lsmod | grep amdgpu
amdgpu              19836928  6
amddrm_ttm_helper      12288  1 amdgpu
amdttm                131072  2 amdgpu,amddrm_ttm_helper
amddrm_buddy           24576  1 amdgpu
amdxcp                 16384  1 amdgpu
amddrm_exec            12288  1 amdgpu
drm_suballoc_helper    20480  1 amdgpu
amd_sched              61440  1 amdgpu
amdkcl                 36864  4 amd_sched,amdttm,amddrm_exec,amdgpu
drm_panel_backlight_quirks    12288  1 amdgpu
drm_display_helper    278528  1 amdgpu
cec                    94208  2 drm_display_helper,amdgpu
i2c_algo_bit           16384  1 amdgpu
drm_ttm_helper         16384  1 amdgpu
video                  77824  1 amdgpu
(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ dkms status
amdgpu/6.16.6-2255209.24.04, 6.14.0-37-generic, x86_64: installed

아키텍처 강제 인식

HX 370(gfx1150)은 최신 아키텍처이므로, PyTorch가 이를 인식하도록 환경 변수를 선언해야 합니다. 터미널에서 다음을 입력하거나 .bashrc에 추가

bluesanta@bluesanta-AI-Series:~$ vi ~/.bashrc

.bashrc 파일에 HSA_OVERRIDE_GFX_VERSION 값 설정

export HSA_OVERRIDE_GFX_VERSION=11.5.0

PyTorch 설치

가상환경만들기

bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ sudo apt install python3-venv
bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ python3 -m venv .venv
bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ source .venv/bin/activate
(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ 

ROCm 지원 PyTorch 빌드 및 설치

(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1150/ torch torchvision torchaudio

적용 확인

(.venv) bluesanta@bluesanta-AI-Series:~/Application/stable_diffusion$ python -c "import torch; print(torch.cuda.is_available())"
True
728x90

+ Recent posts