From 59fa1890368a7eb4c370c3160bc85d38f09bb2c4 Mon Sep 17 00:00:00 2001 From: haoliang Date: Thu, 28 Dec 2023 03:48:37 -0500 Subject: [PATCH] [workload-xsave]Supplementary header file 1.Missing uint8_t header file. 2.Supplement useage information. Signed-off-by: Haoliang Zhu --- h origin cmake --force | 26 ++++++++++++++++++++++++++ workload-xsave/work_AVX2.c | 1 + workload-xsave/work_AVX512.c | 1 + workload-xsave/work_DOTPROD.c | 1 + workload-xsave/work_VNNI.c | 1 + workload-xsave/work_VNNI512.c | 1 + workload-xsave/worker_init_avx2.c | 4 +++- workload-xsave/worker_init_dotprod.c | 2 +- workload-xsave/yogini.c | 7 ++++--- 9 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 h origin cmake --force diff --git a/h origin cmake --force b/h origin cmake --force new file mode 100644 index 0000000..0a7e161 --- /dev/null +++ b/h origin cmake --force @@ -0,0 +1,26 @@ +diff --git a/workload-xsave/yogini.c b/workload-xsave/yogini.c +index 7e4b2a7..bd7baf8 100644 +--- a/workload-xsave/yogini.c ++++ b/workload-xsave/yogini.c +@@ -283,7 +283,7 @@ static void cmdline(int argc, char **argv) + case 'f': + clfulsh = 1; + break; +- case '?': ++ case '?': + case 'h': + default: + help(); +diff --git a/workload-xsave/yogini.h b/workload-xsave/yogini.h +index 5a33a27..69a58ff 100644 +--- a/workload-xsave/yogini.h ++++ b/workload-xsave/yogini.h +@@ -74,7 +74,7 @@ struct workload *(*all_register_routines[]) () = { + register_SSE, + register_MEM, + register_memcpy, +-s register_AMX, ++ register_AMX, + NULL + }; + #endif diff --git a/workload-xsave/work_AVX2.c b/workload-xsave/work_AVX2.c index 20f44d3..051ac78 100644 --- a/workload-xsave/work_AVX2.c +++ b/workload-xsave/work_AVX2.c @@ -14,6 +14,7 @@ #include /* CPU_SET */ #include "yogini.h" #include +#include #include #pragma GCC target("avx2,fma") diff --git a/workload-xsave/work_AVX512.c b/workload-xsave/work_AVX512.c index f7884bd..3f2092f 100644 --- a/workload-xsave/work_AVX512.c +++ b/workload-xsave/work_AVX512.c @@ -15,6 +15,7 @@ #include /* CPU_SET */ #include "yogini.h" #include +#include #include #if __GNUC__ >= 11 diff --git a/workload-xsave/work_DOTPROD.c b/workload-xsave/work_DOTPROD.c index 10b2556..b3abac7 100644 --- a/workload-xsave/work_DOTPROD.c +++ b/workload-xsave/work_DOTPROD.c @@ -10,6 +10,7 @@ #include /* CPU_SET */ #include "yogini.h" #include +#include #include #pragma GCC target("avx2,fma") diff --git a/workload-xsave/work_VNNI.c b/workload-xsave/work_VNNI.c index 1af3205..8051a53 100644 --- a/workload-xsave/work_VNNI.c +++ b/workload-xsave/work_VNNI.c @@ -13,6 +13,7 @@ #include /* CPU_SET */ #include "yogini.h" #include +#include #include #if __GNUC__ >= 11 diff --git a/workload-xsave/work_VNNI512.c b/workload-xsave/work_VNNI512.c index 4d123b0..55e8d5a 100644 --- a/workload-xsave/work_VNNI512.c +++ b/workload-xsave/work_VNNI512.c @@ -10,6 +10,7 @@ #include /* CPU_SET */ #include "yogini.h" #include +#include #include #if __GNUC__ >= 9 diff --git a/workload-xsave/worker_init_avx2.c b/workload-xsave/worker_init_avx2.c index e3eaac5..6449ca3 100644 --- a/workload-xsave/worker_init_avx2.c +++ b/workload-xsave/worker_init_avx2.c @@ -3,7 +3,9 @@ * Copyright (c) 2022 Intel Corporation. * Len Brown */ - +#include +#include +#include static int init(struct work_instance *wi) { int i; diff --git a/workload-xsave/worker_init_dotprod.c b/workload-xsave/worker_init_dotprod.c index 2981bc5..537489a 100644 --- a/workload-xsave/worker_init_dotprod.c +++ b/workload-xsave/worker_init_dotprod.c @@ -3,7 +3,7 @@ * Copyright (c) 2022 Intel Corporation. * Len Brown */ - +#include static int init(struct work_instance *wi) { int i; diff --git a/workload-xsave/yogini.c b/workload-xsave/yogini.c index 8d49e68..bd7baf8 100644 --- a/workload-xsave/yogini.c +++ b/workload-xsave/yogini.c @@ -264,12 +264,11 @@ static void cmdline(int argc, char **argv) progname = argv[0]; + if (argc == 1) help(); + while ((opt = getopt_long_only(argc, argv, "h:w:r:b:f", long_options, &option_index)) != -1) { switch (opt) { - case 'h': - help(); - break; case 'w': if (parse_work_cmd(optarg)) help(); @@ -284,6 +283,8 @@ static void cmdline(int argc, char **argv) case 'f': clfulsh = 1; break; + case '?': + case 'h': default: help(); }