Open a3213105 opened 1 day ago
Hi team, I confirmed this is regression issue on both of SPR and EMR.
Linux ortce-emr3 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0
only main branch applied "--attr-acc-mode=bf16" option.
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns="http://www.w3.org/TR/REC-html40">
Summary
BF16 Softmax on EMR got 40% performance regression after V3.5 "enable scratchpad for non-f32 dst dt" Below is the reproducing step, we can see that after commit ad99c73b3ee195e4d60384a6bf56b3cf78186665, the average latency of softmax slowdown from 0.198575ms to 0.337924 ms
performance of commit e2d4a8cf82bbe9c4d16b0a313cb9213c294eb036 $ numactl -N 1 ./tests/benchdnn/benchdnn --soft max --mode=p --dir=FWD_I --sdt=bf16 --ddt=bf16 --stag=abcd --dtag=abcd --alg=SOFTMAX -- axis=3 64x16x100x100 Output template: perf,%engine%,%impl%,%name%,%prb%,%Gops%,%+ctime%,%-time%,%-Gflops%,%0time%,%0Gflops% perf,cpu,jit:avx10_1_512,,--mode=P --softmax --dir=FWD_I --sdt=bf16 --ddt=bf16 --stag=abcd --dtag=abcd --axis=3 64x16x100x100,0,0.495605,0.18042,0,0.198575,0 tests:1 passed:1 skipped:0 mistrusted:0 unimplemented:0 invalid_arguments:0 failed:0 listed:0 total perf: min(ms):0.18042 avg(ms):0.198575 total: 3.41s; fill: 0.39s (11%);
performance of commit ad99c73b3ee195e4d60384a6bf56b3cf78186665 $ numactl -N 1 ./tests/benchdnn/benchdnn --softmax --mode=p --dir=FWD_I --sdt=bf16 --ddt=bf16 --stag=abcd --dtag=abcd --alg=SOFTMAX --axis=3 64x16x100x100 Output template: perf,%engine%,%impl%,%name%,%prb%,%Gops%,%+ctime%,%-time%,%-Gflops%,%0time%,%0Gflops% perf,cpu,jit:avx10_1_512,,--mode=P --softmax --dir=FWD_I --sdt=bf16 --ddt=bf16 --stag=abcd --dtag=abcd --axis=3 64x16x100x100,0,0.455322,0.287598,0,0.337924,0 tests:1 passed:1 skipped:0 mistrusted:0 unimplemented:0 invalid_arguments:0 failed:0 listed:0 total perf: min(ms):0.287598 avg(ms):0.337924 total: 3.40s; fill: 0.39s (11%);
Environment
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Linux emr-qs-01 6.5.0-44-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 18 14:36:16 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
cmake version 3.27.5