mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-09 14:34:34 +00:00
add swap capacity test
This commit is contained in:
parent
9eed6b14bf
commit
2d447266e9
3 changed files with 69 additions and 6 deletions
|
@ -838,10 +838,15 @@ struct llama_init_result llama_init_from_gpt_params(gpt_params & params) {
|
|||
uint32_t n_cpu_cores = profiler::device_cpu_cores();
|
||||
uint64_t total_memory = profiler::device_physical_memory(false);
|
||||
uint64_t available_memory = profiler::device_physical_memory(true);
|
||||
uint64_t total_swap = profiler::device_swap_memory(false);
|
||||
uint64_t available_swap = profiler::device_swap_memory(true);
|
||||
uint64_t disk_read_bw = profiler::get_disk_read_speed(params.model.c_str(), 500);
|
||||
|
||||
LOG_INF("Number of CPU cores: %u\n", n_cpu_cores);
|
||||
LOG_INF("Total Physical Memory: %.2f GB\n", total_memory / (double)(1 << 30));
|
||||
LOG_INF("Available Physical Memory: %.2f GB\n", available_memory / (double)(1 << 30));
|
||||
LOG_INF("Total Swap Memory: %.2f GB\n", total_swap / (double)(1 << 30));
|
||||
LOG_INF("Available Swap Memory: %.2f GB\n", available_swap / (double)(1 << 30));
|
||||
LOG_INF("Disk Read Bandwidth: %.2f GB/s\n", disk_read_bw / (double)(1 << 30));
|
||||
|
||||
if (model == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue