summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGianluca Boiano2024-03-25 14:43:04 +0100
committerGianluca Boiano2024-03-25 14:43:04 +0100
commit39544c23c36a1a1d1e9381925218288997df479b (patch)
tree9dc378075e579e084e126b68988215f6d2e39989
parent42fbc5b9d4d40eb31e5a213bb5e60c3b7061233e (diff)
downloadaur-39544c23c36a1a1d1e9381925218288997df479b.tar.gz
stable-diffusion.cpp-git: update
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD26
2 files changed, 19 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4c6e8b15290a..99df7d9e7c2d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -11,26 +11,15 @@ pkgbase = stable-diffusion.cpp-git
makedepends = cmake
makedepends = cuda
makedepends = git
- makedepends = hipblas
+ makedepends = rocm-hip-sdk
makedepends = openblas
provides = stable-diffusion.cpp
conflicts = stable-diffusion.cpp
source = stable-diffusion.cpp::git+https://github.com/leejet/stable-diffusion.cpp
sha256sums = SKIP
-pkgname = stable-diffusion.cpp-git
- pkgdesc = Stable Diffusion in pure C/C++ (with OPENBlas CPU optimizations)
- depends = openblas
- provides = stable-diffusion.cpp-git=r108.48bcce4
-
-pkgname = stable-diffusion.cpp-cublas-git
- pkgdesc = Stable Diffusion in pure C/C++ (with NVIDIA CUDA optimizations)
- depends = cuda
- provides = stable-diffusion.cpp-git=r108.48bcce4
- conflicts = stable-diffusion.cpp-git
-
pkgname = stable-diffusion.cpp-hipblas-git
pkgdesc = Stable Diffusion in pure C/C++ (with AMD ROCm optimizations)
- depends = hipblas
+ depends = rocm-hip-runtime
provides = stable-diffusion.cpp-git=r108.48bcce4
conflicts = stable-diffusion.cpp-git
diff --git a/PKGBUILD b/PKGBUILD
index 42f7dd2fdbca..bc901e8fae49 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,8 @@
_name=stable-diffusion.cpp
pkgbase="${_name}-git"
pkgname=(
- "${pkgbase}"
- "${_name}-cublas-git"
+ # "${pkgbase}"
+ # "${_name}-cublas-git"
"${_name}-hipblas-git"
)
pkgver=r108.48bcce4
@@ -18,7 +18,7 @@ makedepends=(
'cmake'
'cuda'
'git'
- 'hipblas'
+ 'rocm-hip-sdk'
'openblas'
)
conflicts=("${_name}")
@@ -59,6 +59,7 @@ build() {
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DSD_HIPBLAS=ON
+ -DAMDGPU_TARGETS=gfx1100
)
local _cmake_openblas_args=(
@@ -66,21 +67,28 @@ build() {
-DGGML_OPENBLAS=ON
)
+ echo "Build ${pkgbase} with OPENBlas"
+ cd "${srcdir}/${_name}-openblas"
+ cmake "${_cmake_openblas_args[@]}"
+ cmake --build build
+
echo "Build ${pkgbase} with CUBlas (NVIDIA CUDA)"
+ export CUDA_PATH=/opt/cuda
+ export PATH+=":/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin"
+ export LD_LIBRARY_PATH+=":/opt/cuda/lib:/opt/cuda/lib64"
+ export NVCC_PREPEND_FLAGS='-ccbin /opt/cuda/bin'
cd "${srcdir}/${_name}-cublas"
cmake "${_cmake_cublas_args[@]}"
cmake --build build
echo "Build ${pkgbase} with HIPBlas (AMD ROCm)"
cd "${srcdir}/${_name}-hipblas"
- CC=/opt/rocm/llvm/bin/clang CXX=/opt/rocm/llvm/bin/clang++ \
+ export CXXFLAGS+="$CXXFLAGS -fcf-protection=none"
+ export PATH+=":/opt/rocm/lib/llvm/bin"
+ CC="/opt/rocm/llvm/bin/clang" CXX="/opt/rocm/llvm/bin/clang++" \
cmake "${_cmake_hipblas_args[@]}"
cmake --build build
- echo "Build ${pkgbase} with OPENBlas"
- cd "${srcdir}/${_name}-openblas"
- cmake "${_cmake_openblas_args[@]}"
- cmake --build build
}
package_stable-diffusion.cpp-git() {
@@ -104,7 +112,7 @@ package_stable-diffusion.cpp-cublas-git() {
package_stable-diffusion.cpp-hipblas-git() {
pkgdesc="$pkgdesc (with AMD ROCm optimizations)"
- depends+=('hipblas')
+ depends+=('rocm-hip-runtime')
provides=("${pkgbase}=${pkgver}")
conflicts=("${pkgbase}")