Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync : ggml #9567

Merged
merged 5 commits into from
Sep 20, 2024
Merged

sync : ggml #9567

merged 5 commits into from
Sep 20, 2024

Conversation

ggerganov
Copy link
Owner

@ggerganov ggerganov commented Sep 20, 2024

No description provided.

ggerganov and others added 3 commits September 20, 2024 18:57
* CUDA eval works

* stochastic gradient descent op

* Adam except decay

* CUDA CROSS_ENTROPY_LOSS_BACK

* CUDA mnist-fc training works

* backend CLI arg

* refactor gguf load

* remove sched from opt_step_adam

* implement l1 regularization (weight decay)

* extra call to add optimizer

* initialize gradients with ggml_graph_reset

* gradient accumulation

* increment iter per eval instead of epoch

* adjust backend interfaces

* fix ggml_graph_reset without backend

* fix ggml graph export/import

* fixup

* rename

* revert ggml_opt changes

* more general CUDA repeat_back

* update documentation, fix CNN

* validation split

* add clarifying comment

* optimize PyTorch training

* adjust buffer size, thread count

* fix 0.0f validation split

* Update examples/mnist/mnist-common.cpp

Co-authored-by: Georgi Gerganov <[email protected]>

* fix gradient accumulation

* tensor flag for accumulators -> tensor hash set

* Update include/ggml.h

Co-authored-by: slaren <[email protected]>

* Update tests/test-backend-ops.cpp

Co-authored-by: slaren <[email protected]>

* Update tests/test-backend-ops.cpp

Co-authored-by: slaren <[email protected]>

* fix test prints

* Update src/ggml-backend.c

Co-authored-by: Georgi Gerganov <[email protected]>

* better CUDA support for noncontiguous out_prod

* add comment

---------

Co-authored-by: Georgi Gerganov <[email protected]>
Co-authored-by: slaren <[email protected]>
ggml-ci
@ggerganov ggerganov changed the title examples : add null threadpool args where needed (ggml/0) sync : ggml Sep 20, 2024
@github-actions github-actions bot added script Script related testing Everything test related Nvidia GPU Issues specific to Nvidia GPUs Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language Kompute https://github.com/KomputeProject/kompute/ labels Sep 20, 2024
@ggerganov
Copy link
Owner Author

ggerganov commented Sep 20, 2024

@JohannesGaessler @slaren How to fix the HIP build:

[ 11%] Building HIP object ggml/src/CMakeFiles/ggml.dir/ggml-cuda/out-prod.cu.o
In file included from /__w/llama.cpp/llama.cpp/ggml/src/ggml-cuda/out-prod.cu:2:
/__w/llama.cpp/llama.cpp/ggml/src/ggml-cuda/vendors/cuda.h:3:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
1 error generated when compiling for gfx906.
gmake[2]: *** [ggml/src/CMakeFiles/ggml.dir/build.make:404: ggml/src/CMakeFiles/ggml.dir/ggml-cuda/out-prod.cu.o] Error 1

Edit: I think I just have to remove the include from out-prod.cu. Will give it a try in a bit

@@ -0,0 +1,52 @@
#include "out-prod.cuh"
#include "vendors/cuda.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "vendors/cuda.h"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should do it, this file cannot be included directly, and it is already included in common.cuh.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this fixes compilation with GGML_HIPBLAS.

@ggerganov ggerganov merged commit d13edb1 into master Sep 20, 2024
57 checks passed
@ggerganov ggerganov deleted the sync branch September 20, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning Kompute https://github.com/KomputeProject/kompute/ Nvidia GPU Issues specific to Nvidia GPUs script Script related SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language testing Everything test related Vulkan Issues specific to the Vulkan backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants