]> git.djapps.eu Git - pkg/ggml/sources/ggml/log
pkg/ggml/sources/ggml
11 months agofix typo (llama/8267)
Judd [Wed, 3 Jul 2024 12:40:16 +0000 (20:40 +0800)]
fix typo (llama/8267)

Co-authored-by: Judd <redacted>
11 months agoDequant improvements rebase (llama/8255)
AidanBeltonS [Wed, 3 Jul 2024 01:55:34 +0000 (02:55 +0100)]
Dequant improvements rebase (llama/8255)

* Single load for half2

* Store scales in local mem

* Vec load quantized values

11 months agoRemoves multiple newlines at the end of files that is breaking the editorconfig step...
Clint Herron [Tue, 2 Jul 2024 16:18:10 +0000 (12:18 -0400)]
Removes multiple newlines at the end of files that is breaking the editorconfig step of CI. (llama/8258)

11 months agocuda : update supports_op for matrix multiplication (llama/8245)
slaren [Tue, 2 Jul 2024 06:39:38 +0000 (08:39 +0200)]
cuda : update supports_op for matrix multiplication (llama/8245)

11 months agoFix win build conflict of math library (llama/8230)
luoyu-intel [Tue, 2 Jul 2024 04:50:07 +0000 (04:50 +0000)]
Fix win build conflict of math library (llama/8230)

* fix win build conflict of math library

* fix the condition: !(win32 & SYCL)

* revert warp_size=16

11 months agoFix the sub group size of Intel (llama/8106)
luoyu-intel [Tue, 2 Jul 2024 02:16:00 +0000 (02:16 +0000)]
Fix the sub group size of Intel (llama/8106)

* use warp_size macro for all sycl kernels

* fix mask of permute_sub_group_by_xor

* fix rms_norm with correct warp number

* fix rms_norm_f32/group_norm_f32

* move norm to norm.cpp file

* fix quantize bug

* fix mmvq's batch size

11 months agoCUDA: refactor and optimize IQ MMVQ (llama/8215)
Johannes Gäßler [Mon, 1 Jul 2024 18:39:06 +0000 (20:39 +0200)]
CUDA: refactor and optimize IQ MMVQ (llama/8215)

* CUDA: refactor and optimize IQ MMVQ

* uint -> uint32_t

* __dp4a -> ggml_cuda_dp4a

* remove MIN_CC_DP4A checks

* change default

* try CI fix

11 months agoUpdate SYCL-Rope op and Refactor (llama/8157)
zhentaoyu [Mon, 1 Jul 2024 11:39:06 +0000 (19:39 +0800)]
Update SYCL-Rope op and Refactor (llama/8157)

* align with rope.cu and move sycl-op to a single file

11 months agoCUDA: fix MMQ stream-k for --split-mode row (llama/8167)
Johannes Gäßler [Thu, 27 Jun 2024 14:26:05 +0000 (16:26 +0200)]
CUDA: fix MMQ stream-k for --split-mode row (llama/8167)

