Skip to content

Instantly share code, notes, and snippets.

View cgmb's full-sized avatar

Cory Bloor cgmb

  • Advanced Micro Devices, Inc.
  • Canada
View GitHub Profile
@cgmb
cgmb / pbuilder-failure.txt
Created April 2, 2024 22:25
pbuilder failure
$ pbuilder-dist noble amd64 create
W: /home/cgmb/.pbuilderrc does not exist
I: Logging to /home/cgmb/pbuilder/noble_result/last_operation.log
I: Distribution is noble.
I: Current time: Tue Apr 2 16:24:12 MDT 2024
I: pbuilder-time-stamp: 1712096652
I: Building the build environment
I: running debootstrap
/usr/sbin/debootstrap
I: Target architecture can be executed
@cgmb
cgmb / check-apt.sh
Created April 1, 2024 18:24
Ubuntu Noble package list check
#!/bin/bash
set -euo pipefail
wget -qO- http://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/by-hash/SHA256/8341b8ac157e16be21c3dd6439abf8aa27c3815879f2a9d5164881f7ba0dd0e2 | xz -d > noble-packages.txt
grep '^Package: apt$' noble-packages.txt
@cgmb
cgmb / build-llama-cpp-fedora.sh
Last active April 20, 2024 23:12
How to build llama.cpp on fedora
#!/bin/sh
# Build llama.cpp on Fedora 40 and later
# Tested with `docker run -it --device=/dev/dri --device=/dev/kfd --security-opt seccomp=unconfined --volume $HOME:/mnt/home fedora:40`
dnf -y update
dnf -y install hipcc rocm-hip-devel rocblas-devel hipblas-devel git cmake g++ lld clang-tools-extra llvm
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp/
git checkout b2110
CC=clang CXX=clang++ cmake -H. -Bbuild -DLLAMA_HIPBLAS=ON -DAMDGPU_TARGETS="gfx1030;gfx1100;gfx1101;gfx1102" -DCMAKE_BUILD_TYPE=Release
@cgmb
cgmb / Makefile
Created February 14, 2024 17:41
rocALUTION examples makefile
LDLIBS ?= -lrocalution
examples = amg \
as-precond \
async \
benchmark \
bicgstab \
block-precond \
cg-amg \
cg-rsamg \
@cgmb
cgmb / build-llama-cpp.sh
Last active April 17, 2024 23:27
How to build llama.cpp on Debian
#!/bin/sh
# Build llama.cpp on Debian 13 or Ubuntu 23.10 and later
# Tested with `docker run -it --device=/dev/dri --device=/dev/kfd --security-opt seccomp=unconfined --volume $HOME:/mnt/home debian:sid`
apt -y update
apt -y upgrade
apt -y install git hipcc libhipblas-dev librocblas-dev cmake build-essential
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp/
git checkout b2110
@cgmb
cgmb / b566e2bdb3a6d088d6155393afe31c4b5b617dc8.patch
Created July 23, 2023 06:42
HIP Graph Host-to-Host Copy Bug
From b566e2bdb3a6d088d6155393afe31c4b5b617dc8 Mon Sep 17 00:00:00 2001
From: Jaydeep Patel <jaydeepkumar.patel@amd.com>
Date: Mon, 2 Jan 2023 13:08:13 +0000
Subject: [PATCH] SWDEV-375366 - SWDEV-375351 - Handle HtoH case for graph mem
cpy impl.
Change-Id: I5a8c3c3c22db045f714b0443b8d70a8c6b4a8cea
---
src/hip_graph_helper.hpp | 4 +++
src/hip_graph_internal.hpp | 30 ++++++++++++++++++++---
@cgmb
cgmb / rocm-device-libs-5.6.0-log.txt
Created July 17, 2023 09:14
clang-16 crash in rocm-device-libs tests
root@d70ac93ec2b6:~/rocm-device-libs/rocm-device-libs# gbp buildpackage --git-ignore-new
gbp:info: Performing the build
dpkg-buildpackage -us -uc -ui -i -I
dpkg-buildpackage: info: source package rocm-device-libs
dpkg-buildpackage: info: source version 5.6.0-1~exp1
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Cordell Bloor <cgmb@slerp.xyz>
dpkg-source -i -I --before-build .
dpkg-buildpackage: info: host architecture amd64
debian/rules clean
@cgmb
cgmb / README.md
Last active July 5, 2023 21:35
Debian Unstable Test Logs - 2023-07-03

These are test logs from running ROCm package tests on Debian Unstable.

@cgmb
cgmb / rocm-docs-amd-com-20230701003739.csv
Last active July 1, 2023 05:32
ROCm Documentation Broken links
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
Error,URL,Anchor text,Linked from,Line
"The server name or address could not be resolved ","http://install.sh/","install.sh","https://rocm.docs.amd.com/en/latest/release.html","1046"
"404 Not Found","https://github.com/ROCm-Developer-Tools/hip-tests/tree/develop/samples/1_Utils/shipBusBandwidth","ROCm-Developer-Tools/hip-tests","https://rocm.docs.amd.com/en/latest/CHANGELOG.html","2359"
"404 Not Found","https://github.com/ROCm-Developer-Tools/hip-tests/tree/develop/samples/1_Utils/hipCommander","ROCm-Developer-Tools/hip-tests","https://rocm.docs.amd.com/en/latest/CHANGELOG.html","2360"
"The server name or address could not be resolved ","http://rmake.py/","rmake.py","https://rocm.docs.amd.com/en/latest/CHANGELOG.html","2917"
"The server name or address could not be resolved ","http://commandrunner.py/","commandrunner.py","https://rocm.docs.amd.com/en/latest/CHANGELOG.html","4101"
"The server name or address could not be resolved ","http://helloword.cl/","HelloWord.cl","https://rocm.docs.amd.com/en/latest/CHAN
@cgmb
cgmb / install-rocblas.sh
Last active May 21, 2023 06:17
Install rocBLAS from Debian experimental
#!/bin/bash
# Install rocblas from the Debian experimental repo. To run Debian in a docker container, use:
# docker run -it --device=/dev/dri --device=/dev/kfd --security-opt seccomp=unconfined debian:sid
apt-get -y update
apt-get -y install ca-certificates
cat << 'EOF' > /etc/apt/sources.list.d/experimental.list
deb https://deb.debian.org/debian experimental main
EOF
apt-get -y update