From 02bf1e2113f51f18598306e8e351a1cbffbf04b9 Mon Sep 17 00:00:00 2001 From: Hongyu Ning Date: Mon, 24 Jun 2024 15:45:13 +0800 Subject: [PATCH 1/3] [lkvs] [BM/amx] Test Enhance: update gcc amx_fp16 support info update gcc amx_fp16 support info for more accurate and useful reference [Test Components] amx [Test Types] any [Supported Devices] all-generic Signed-off-by: Hongyu Ning --- BM/amx/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BM/amx/README.md b/BM/amx/README.md index 0b5fc8e4..7acc00ca 100644 --- a/BM/amx/README.md +++ b/BM/amx/README.md @@ -18,6 +18,9 @@ It will be checked if the result is correct or not. gcc 11.1 or above is required for amx_bf16, amx_int8 test. gcc 13.3 or above is required for extra amx_fp16 test. + Note: some OS distros has gcc12.3 support extra amx_fp16 test, + you may confirm gcc amx_fp16 support or not by command: + echo 'int main() { asm volatile("tdpfp16ps %tmm2, %tmm1, %tmm0"); return 0; }' | gcc -x c -o /dev/null - To compile, for amx_bf16, amx_int8 test: From 69d0500718f580a8c7835a7f3dea8ce4f2239042 Mon Sep 17 00:00:00 2001 From: Hongyu Ning Date: Mon, 24 Jun 2024 15:46:34 +0800 Subject: [PATCH 2/3] [lkvs] [BM/amx/tests] New Test: add EMR based open anolis tests scenario add EMR based open anolis tests scenario [Test Components] amx [Test Types] any [Supported Devices] all-generic Signed-off-by: Hongyu Ning --- scenario/emr-oa/tests-amx | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 scenario/emr-oa/tests-amx diff --git a/scenario/emr-oa/tests-amx b/scenario/emr-oa/tests-amx new file mode 100644 index 00000000..eb54899a --- /dev/null +++ b/scenario/emr-oa/tests-amx @@ -0,0 +1,56 @@ +# This file collects the AMX(Advanced Matrix eXtension) related instruction tests on +# IntelĀ® Architecture-based platforms. +# @hw_dep: cpuid_check 7 0 0 0 d 24 @ CPU doesn't support AMX-TILE - CPUID.(7.0).EDX[24] +# @hw_dep: cpuid_check 7 0 0 0 d 25 @ CPU doesn't support AMX-INT8 - CPUID.(7.0).EDX[25] +# @hw_dep: cpuid_check 7 0 0 0 d 22 @ CPU doesn't support AMX-BF16 - CPUID.(7.0).EDX[22] +# @hw_dep: cpuid_check d 0 1 0 a 4 @ CPU doesn't support AMX XFD - CPUID.(d.1).EAX[4] + +# Usage:./tmul [OPTIONS] +# -b, --break-reason [1 - 4] +# 0: break by nothing +# 1: break by yield +# 2: break by sleep +# 3: break by trap +# 4: break by signal +# -t, --thread-count [Should not be less than 1] +# -c, --cycle-number [Should not be less than 1] +# -i, --instruction-type [0:TDPBF16PS 1:TDPBSSD 2:TDPBSUD 3:TDPBUSD 4:TDPBUUD] + +# functional tests +tmul -b 0 -t 10 -c 10 -i 0 +tmul -b 1 -t 10 -c 10 -i 0 +tmul -b 2 -t 10 -c 10 -i 0 +tmul -b 3 -t 10 -c 10 -i 0 +tmul -b 4 -t 10 -c 100000 -i 0 +tmul -b 5 -t 10 -c 10 -i 0 +tmul -b 0 -t 10 -c 10 -i 1 +tmul -b 1 -t 10 -c 10 -i 1 +tmul -b 2 -t 10 -c 10 -i 1 +tmul -b 3 -t 10 -c 10 -i 1 +tmul -b 4 -t 10 -c 100000 -i 1 +tmul -b 5 -t 10 -c 10 -i 1 +tmul -b 0 -t 10 -c 10 -i 2 +tmul -b 1 -t 10 -c 10 -i 2 +tmul -b 2 -t 10 -c 10 -i 2 +tmul -b 3 -t 10 -c 10 -i 2 +tmul -b 4 -t 10 -c 100000 -i 2 +tmul -b 5 -t 10 -c 10 -i 2 +tmul -b 0 -t 10 -c 10 -i 3 +tmul -b 1 -t 10 -c 10 -i 3 +tmul -b 2 -t 10 -c 10 -i 3 +tmul -b 3 -t 10 -c 10 -i 3 +tmul -b 4 -t 10 -c 100000 -i 3 +tmul -b 5 -t 10 -c 10 -i 3 +tmul -b 0 -t 10 -c 10 -i 4 +tmul -b 1 -t 10 -c 10 -i 4 +tmul -b 2 -t 10 -c 10 -i 4 +tmul -b 3 -t 10 -c 10 -i 4 +tmul -b 4 -t 10 -c 100000 -i 4 +tmul -b 5 -t 10 -c 10 -i 4 + +# stress tests +tmul -b 1 -t 10000 -c 10 -i 0 +tmul -b 1 -t 10000 -c 10 -i 1 +tmul -b 1 -t 10000 -c 10 -i 2 +tmul -b 1 -t 10000 -c 10 -i 3 +tmul -b 1 -t 10000 -c 10 -i 4 \ No newline at end of file From 5e436ca703993a1ad370522b43a51bbea2693795 Mon Sep 17 00:00:00 2001 From: Hongyu Ning Date: Mon, 24 Jun 2024 15:48:53 +0800 Subject: [PATCH 3/3] [lkvs] [BM/amx/tests] New Test: add EMR based open euler tests scenario add EMR based open euler tests scenario [Test Components] amx [Test Types] any [Supported Devices] all-generic Signed-off-by: Hongyu Ning --- scenario/emr-oe/tests-amx | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 scenario/emr-oe/tests-amx diff --git a/scenario/emr-oe/tests-amx b/scenario/emr-oe/tests-amx new file mode 100644 index 00000000..eb54899a --- /dev/null +++ b/scenario/emr-oe/tests-amx @@ -0,0 +1,56 @@ +# This file collects the AMX(Advanced Matrix eXtension) related instruction tests on +# IntelĀ® Architecture-based platforms. +# @hw_dep: cpuid_check 7 0 0 0 d 24 @ CPU doesn't support AMX-TILE - CPUID.(7.0).EDX[24] +# @hw_dep: cpuid_check 7 0 0 0 d 25 @ CPU doesn't support AMX-INT8 - CPUID.(7.0).EDX[25] +# @hw_dep: cpuid_check 7 0 0 0 d 22 @ CPU doesn't support AMX-BF16 - CPUID.(7.0).EDX[22] +# @hw_dep: cpuid_check d 0 1 0 a 4 @ CPU doesn't support AMX XFD - CPUID.(d.1).EAX[4] + +# Usage:./tmul [OPTIONS] +# -b, --break-reason [1 - 4] +# 0: break by nothing +# 1: break by yield +# 2: break by sleep +# 3: break by trap +# 4: break by signal +# -t, --thread-count [Should not be less than 1] +# -c, --cycle-number [Should not be less than 1] +# -i, --instruction-type [0:TDPBF16PS 1:TDPBSSD 2:TDPBSUD 3:TDPBUSD 4:TDPBUUD] + +# functional tests +tmul -b 0 -t 10 -c 10 -i 0 +tmul -b 1 -t 10 -c 10 -i 0 +tmul -b 2 -t 10 -c 10 -i 0 +tmul -b 3 -t 10 -c 10 -i 0 +tmul -b 4 -t 10 -c 100000 -i 0 +tmul -b 5 -t 10 -c 10 -i 0 +tmul -b 0 -t 10 -c 10 -i 1 +tmul -b 1 -t 10 -c 10 -i 1 +tmul -b 2 -t 10 -c 10 -i 1 +tmul -b 3 -t 10 -c 10 -i 1 +tmul -b 4 -t 10 -c 100000 -i 1 +tmul -b 5 -t 10 -c 10 -i 1 +tmul -b 0 -t 10 -c 10 -i 2 +tmul -b 1 -t 10 -c 10 -i 2 +tmul -b 2 -t 10 -c 10 -i 2 +tmul -b 3 -t 10 -c 10 -i 2 +tmul -b 4 -t 10 -c 100000 -i 2 +tmul -b 5 -t 10 -c 10 -i 2 +tmul -b 0 -t 10 -c 10 -i 3 +tmul -b 1 -t 10 -c 10 -i 3 +tmul -b 2 -t 10 -c 10 -i 3 +tmul -b 3 -t 10 -c 10 -i 3 +tmul -b 4 -t 10 -c 100000 -i 3 +tmul -b 5 -t 10 -c 10 -i 3 +tmul -b 0 -t 10 -c 10 -i 4 +tmul -b 1 -t 10 -c 10 -i 4 +tmul -b 2 -t 10 -c 10 -i 4 +tmul -b 3 -t 10 -c 10 -i 4 +tmul -b 4 -t 10 -c 100000 -i 4 +tmul -b 5 -t 10 -c 10 -i 4 + +# stress tests +tmul -b 1 -t 10000 -c 10 -i 0 +tmul -b 1 -t 10000 -c 10 -i 1 +tmul -b 1 -t 10000 -c 10 -i 2 +tmul -b 1 -t 10000 -c 10 -i 3 +tmul -b 1 -t 10000 -c 10 -i 4 \ No newline at end of file