11 months agofix uses of GGML_USE_CUBLAS in tests and examples (#879)
slaren [Tue, 2 Jul 2024 17:11:52 +0000 (19:11 +0200)]
fix uses of GGML_USE_CUBLAS in tests and examples (#879)

* fix uses of GGML_USE_CUBLAS in tests and examples

* fix ci/run.sh

ggml-ci

11 months agofeat: cuda implementation for `ggml_conv_transpose_1d` (#854)
John Balis [Tue, 2 Jul 2024 16:09:52 +0000 (11:09 -0500)]
feat: cuda implementation for `ggml_conv_transpose_1d` (#854)

* conv transpose 1d passing test for 1d input and kernel

* working for different input and output channel counts, added test for variable stride

* initial draft appears to work with stride other than 1

* working with all old and new conv1d  tests

* added a test for large tensors

* removed use cuda hardcoding

* restored test-conv-transpose.c

* removed unused arugments, and fixed bug where test failure would cause subsequent tests to fail

* fixed accumulator bug

* added test to test-backend-ops

* fixed mistake

* addressed review

* fixed includes

* removed blank lines

* style and warning fixes

* return failure when test fails

* fix supports_op

---------

Co-authored-by: slaren <redacted>
11 months agosycl : add build instruction (#870)
Yilong Guo [Sun, 30 Jun 2024 16:05:44 +0000 (09:05 -0700)]
sycl : add build instruction (#870)

11 months agoupdate "Using cuBLAS" to use correct update cuda compile flag (#876)
John Balis [Sun, 30 Jun 2024 15:14:31 +0000 (10:14 -0500)]
update "Using cuBLAS" to use correct update cuda compile flag (#876)

It seems like the previous `-DGGML_CUBLAS=ON` compile flag was deprecated.

12 months agosync : whisper.cpp
Georgi Gerganov [Wed, 26 Jun 2024 20:26:16 +0000 (23:26 +0300)]
sync : whisper.cpp

12 months agowhisper : disable CUDA mel + fix FFMPEG
Georgi Gerganov [Wed, 26 Jun 2024 17:11:38 +0000 (20:11 +0300)]
whisper : disable CUDA mel + fix FFMPEG

12 months agosync : llama.cpp
Georgi Gerganov [Wed, 26 Jun 2024 19:42:27 +0000 (22:42 +0300)]
sync : llama.cpp

12 months agoggml : add GGML_CUDA_USE_GRAPHS option, restore GGML_CUDA_FORCE_CUBLAS (cmake) (llama...
slaren [Wed, 26 Jun 2024 19:34:14 +0000 (21:34 +0200)]
ggml : add GGML_CUDA_USE_GRAPHS option, restore GGML_CUDA_FORCE_CUBLAS (cmake) (llama/8140)

12 months agosync : llama.cpp, whisper.cpp
Georgi Gerganov [Wed, 26 Jun 2024 16:40:53 +0000 (19:40 +0300)]
sync : llama.cpp, whisper.cpp

12 months agoggml : reorganize source code + improve CMake (#865)
Georgi Gerganov [Wed, 26 Jun 2024 16:33:53 +0000 (19:33 +0300)]
ggml : reorganize source code + improve CMake (#865)

* scripts : update sync [no ci]

* ggml : move headers one up [no ci]

* files : reorganize + update CMake

ggml-ci

* cmake : build normal ggml library

ggml-ci

* cmake : link math library to test + remove ci for code cov

ggml-ci

* files : move public headers to include

ggml-ci

12 months agofiles : remove old (#0)
Georgi Gerganov [Fri, 21 Jun 2024 07:25:14 +0000 (10:25 +0300)]
files : remove old (#0)

12 months agosync : whisper.cpp
Georgi Gerganov [Tue, 18 Jun 2024 06:48:08 +0000 (09:48 +0300)]
sync : whisper.cpp

12 months agowhisper : use ggml_backend_sched (whisper/2239)
Georgi Gerganov [Tue, 18 Jun 2024 06:37:20 +0000 (09:37 +0300)]
whisper : use ggml_backend_sched (whisper/2239)

* whisper : use ggml_backend_sched (wip)

* use sched in whisper_allocr

* whisper : single backend in whisper_context

* whisper : remove whisper_state->backends_used

* whisper : remove whisper_context->backend

* whisper : reset scheduler after init

* whisper : fix external encoder (e.g. CoreML)

* whisper : cleanup

* whisper : handle null GPU buffer types + fix sycl

---------

Co-authored-by: slaren <redacted>
12 months agosync : whisper.cpp
Georgi Gerganov [Sun, 16 Jun 2024 17:31:33 +0000 (20:31 +0300)]
sync : whisper.cpp

12 months agocuda : fix bounds check for src0 rows in MMVQ kernel (whisper/2231)
Georgi Gerganov [Tue, 11 Jun 2024 14:39:01 +0000 (17:39 +0300)]
cuda : fix bounds check for src0 rows in MMVQ kernel (whisper/2231)

* cuda : fix bounds check for src0 rows in MMVQ kernel

* Update ggml-cuda/mmvq.cu

Co-authored-by: Johannes Gäßler <redacted>
---------

Co-authored-by: Johannes Gäßler <redacted>
12 months agowhisper : remove `speed_up` and `phase_vocoder*` functions (whisper/2198)
Borislav Stanimirov [Fri, 31 May 2024 08:37:29 +0000 (11:37 +0300)]
whisper : remove `speed_up` and `phase_vocoder*` functions (whisper/2198)

* whisper : fix cast warning

* whisper : remove phase_vocoder functions, ref #2195

* whisper : remove speed_up from whisper_full_params, closes #2195

12 months agoexamples : add support for decoding input with ffmpeg (Linux) (whisper/2133)
William Tambellini [Tue, 21 May 2024 15:31:41 +0000 (08:31 -0700)]
examples : add support for decoding input with ffmpeg (Linux) (whisper/2133)

- search for ffmpeg libs/headers at cmake time
- added ffmpeg-transcode.cpp into libcommon if ffmpeg on
- hooked ffmpeg trancoding in common read_wav(...)
- passed test:
./main -m ggml-base.en.bin -f samples/jfk.mp3

12 months agoexamples : remove whisper (#860)
Georgi Gerganov [Sun, 16 Jun 2024 16:10:54 +0000 (19:10 +0300)]
examples : remove whisper (#860)

ggml-ci

12 months agomove BLAS to a separate backend (cont) (llama/6210)
slaren [Sun, 16 Jun 2024 10:57:37 +0000 (13:57 +0300)]
move BLAS to a separate backend (cont) (llama/6210)

ggml-ci

12 months agoscripts : sync ggml-blas
Georgi Gerganov [Sun, 16 Jun 2024 10:56:06 +0000 (13:56 +0300)]
scripts : sync ggml-blas

12 months agoVulkan Shader Refactor, Memory Debugging Option (llama/7947)
0cc4m [Sun, 16 Jun 2024 05:17:31 +0000 (07:17 +0200)]
Vulkan Shader Refactor, Memory Debugging Option (llama/7947)

* Refactor shaders, extract GLSL code from ggml_vk_generate_shaders.py into vulkan-shaders directory

* Improve debug log code

* Add memory debug output option

* Fix flake8

* Fix unnecessary high llama-3 VRAM use

12 months agoggml : remove OpenCL (#0)
Georgi Gerganov [Sun, 16 Jun 2024 10:42:57 +0000 (13:42 +0300)]
ggml : remove OpenCL (#0)

12 months agocmake : fix cuda vars (#0)
Georgi Gerganov [Sun, 16 Jun 2024 10:05:11 +0000 (13:05 +0300)]
cmake : fix cuda vars (#0)

12 months agoscripts : update sync
Georgi Gerganov [Sun, 16 Jun 2024 09:40:38 +0000 (12:40 +0300)]
scripts : update sync

12 months agoggml : fix and optimize ppc64le (#849)
Hong Bo PENG [Sun, 16 Jun 2024 08:53:11 +0000 (16:53 +0800)]
ggml : fix and optimize ppc64le (#849)

* fix compile issues introduced by loongarch_asx

* restore quant changes to merge

* fix compile issues introduced by loongarch_asx

* further optimize by using vec_msum & vec_sum4s on ppc64le

12 months agoggml : remove duplicate include of ggml-common.h (#853)
Daniel Bevenius [Sun, 16 Jun 2024 08:51:18 +0000 (10:51 +0200)]
ggml : remove duplicate include of ggml-common.h (#853)

Signed-off-by: Daniel Bevenius <redacted>
12 months agosycl : remove global variables (cont) (llama/7710)
Yilong Guo [Sun, 16 Jun 2024 07:51:38 +0000 (00:51 -0700)]
sycl : remove global variables (cont) (llama/7710)

* separate DPCT helpers outside

* replace global variables with context

* remove useless extra

* update mul_mat condition

* remove duplicate buft initialization

* remove duplicate extra and global work group size

* remove useless backend check

* remove duplicated extras

* use macro for group_size and remove cuda-related

Co-authored-by: Meng, Hengyu <redacted>
12 months agoscripts : add ggml-sycl to sync scripts (#857)
Yilong Guo [Sun, 16 Jun 2024 07:40:35 +0000 (00:40 -0700)]
scripts : add ggml-sycl to sync scripts (#857)

12 months agoci : add GG_BUILD_NO_DOWNLOAD
Georgi Gerganov [Sat, 15 Jun 2024 18:12:18 +0000 (21:12 +0300)]
ci : add GG_BUILD_NO_DOWNLOAD

ggml-ci

12 months agoggml : remove opencl (#0)
Georgi Gerganov [Sat, 15 Jun 2024 17:54:22 +0000 (20:54 +0300)]
ggml : remove opencl (#0)

ggml-ci

12 months agocuda : update build (#0)
Georgi Gerganov [Sat, 15 Jun 2024 17:53:02 +0000 (20:53 +0300)]
cuda : update build (#0)

ggml-ci

12 months agosync : llama.cpp
Georgi Gerganov [Sat, 15 Jun 2024 17:16:55 +0000 (20:16 +0300)]
sync : llama.cpp

ggml-ci

12 months agotests : adapt to changes (#0)
Georgi Gerganov [Sat, 15 Jun 2024 17:16:42 +0000 (20:16 +0300)]
tests : adapt to changes (#0)

12 months agoremove global variables (llama/7710)
Meng, Hengyu [Sat, 15 Jun 2024 06:05:10 +0000 (14:05 +0800)]
remove global variables (llama/7710)

* separate DPCT helpers outside

* replace global variables with context

* remove useless extra

* update mul_mat condition

* remove duplicate buft initialization

* remove duplicate extra and global work group size

* remove useless backend check

* remove duplicated extras

* use macro for group_size and remove cuda-related

12 months agoCUDA: faster q2_K, q3_K MMQ + int8 tensor cores (llama/7921)
Johannes Gäßler [Fri, 14 Jun 2024 16:41:49 +0000 (18:41 +0200)]
CUDA: faster q2_K, q3_K MMQ + int8 tensor cores (llama/7921)

* CUDA: faster q2_K, q3_K MMQ + int8 tensor cores

* try CI fix

* try CI fix

* try CI fix

* fix data race

* rever q2_K precision related changes

12 months agometal : utilize max shared memory for mul_mat_id (llama/7935)
Georgi Gerganov [Fri, 14 Jun 2024 14:14:09 +0000 (17:14 +0300)]
metal : utilize max shared memory for mul_mat_id (llama/7935)

12 months agorpc : fix ggml_backend_rpc_supports_buft() (llama/7918)
Radoslav Gerganov [Thu, 13 Jun 2024 12:18:44 +0000 (15:18 +0300)]
rpc : fix ggml_backend_rpc_supports_buft() (llama/7918)

12 months agomove BLAS to a separate backend (llama/6210)
slaren [Thu, 13 Jun 2024 01:11:35 +0000 (03:11 +0200)]
move BLAS to a separate backend (llama/6210)

* move BLAS to a separate backend

* rename GGML_USE_OPENBLAS to GGML_USE_BLAS

* alloc : reuse same buffer when the same buffer type if used multiple times

* set number of threads automatically for openblas and blis

* sched : print assignments when GGML_SCHED_DEBUG env variable is set

* sched : allow ops with weights on an incompatible buffer type

This will cause the weight to be copied to a backend that supports the
op, which is very costly. The weight should have been stored in a buffer
of a backend that can run the op, but llama.cpp cannot do this
automatically at the moment.

---------

Co-authored-by: Georgi Gerganov <redacted>
12 months agoCUDA: fix broken oob check for FA vec f32 kernel (llama/7904)
Johannes Gäßler [Wed, 12 Jun 2024 15:41:51 +0000 (17:41 +0200)]
CUDA: fix broken oob check for FA vec f32 kernel (llama/7904)

12 months agotests : add non-cont unary tests (llama/7857)
Georgi Gerganov [Wed, 12 Jun 2024 13:00:22 +0000 (16:00 +0300)]
tests : add non-cont unary tests (llama/7857)

* tests : add non-cont unary tests

* ggml : update unary asserts and "supports_op"

ggml-ci

12 months agoggml : improve ggml_is_contiguous logic (llama/7856)
Georgi Gerganov [Wed, 12 Jun 2024 12:24:20 +0000 (15:24 +0300)]
ggml : improve ggml_is_contiguous logic (llama/7856)

* ggml : improve ggml_is_contiguous logic

ggml-ci

* ggml : support more contiguous cases

ggml-ci

12 months agovulkan: select only one device for single gpu with multiple drivers (llama/7582)
k.h.lai [Tue, 11 Jun 2024 19:26:05 +0000 (03:26 +0800)]
vulkan: select only one device for single gpu with multiple drivers (llama/7582)

12 months agoUpdate Vulkan RoPE implementation (llama/7818)
0cc4m [Tue, 11 Jun 2024 19:20:29 +0000 (21:20 +0200)]
Update Vulkan RoPE implementation (llama/7818)

* Update Vulkan RoPE implementation

* Return nullptr on alloc_buffer when allocation fails, instead of throwing an exception

Minor fixes

* Fix segfault when running out of VRAM

Co-authored-by: slaren <redacted>
---------

Co-authored-by: slaren <redacted>
12 months agoCUDA: int8 tensor cores for MMQ (q4_K, q5_K, q6_K) (llama/7860)
Johannes Gäßler [Tue, 11 Jun 2024 06:26:07 +0000 (08:26 +0200)]
CUDA: int8 tensor cores for MMQ (q4_K, q5_K, q6_K) (llama/7860)

12 months agoCUDA: use tensor cores for MMQ (llama/7676)
Johannes Gäßler [Mon, 10 Jun 2024 09:45:13 +0000 (11:45 +0200)]
CUDA: use tensor cores for MMQ (llama/7676)

* CUDA: int8 tensor cores for MMQ (legacy quants)

* fix out-of-bounds writes

* __builtin_assume -> GGML_CUDA_ASSUME

* fix writeback returning too early

12 months agouse the correct SYCL context for host USM allocations (llama/7777)
Ben Ashbaugh [Mon, 10 Jun 2024 09:21:31 +0000 (02:21 -0700)]
use the correct SYCL context for host USM allocations (llama/7777)

Signed-off-by: Ben Ashbaugh <redacted>
12 months agoCUDA: revise q8_1 data layout for mul_mat_q (llama/7824)
Johannes Gäßler [Sun, 9 Jun 2024 07:42:25 +0000 (09:42 +0200)]
CUDA: revise q8_1 data layout for mul_mat_q (llama/7824)

12 months agovulkan : reuse parent extra for views (llama/7806)
slaren [Fri, 7 Jun 2024 17:47:49 +0000 (19:47 +0200)]
vulkan : reuse parent extra for views (llama/7806)

* vulkan : reuse parent extra for views

* Fix validation error when multiple compute contexts are used in a graph

---------

Co-authored-by: 0cc4m <redacted>
12 months agofix softmax r2r result wrong issue (llama/7811)
pengxin99 [Fri, 7 Jun 2024 06:28:26 +0000 (14:28 +0800)]
fix softmax r2r result wrong issue (llama/7811)

12 months agoCUDA: refactor mmq, dmmv, mmvq (llama/7716)
Johannes Gäßler [Wed, 5 Jun 2024 14:53:00 +0000 (16:53 +0200)]
CUDA: refactor mmq, dmmv, mmvq (llama/7716)

* CUDA: refactor mmq, dmmv, mmvq

* fix out-of-bounds write

* struct for qk, qr, qi

* fix cmake build

* mmq_type_traits

12 months agoggml : refactor rope norm/neox (llama/7634)
Georgi Gerganov [Wed, 5 Jun 2024 08:29:20 +0000 (11:29 +0300)]
ggml : refactor rope norm/neox (llama/7634)

* ggml : unify rope norm/neox (CPU)

* ggml : fix compile warning

* ggml : remove GLM rope mode

ggml-ci

* metal : better rope implementation

ggml-ci

* cuda : better rope implementation

ggml-ci

* naming : n_orig_ctx -> n_ctx_orig

ggml-ci

* dev : add reminders to update backends

ggml-ci

* vulkan : fix ggml_rope_ext() usage

* cuda : fix array size + indents

ggml-ci

12 months agoAllow number of nodes in CUDA graph to change (llama/7738)
agray3 [Tue, 4 Jun 2024 20:06:49 +0000 (21:06 +0100)]
Allow number of nodes in CUDA graph to change (llama/7738)

Previously the code would have failed to cope in the case that the
number of nodes changes in an existing CUDA graph. This fixes the
issue by removing an unnecessary conditional.

12 months agoggml : remove OpenCL (llama/7735)
Georgi Gerganov [Tue, 4 Jun 2024 18:23:20 +0000 (21:23 +0300)]
ggml : remove OpenCL (llama/7735)

ggml-ci

12 months agoggml : prevent builds with -ffinite-math-only (llama/7726)
Georgi Gerganov [Tue, 4 Jun 2024 07:01:09 +0000 (10:01 +0300)]
ggml : prevent builds with -ffinite-math-only (llama/7726)

This enforces a check that -fno-finite-math-only was set and that the operating
compiling mode is not in finite maths mode. This is because during rewriting of
silu and softmax for cpu #7154 there emerged an issue where the result that was
observed when >1 slot was nondeterministic as found by @JohannesGaessler.

@LostRuins narrowed the problem down to -ffinite-math-only which was theorised
to be due to SiLU, instead of flushing small values to 0, returns NaN or some
other garbage. @jart proposed a fix that @ggerganov then implemented in this fix

ref https://github.com/ggerganov/llama.cpp/pull/7154#issuecomment-2145661825

12 months agollama : offload to RPC in addition to other backends (llama/7640)
Radoslav Gerganov [Mon, 3 Jun 2024 17:03:26 +0000 (20:03 +0300)]
llama : offload to RPC in addition to other backends (llama/7640)

* llama : offload to RPC in addition to other backends

* - fix copy_tensor being called on the src buffer instead of the dst buffer

- always initialize views in the view_src buffer

- add RPC backend to Makefile build

- add endpoint to all RPC object names

* add rpc-server to Makefile

* Update llama.cpp

Co-authored-by: slaren <redacted>
---------

Co-authored-by: slaren <redacted>
12 months agoggml : use OpenMP as a thread pool (llama/7606)
Masaya, Kato [Mon, 3 Jun 2024 15:14:15 +0000 (00:14 +0900)]
ggml : use OpenMP as a thread pool (llama/7606)

* ggml: Added OpenMP for multi-threads processing

* ggml : Limit the number of threads used to avoid deadlock

* update shared state n_threads in parallel region

* clear numa affinity for main thread even with openmp

* enable openmp by default

* fix msvc build

* disable openmp on macos

* ci : disable openmp with thread sanitizer

* Update ggml.c

Co-authored-by: Georgi Gerganov <redacted>
---------

Co-authored-by: slaren <redacted>
Co-authored-by: Georgi Gerganov <redacted>
12 months agoVulkan Mixture of Experts (MoE) support (llama/7628)
0cc4m [Mon, 3 Jun 2024 08:59:14 +0000 (10:59 +0200)]
Vulkan Mixture of Experts (MoE) support (llama/7628)

* Finish Vulkan mul_mat_id implementation

* Add Vulkan sum_rows and div ops

* Fix MUL_MAT_ID matrix matrix shader

* Fix MUL_MAT_ID matrix vector shader dispatch size

* Fix MUL_MAT_ID matrix vector shader and dispatch code

* Update Vulkan CPU offload for MUL_MAT_ID

* Fix crash when using split mode none and setting a main GPU

12 months agokompute : implement op_getrows_f32 (llama/6403)
woachk [Mon, 3 Jun 2024 05:32:16 +0000 (07:32 +0200)]
kompute : implement op_getrows_f32 (llama/6403)

op_getrows_f32 is required since https://github.com/ggerganov/llama.cpp/pull/6122
for the Vulkan w/ Kompute backend to be functional.

As such, implement this op to make this backend functional again.

12 months agofix bug introduced in using calloc (llama/7701)
Dave Airlie [Sun, 2 Jun 2024 21:59:54 +0000 (07:59 +1000)]
fix bug introduced in using calloc (llama/7701)

compilade pointed this out on the previous MR

12 months agoFix FlashAttention debug test, FP32 assert (llama/7684)
Johannes Gäßler [Sat, 1 Jun 2024 21:26:10 +0000 (23:26 +0200)]
Fix FlashAttention debug test, FP32 assert (llama/7684)

12 months agoCUDA: fix Pascal FA, deq. KV to FP16 for batch > 8 (llama/7681)
Johannes Gäßler [Sat, 1 Jun 2024 13:47:04 +0000 (15:47 +0200)]
CUDA: fix Pascal FA, deq. KV to FP16 for batch > 8 (llama/7681)

12 months agoCUDA: quantized KV support for FA vec (llama/7527)
Johannes Gäßler [Sat, 1 Jun 2024 06:44:14 +0000 (08:44 +0200)]
CUDA: quantized KV support for FA vec (llama/7527)

* CUDA: quantized KV support for FA vec

* try CI fix

* fix commented-out kernel variants

* add q8_0 q4_0 tests

* fix nwarps > batch size

* split fattn compile via extern templates

* fix flake8

* fix metal tests

* fix cmake

* make generate_cu_files.py executable

* add autogenerated .cu files

* fix AMD

* error if type_v != FP16 and not flash_attn

* remove obsolete code

12 months agoggml : fix loongson compile warnings (llama/7537)
Georgi Gerganov [Fri, 31 May 2024 11:17:10 +0000 (14:17 +0300)]
ggml : fix loongson compile warnings (llama/7537)

* ggml : fix loongson compile warnings

ggml-ci

* Fix loongarch quantize test fail.

Fix unexpected error introduced during rebase code.

* tests : disable json test due to lack of python on the CI node

ggml-ci

---------

Co-authored-by: junchao-loongson <redacted>
12 months agofaster avx512 exp implementation (llama/7551)
Chris Elrod [Thu, 30 May 2024 11:32:55 +0000 (07:32 -0400)]
faster avx512 exp implementation (llama/7551)

* faster avx512 exp implementation

* x->r

* improve accuracy, handle special cases

* remove `e`

12 months agoggml : fix loongarch build (O2 issue) (llama/7636)
junchao-loongson [Thu, 30 May 2024 09:30:10 +0000 (17:30 +0800)]
ggml : fix loongarch build (O2 issue) (llama/7636)

12 months agometal : remove invalid asserts (llama/7617)
Georgi Gerganov [Wed, 29 May 2024 19:20:40 +0000 (22:20 +0300)]
metal : remove invalid asserts (llama/7617)

12 months agometal : add missing asserts (llama/7617)
Georgi Gerganov [Wed, 29 May 2024 17:45:25 +0000 (20:45 +0300)]
metal : add missing asserts (llama/7617)

12 months agoggml : fix YARN + add tests + add asserts (llama/7617)
Georgi Gerganov [Wed, 29 May 2024 17:17:31 +0000 (20:17 +0300)]
ggml : fix YARN + add tests + add asserts (llama/7617)

* tests : add rope tests

ggml-ci

* ggml : fixes (hopefully)

ggml-ci

* tests : add non-cont tests

ggml-ci

* cuda : add asserts for rope/norm + fix DS2

ggml-ci

* ggml : assert contiguousness

* tests : reduce RoPE tests

ggml-ci

12 months agocuda : non-cont concat support (llama/7610)
Georgi Gerganov [Wed, 29 May 2024 12:38:26 +0000 (15:38 +0300)]
cuda : non-cont concat support (llama/7610)

* tests : add non-cont concat tests

* cuda : non-cont concat support

ggml-ci

12 months agollama-bench : add support for the RPC backend (llama/7435)
Radoslav Gerganov [Wed, 29 May 2024 11:45:44 +0000 (14:45 +0300)]
llama-bench : add support for the RPC backend (llama/7435)

12 months agoggml : use atomic_flag for critical section (llama/7598)
slaren [Wed, 29 May 2024 11:36:39 +0000 (13:36 +0200)]
ggml : use atomic_flag for critical section (llama/7598)

* ggml : use atomic_flag for critical section

* add windows shims

12 months agocmake : update HIPBLAS (#847)
Daniele [Wed, 5 Jun 2024 11:00:09 +0000 (11:00 +0000)]
cmake : update HIPBLAS (#847)

* Update HIPBLAS CMake

* Fix HIPBlas for Debian

* Add hipBLAS build instructions

* Fix Clang detection

* Set ROCM_PATH correctly

12 months agozig : fix build (#840)
Emmanuel Durand [Wed, 5 Jun 2024 08:41:51 +0000 (04:41 -0400)]
zig : fix build (#840)

13 months agosync : llama.cpp
Georgi Gerganov [Wed, 29 May 2024 09:58:18 +0000 (12:58 +0300)]
sync : llama.cpp

ggml-ci

13 months agoexamples : adapt to new ggml_concat (#0)
Georgi Gerganov [Wed, 29 May 2024 09:58:00 +0000 (12:58 +0300)]
examples : adapt to new ggml_concat (#0)

13 months agoggml : fix typo in ggml.c (llama/7603)
zhouwg [Wed, 29 May 2024 02:09:31 +0000 (10:09 +0800)]
ggml : fix typo in ggml.c (llama/7603)

13 months agoAlign GEMM dispatch (llama/7566)
Meng, Hengyu [Tue, 28 May 2024 23:00:24 +0000 (07:00 +0800)]
Align GEMM dispatch (llama/7566)

* align GEMM dispatch

13 months agosycl : fix assert (llama/7563)
Georgi Gerganov [Tue, 28 May 2024 19:22:50 +0000 (22:22 +0300)]
sycl : fix assert (llama/7563)

13 months agovulkan: properly initialize vulkan devices for LLAMA_SPLIT_MODE_NONE (llama/7552)
k.h.lai [Tue, 28 May 2024 17:25:08 +0000 (01:25 +0800)]
vulkan: properly initialize vulkan devices for LLAMA_SPLIT_MODE_NONE (llama/7552)

13 months agorpc : resource management rework (llama/7562)
Radoslav Gerganov [Tue, 28 May 2024 15:13:36 +0000 (18:13 +0300)]
rpc : resource management rework (llama/7562)

* rpc : resource management rework

* address review comments

13 months agofix ggml_sycl_mul_mat_id() to match the change of api (llama/7436)
Neo Zhang [Tue, 28 May 2024 09:53:37 +0000 (17:53 +0800)]
fix ggml_sycl_mul_mat_id() to match the change of api (llama/7436)

* fix mul_mat_id to match the change of api

* rm comment

* rm unused or duplicated code, rename as review comment

13 months agoggml : generalize GGML_OP_CONCAT (llama/7563)
Georgi Gerganov [Tue, 28 May 2024 08:04:19 +0000 (11:04 +0300)]
ggml : generalize GGML_OP_CONCAT (llama/7563)

* ggml : generalize GGML_OP_CONCAT (WIP)

ggml-ci

* tests : add dim != 2 tests

* metal : generalize concat kernel

* tests : naming

* cuda : generalize concat kernel

ggml-ci

* sycl : add warning and assert

* ggml : fix op params handling

* metal : bugfix kernel

ggml-ci

* ggml : reimplement CPU and Metal

* cuda : add asserts

ggml-ci

* ggml : fix ptrs

ggml-ci

13 months agoupdate HIP_UMA #7399 (llama/7414)
Djip007 [Mon, 27 May 2024 23:40:47 +0000 (01:40 +0200)]
update HIP_UMA #7399 (llama/7414)

* update HIP_UMA #7399

add use of hipMemAdviseSetCoarseGrain when LLAMA_HIP_UMA is enable.
- get x2 on prompte eval and x1.5 on token gen with rocm6.0 on ryzen 7940HX iGPU (780M/gfx1103)

* simplify code, more consistent style

---------

Co-authored-by: slaren <redacted>
13 months agoAllow multiple copy function pointers for CUDA graph kernel param updates (llama...
agray3 [Mon, 27 May 2024 17:33:42 +0000 (18:33 +0100)]
Allow multiple copy function pointers for CUDA graph kernel param updates (llama/7565)

CUDA graphs require parameter updates to kernels associated with
GGML_OP_CPY nodes. Previously the implementation only checked for a
single CUDA kernel in such nodes, but this caused a bug in cases where
2 such kernels exist. This fixes the issue by using a vector to allow
multiple function pointers to be stored and checked against.

Fixes #7942

13 months agoFix q_xxs using mul_mat_q (llama/7459)
AidanBeltonS [Mon, 27 May 2024 16:34:51 +0000 (17:34 +0100)]
Fix q_xxs using mul_mat_q (llama/7459)

13 months agoAdd freq factors (llama/7495)
AidanBeltonS [Mon, 27 May 2024 12:34:09 +0000 (13:34 +0100)]
Add freq factors (llama/7495)

13 months agometal : add GGML_OP_REPEAT kernels (llama/7557)
Georgi Gerganov [Mon, 27 May 2024 09:10:19 +0000 (12:10 +0300)]
metal : add GGML_OP_REPEAT kernels (llama/7557)

ggml-ci

13 months agometal : disable FA kernel for HS=256 (llama/7556)
Georgi Gerganov [Mon, 27 May 2024 07:38:39 +0000 (10:38 +0300)]
metal : disable FA kernel for HS=256 (llama/7556)

ggml-ci

13 months agoggml : restore ggml_rope_xpos_inplace (#0)
Georgi Gerganov [Sun, 26 May 2024 15:35:23 +0000 (18:35 +0300)]
ggml : restore ggml_rope_xpos_inplace (#0)

ggml-ci

13 months agosync : llama.cpp
Georgi Gerganov [Sun, 26 May 2024 15:00:48 +0000 (18:00 +0300)]
sync : llama.cpp

ggml-ci

13 months agoggml: aarch64: SVE kernels for q8_0_q8_0, q4_0_q8_0 vector dot (llama/7433)
Masaya, Kato [Sat, 25 May 2024 08:42:31 +0000 (17:42 +0900)]
ggml: aarch64: SVE kernels for q8_0_q8_0, q4_0_q8_0 vector dot (llama/7433)

* Add SVE support for q4_0_q8_0 q8_0_q8_0

* remove ifdef