Skip to content

Instantly share code, notes, and snippets.

View hemangjoshi37a's full-sized avatar
🏠
Working from home

Hemang Joshi hemangjoshi37a

🏠
Working from home
View GitHub Profile
@warmonkey
warmonkey / rocm_pytorch_on_amd_integrated_gpu.md
Last active July 13, 2024 10:55
Use ROCm and PyTorch on AMD integrated graphics (iGPU, Ryzen 7 5825u)

NOT WORKING - WRONG CALCULATION RESULT

GPU can be detected, but cannot perform training or inference. Calculation result is wrong.

  1. Install PyTorch with ROCm support
    Following offical installation guide: https://pytorch.org/get-started/locally/#linux-installation
    Choose [Stable] -> [Linux] -> [Pip] -> [Python] -> [ROCm], It should be something like:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2
# Code from https://python.plainenglish.io/telegram-channel-listener-with-python-8176ebe3c89b
import configparser
import json
import re
from telethon.errors import SessionPasswordNeededError
from telethon import TelegramClient, events, sync
from telethon.tl.functions.messages import (GetHistoryRequest)
from telethon.tl.types import (
PeerChannel