38
38
#include < thread>
39
39
#include < vector>
40
40
41
- // External declarations for build info
42
- extern int LLAMA_BUILD_NUMBER;
43
- extern const char *LLAMA_COMMIT;
44
-
45
41
static void init_tensor_uniform (ggml_tensor * tensor, float min = -1 .0f , float max = 1 .0f ) {
46
42
size_t nels = ggml_nelements (tensor);
47
43
std::vector<float > data (nels);
@@ -352,7 +348,6 @@ static bool output_format_from_str(const std::string & s, output_formats & forma
352
348
struct test_result {
353
349
std::string test_time;
354
350
std::string build_commit;
355
- int build_number;
356
351
std::string backend_name;
357
352
std::string op_name;
358
353
std::string op_params;
@@ -383,8 +378,7 @@ struct test_result {
383
378
test_time = buf;
384
379
385
380
// Set build info
386
- build_commit = LLAMA_COMMIT;
387
- build_number = LLAMA_BUILD_NUMBER;
381
+ build_commit = ggml_commit ();
388
382
}
389
383
390
384
test_result (const std::string& backend_name, const std::string& op_name, const std::string& op_params,
@@ -401,15 +395,14 @@ struct test_result {
401
395
test_time = buf;
402
396
403
397
// Set build info
404
- build_commit = LLAMA_COMMIT;
405
- build_number = LLAMA_BUILD_NUMBER;
398
+ build_commit = ggml_commit ();
406
399
}
407
400
408
401
static const std::vector<std::string> & get_fields () {
409
402
static const std::vector<std::string> fields = {
410
- " test_time" , " build_commit" , " build_number " , " backend_name" , " op_name" , " op_params" , " test_mode " ,
411
- " supported " , " passed " , " error_message " , " time_us " , " flops " ,
412
- " bandwidth_gb_s" , " memory_kb" , " n_runs"
403
+ " test_time" , " build_commit" , " backend_name" , " op_name" , " op_params" ,
404
+ " test_mode " , " supported " , " passed " , " error_message " , " time_us " ,
405
+ " flops " , " bandwidth_gb_s" , " memory_kb" , " n_runs"
413
406
};
414
407
return fields;
415
408
}
@@ -420,7 +413,7 @@ struct test_result {
420
413
if (field == " supported" || field == " passed" ) {
421
414
return BOOL;
422
415
}
423
- if (field == " memory_kb" || field == " n_runs" || field == " build_number " ) {
416
+ if (field == " memory_kb" || field == " n_runs" ) {
424
417
return INT;
425
418
}
426
419
if (field == " time_us" || field == " flops" || field == " bandwidth_gb_s" ) {
@@ -433,7 +426,6 @@ struct test_result {
433
426
return {
434
427
test_time,
435
428
build_commit,
436
- std::to_string (build_number),
437
429
backend_name,
438
430
op_name,
439
431
op_params,
0 commit comments