mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 14:20:31 +01:00
6bbc598a63
* use hipblas based on cublas * Update Makefile for the Cuda kernels * Expand arch list and make it overrideable * Fix multi GPU on multiple amd architectures with rocblas_initialize() (#5) * add hipBLAS to README * new build arg LLAMA_CUDA_MMQ_Y * fix half2 decomposition * Add intrinsics polyfills for AMD * AMD assembly optimized __dp4a * Allow overriding CC_TURING * use "ROCm" instead of "CUDA" * ignore all build dirs * Add Dockerfiles * fix llama-bench * fix -nommq help for non CUDA/HIP --------- Co-authored-by: YellowRoseCx <80486540+YellowRoseCx@users.noreply.github.com> Co-authored-by: ardfork <134447697+ardfork@users.noreply.github.com> Co-authored-by: funnbot <22226942+funnbot@users.noreply.github.com> Co-authored-by: Engininja2 <139037756+Engininja2@users.noreply.github.com> Co-authored-by: Kerfuffle <44031344+KerfuffleV2@users.noreply.github.com> Co-authored-by: jammm <2500920+jammm@users.noreply.github.com> Co-authored-by: jdecourval <7315817+jdecourval@users.noreply.github.com>
45 lines
969 B
Docker
45 lines
969 B
Docker
ARG UBUNTU_VERSION=22.04
|
|
|
|
# This needs to generally match the container host's environment.
|
|
ARG ROCM_VERSION=5.6
|
|
|
|
# Target the CUDA build image
|
|
ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
|
|
|
|
FROM ${BASE_ROCM_DEV_CONTAINER} as build
|
|
|
|
# Unless otherwise specified, we make a fat build.
|
|
# List from https://github.com/ggerganov/llama.cpp/pull/1087#issuecomment-1682807878
|
|
# This is mostly tied to rocBLAS supported archs.
|
|
ARG ROCM_DOCKER_ARCH=\
|
|
gfx803 \
|
|
gfx900 \
|
|
gfx906 \
|
|
gfx908 \
|
|
gfx90a \
|
|
gfx1010 \
|
|
gfx1030 \
|
|
gfx1100 \
|
|
gfx1101 \
|
|
gfx1102
|
|
|
|
COPY requirements.txt requirements.txt
|
|
|
|
RUN pip install --upgrade pip setuptools wheel \
|
|
&& pip install -r requirements.txt
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
# Set nvcc architecture
|
|
ENV GPU_TARGETS=${ROCM_DOCKER_ARCH}
|
|
# Enable ROCm
|
|
ENV LLAMA_HIPBLAS=1
|
|
ENV CC=/opt/rocm/llvm/bin/clang
|
|
ENV CXX=/opt/rocm/llvm/bin/clang++
|
|
|
|
RUN make
|
|
|
|
ENTRYPOINT [ "/app/main" ]
|