Skip to content

Instantly share code, notes, and snippets.

View tiran's full-sized avatar

Christian Heimes tiran

View GitHub Profile
@sroecker
sroecker / debug_pytorch_rocm.py
Last active May 15, 2024 19:51
If this is not crashing then PyTorch is most likely running with your AMD graphics card and ROCm, if not see magic variables
import torch
print("pytorch version: " + torch.__version__)
print("CUDA available: " + str(torch.cuda.is_available()))
print("device count: " + str(torch.cuda.device_count()))
print("current device: " + str(torch.cuda.current_device()))
print("device name: " + torch.cuda.get_device_name(torch.cuda.current_device()))
print("backend:")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(device)
@dupuy
dupuy / README.rst
Last active June 25, 2024 15:05
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.