Repository: pytorch
Issue: [Intel GPU] Lower FLOPs and Bandwidth on Arc 770 
Labels: module: performance,triaged,module: xpu

### 🐛 Describe the bug

Just installed pytorch nightly on my Arc 770 using 

```
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu
```

Then ran benchmarks from here: https://github.com/chsasank/device-benchmarks/blob/main/benchmark.py. Note this just runs matrix multiplication and transfers data. Uses this data to measure FLOPs and Bandwidth. Here are the results from latest nightly build:

```
$ python benchmark.py --device xpu
benchmarking xpu using torch.float32
size, elapsed_time, tops
256, 0.0069244384765625, 0.004845798271379462
304, 0.002539801597595215, 0.022123353278146574
362, 0.004217314720153809, 0.02249674551121473
430, 0.008111000061035156, 0.019604734163903587
512, 0.00036540031433105467, 0.7346338945860786
608, 0.0036220550537109375, 0.12410397338921117
724, 0.003701186180114746, 0.20507124231628598
861, 0.0007224798202514649, 1.7669071525841162
1024, 0.0007423639297485351, 2.892763996127113
1217, 0.008987903594970703, 0.40109137663839733
1448, 0.0017016172409057618, 3.56840224583519
1722, 0.002590465545654297, 3.942317670710634
2048, 0.014739584922790528, 1.1655599037552458
2435, 0.013725566864013671, 2.10376198200649
2896, 0.010750722885131837, 4.518434601191407
3444, 0.01745932102203369, 4.679420503517582
4096, 0.03862507343292236, 3.55828329260477
4870, 0.05322179794311523, 4.340375840870714
5792, 0.08510377407073974, 4.5663251767539625
6888, 0.14098265171051025, 4.636003296959369
size (GB), elapsed_time, bandwidth (GB/s)
0.004194304, 0.00010600090026855469, 79.1371392011516
0.00593164, 0.00011386871337890626, 104.18384161876047
0.008388608, 0.000136566162109375, 122.85046120402235
0.01186328, 0.00016207695007324218, 146.39071125954695
0.016777216, 0.00019686222076416017, 170.4462738952743
0.023726564, 0.0002469778060913086, 192.13519121817936
0.033554432, 0.00031595230102539064, 212.40188402554782
0.047453132, 0.00041806697845458984, 227.01210306259253
0.067108864, 0.0005616903305053711, 238.95324649658812
0.094906264, 0.0007654428482055664, 247.9774008536091
0.134217728, 0.0010532855987548829, 254.85533678360812
0.189812528, 0.0014489173889160156, 262.00600455489763
0.268435456, 0.001987719535827637, 270.0938952015986
0.37962506, 0.002787351608276367, 272.39122532858437
```

This is significantly lower than my own benchmarks on IPEX from a few months ago (used to get 15 fp32 tflops and 512 GB/s).

### Versions

Collecting environment information...
PyTorch version: 2.6.0.dev20240919+xpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.10.0 (default, Mar  3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-6.8.0-40-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        39 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               12
On-line CPU(s) list:                  0-11
Vendor ID:                            GenuineIntel
Model name:                           12th Gen Intel(R) Core(TM) i5-12400
CPU family:                           6
Model:                                151
Thread(s) per core:                   2
Core(s) per socket:                   6
Socket(s):                            1
Stepping:                             5
CPU max MHz:                          4400.0000
CPU min MHz:                          800.0000
BogoMIPS:                             4992.00
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 est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            288 KiB (6 instances)
L1i cache:                            192 KiB (6 instances)
L2 cache:                             7.5 MiB (6 instances)
L3 cache:                             18 MiB (1 instance)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-11
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] pytorch-triton-xpu==3.1.0+91b14bf559
[pip3] torch==2.6.0.dev20240919+xpu
[pip3] torchaudio==2.5.0.dev20240919+xpu
[pip3] torchvision==0.20.0.dev20240919+xpu
[pip3] triton==2.2.0
[conda] pytorch-triton-xpu        3.1.0+91b14bf559          pypi_0    pypi
[conda] torch                     2.6.0.dev20240919+xpu          pypi_0    pypi
[conda] torchaudio                2.5.0.dev20240919+xpu          pypi_0    pypi
[conda] torchvision               0.20.0.dev20240919+xpu          pypi_0    pypi

cc @msaroufim @gujinghui @EikanWang @fengyuan14 @guangyey