AMD ROCm
rocm.docs.amd.com › projects › rocm_smi_lib › en › latest › how-to › use-python.html
Using ROCm SMI with Python — ROCm SMI LIB 7.8.0 Documentation
$ sudo /opt/rocm/bin/rocm-smi --setextremum max sclk 2100 ============================ ROCm System Management Interface ============================ ******WARNING****** Operating your AMD GPU outside of official AMD specifications or outside of factory settings, including but not limited to ...
PyTorch
pytorch.org › blog › pytorch-for-amd-rocm-platform-now-available-as-python-package
PyTorch for AMD ROCm™ Platform now available as Python package – PyTorch
March 24, 2021 - PyTorch users can install PyTorch for ROCm using AMD’s public PyTorch docker image, and can of course build PyTorch for ROCm from source. With PyTorch 1.8, these existing installation options are now complemented by the availability of an installable Python package.
AMD RocM works great with pytorch
Amd roc is great More on reddit.com
Is ROCm viable for ml development with PyTorch
Pytorch uses the same name “cuda” for rocm and cuda for device. So your pytorch code on nvidia cuda should just work on rocm device without any changes. More on reddit.com
AMD ROCm on Linux for PyTorch / ML?
Yes. You will get much better performance on an RX 7800. Pytorch works with ROCm 6.1.1 on Linux and requires no special code or work. Pytorch allows you to use device=cuda and do anything you would otherwise do with CUDA on a NVIDIA card. I haven't used Fedora 40 personally but Ubuntu 22.04 works perfectly for me. More on reddit.com
Complete Guide How to run Pytorch with AMD Radeon GPU (gfx803)
You are the hero More on reddit.com
Videos
15:54
How To Install AMD ROCm, PyTorch, Stable Diffusion & YOLO - 2024 ...
12:03
PyTorch/TensorFlow on AMD: Beginner's Guide to ROCm on Linux - YouTube
08:56
Run ROCm + PyTorch on Windows 11 for LOCAL AI, stable diffusion, ...
15:32
AMD ROCm Pytorch Getting Started Guide - YouTube
How To Install AMD ROCm, PyTorch, Stable Diffusion & YOLO ...
Machine learning on an AMD 6900xt using ROCM and a ...
AMD ROCm
rocm.docs.amd.com › projects › hip-python › en › latest
HIP Python - ROCm Documentation - AMD
June 23, 2023 - Learn how to identify the correct HIP Python packages to install for your ROCm™ installation, where to retrieve the packages and what options you have to install them. ... Learn how to use HIP Python’s interfaces in your Python or Cython program. We present a large number of examples that cover HIP and HIPRTC as well as multiple math libraries (HIPBLAS, HIPRAND, HIPFFT) and the communication library RCCL.
AMD ROCm
rocm.docs.amd.com › projects › hip-python › en › docs-5.6.1 › user_guide › 2_cuda_python_interop.html
CUDA® Python Interoperability - ROCm Documentation - AMD
The example can be compiled for AMD GPUs via the following setup.py script, which specifies compile_time_env=dict(HIP_PYTHON=True) as keyword parameter of the cythonize call in line ... 1import os 2 3from setuptools import Extension, setup 4from Cython.Build import cythonize 5 6ROCM_PATH=os.environ.get("ROCM_PATH", "/opt/rocm") 7HIP_PLATFORM = os.environ.get("HIP_PLATFORM", "amd") 8 9if HIP_PLATFORM not in ("amd", "hcc"): 10 raise RuntimeError("Currently only HIP_PLATFORM=amd is supported") 11 12def create_extension(name, sources): 13 global ROCM_PATH 14 global HIP_PLATFORM 15 rocm_inc = os.pa
AMD ROCm
rocm.docs.amd.com › projects › hip-python › en › latest › user_guide › 1_usage.html
Basic Usage and Examples — HIP Python
Listing 14 Compiling a Cython module that uses HIP Python’s Cython API.# 1import os, sys 2 3mymodule = "mymodule" 4 5from setuptools import Extension, setup 6from Cython.Build import cythonize 7 8ROCM_PATH=os.environ.get("ROCM_PATH", "/opt/rocm") 9HIP_PLATFORM = os.environ.get("HIP_PLATFORM", "amd") 10 11if HIP_PLATFORM not in ("amd", "hcc"): 12 raise RuntimeError("Currently only HIP_PLATFORM=amd is supported") 13 14def create_extension(name, sources): 15 global ROCM_PATH 16 global HIP_PLATFORM 17 rocm_inc = os.path.join(ROCM_PATH,"include") 18 rocm_lib_dir = os.path.join(ROCM_PATH,"lib") 19
GitHub
github.com › ROCm › pyrsmi
GitHub - ROCm/pyrsmi: python package of rocm-smi-lib · GitHub
from pyrsmi import rocml # Initialize the library rocml.smi_initialize() # Get device count num_gpus = rocml.smi_get_device_count() print(f"Found {num_gpus} GPU(s)") # Get device information for i in range(num_gpus): name = rocml.smi_get_device_name(i) memory = rocml.smi_get_device_memory_total(i) / (1024**3) # Convert to GB util = rocml.smi_get_device_utilization(i) power = rocml.smi_get_device_average_power(i) print(f"GPU {i}: {name}") print(f" Memory: {memory:.1f} GB") print(f" Utilization: {util}%") print(f" Power: {power:.1f} W") # Shutdown the library rocml.smi_shutdown() Always call smi_initialize() before using any other functions · Always call smi_shutdown() when finished to release resources ... Examples directory contains a number of code snippets showing how to use the package.
Starred by 25 users
Forked by 10 users
Languages Python
AMD ROCm
rocm.docs.amd.com › projects › rocm_smi_lib › en › docs-6.2.0 › how-to › use-python.html
Using Python in ROCm SMI — ROCm SMI LIB 7.3.0 Documentation
--setextremum <min/max> <sclk or ... our Python CLI tool (rocm-smi --setextremum max sclk 1500). See example below. $ sudo /opt/rocm/bin/rocm-smi --setextremum max sclk 2100 ============================ ROCm System Management Interface ============================ ******WARNING****** Operating ...
Kit
nhr.kit.edu › userdocs › ftp › amd-rocm
AMD ROCm - NHR@KIT User Documentation
$ python3.9 -m venv venv # end of life 2025-10-05 $ source venv/bin/activate $ pip install --upgrade pip $ pip install tensorflow-rocm · Please be aware that this package is large (about 3 GB) and installation can take quite long. After installation has been completed, you can run Tensorflow as usual on one of the nodes. Note that four AMD MI 100 devices are being detected:
AMD ROCm
rocm.docs.amd.com › projects › rocm_smi_lib › en › latest › reference › python_api.html
Python API reference — ROCm SMI LIB 7.8.0 Documentation
rocm_smi.progressbar(it, prefix='', size=60, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)#
AMD ROCm
rocm.docs.amd.com › projects › amdsmi › en › latest › reference › amdsmi-py-api.html
AMD SMI Python API reference — AMD SMI 26.2.2 documentation
Refer to amd_smi_cper_example.py for a complete example.
AMD
amd.com › https://www.amd.com/en.html › products › rocm
AMD ROCm™ Software
1 month ago - AMD partners with Hugging Face, enabling thousands of models. ROCm includes day-zero support on PyTorch 2.0. ROCm enables PyTorch AI at scale, with a 1 trillion parameter model successfully getting trained on the Frontier system.
AMD ROCm
rocm.docs.amd.com › projects › amdsmi › en › docs-5.7.1 › py-interface_readme_link.html
AMD SMI Python Library — AMD SMI 23.2.0.1 Documentation
AmdSmiLibraryException: derives base AmdSmiException class and represents errors that can occur in amdsmi-lib. When this exception is thrown, err_code and err_info are set. err_code is an integer that corresponds to errors that can occur in amdsmi-lib and err_info is a string that explains the error that occurred. Example:
AMD ROCm
rocm.docs.amd.com › projects › radeon-ryzen › en › latest › docs › install › installrad › windows › install-pytorch.html
Install PyTorch via PIP - ROCm Documentation - AMD
python -c "import torch; print(f'device name [0]:', torch.cuda.get_device_name(0))" Example result: device name [0]: Radeon RX 7900 XTX ... Enter command to display component information within the current PyTorch environment. ... PyTorch version: 2.9.1+rocm7.2.1 Is debug build: False CUDA ...
Hugging Face
huggingface.co › amd
amd (AMD)
AMD ROCm is upstreamed into the TensorFlow github repository. Pre-built wheels are hosted on pipy.org · The latest version can be installed with this command: ... Now that you have the base requirements installed, get the latest transformer models. ... This allows you to easily import any of the base models into your python application. Here is an example using GPT2 in PyTorch:
AMD ROCm
rocm.docs.amd.com › projects › hip-python › en › latest › user_guide › 0_install.html
Installation — HIP Python - ROCm Documentation - AMD
If you have the ROCm™ HIP SDK 5.6.0 installed, any HIP Python package with version 5.6.0.X.Y can be used.
AMD ROCm
rocm.docs.amd.com › _ › downloads › composable_kernel › en › docs-5.6.1 › pdf pdf
Python - ROCm Documentation
Start building for HPC and AI with the performance-first AMD ROCm software stack. Explore how-to guides and reference docs.
Phazertech
phazertech.com › tutorials › rocm.html
AMD ROCm, PyTorch, Stable Diffusion & YOLO Installation ...
March 13, 2024 - GPUs from other generations will likely need to follow different steps, see this Reddit thread for more info on older cards: Reddit: HOW-TO: Stable Diffusion on an AMD GPU. This guide also shows how to install PyTorch which is a framework for machine learning tools in Python, and then I'll show how to install and run Stable Diffusion and YOLO object detection.