This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LDLIBS ?= -lrocalution | |
examples = amg \ | |
as-precond \ | |
async \ | |
benchmark \ | |
bicgstab \ | |
block-precond \ | |
cg-amg \ | |
cg-rsamg \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.16) | |
project(example LANGUAGES CXX) | |
find_package(hip REQUIRED) | |
add_executable(example main.cpp) | |
target_link_libraries(example PRIVATE hip::device) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -exuo pipefail | |
apt-get -qq update | |
apt-get -qq upgrade | |
apt-get -qq install build-essential cmake wget | |
DEB_WORKSPACE=$HOME # where to download and build the sources | |
DEB_HIP_ARCHITECTURES='gfx906:xnack-' # https://llvm.org/docs/AMDGPUUsage.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
option(AUTO_CCACHE "Use ccache to speed up rebuilds" ON) | |
find_program(CCACHE_PROGRAM ccache) | |
if(CCACHE_PROGRAM AND ${AUTO_CCACHE}) | |
message(STATUS "Using ${CCACHE_PROGRAM} as compiler launcher") | |
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") | |
# requires at least CMake 3.9 to be any use | |
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") | |
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ++++++++++++++++++++--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder