forked from ggml-org/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cuda: 1) changed tensor split calculation to work on free vram instead of total vram (the main GPU often consumes a few GB from desktop work) Changed the loading progress callback: 1) Added a numerical percentage to it 2) Added a status message to display what it is doing right now ("loading tensors: CPU) 3) normalized the length of the bar and designed it from dots to an actual progress bar Example : [============================================>-----] 88% Loading tensor (GPU-Split) Todo: The progressbar can be changed into 3-4 lines, so it displays important flags and changes alongside the progress. This would replace the list of "log entries" before the progress starts counting and preceding log-lines are only printed for errors and warnings. * 1) Added a tensor split prepare wrapper, this allows to take the tensor split given by -ts immediately 2) Created a CUDA status struct with getter and update functions. Moved g_main_device and g_num_devices into the new struct. typedef struct { int num_devices; int main_device_id; size_t total_vram; size_t total_free_vram; struct cudaDeviceProp device_props[GGML_CUDA_MAX_DEVICES]; size_t device_vram_free[GGML_CUDA_MAX_DEVICES]; size_t device_vram_total[GGML_CUDA_MAX_DEVICES]; } GPUStatus; 3) Replaced the previous log output with a print function that gives better CUDA information on init Example: CUDA Device Summary - 2 devices found +------------------------------------+------------+-----------+-----------+-----------+-----------+ | Device | VRAM Total | VRAM Free | VRAM Used | Split % | Device ID | +------------------------------------+------------+-----------+-----------+-----------+-----------+ | NVIDIA GeForce RTX 4090 | 24563 MB | 23006 MB | 1557 MB | 0.0% | 0 (Main) | +------------------------------------+------------+-----------+-----------+-----------+-----------+ | NVIDIA GeForce RTX 3090 | 24575 MB | 23318 MB | 1257 MB | 67.2% | 1 | +------------------------------------+------------+-----------+-----------+-----------+-----------+ Total VRAM: 47.99 GB, Free VRAM: 45.24 GB -------------------- 4) cleaned up libfalcon.cpp to use the new information instead of making cuda requests and device changes TODO: The VRAM reported by CUDA is not the same as reported by CPU-Z which also is different from HWINFO64 (this one is totally off). * CUDA: 1) Tensor split now allows to disable either device (usage proportion of 0) - this currently still occupies minimal VRAM and if main-device it will still be used for non split tensors 2) Corrected (reduced) total free VRAM calculation if a device proportion is disabled (does not take main device into account) * vram_total bugfix * status table alignment * bugfixes * added perf counters also into makefile ---------
- Loading branch information
Showing
8 changed files
with
310 additions
and
118 deletions.
There are no files selected for viewing
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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