Skip to content

[release/2.10] Some models inductor performance dropped ~ 10% - 30% #2619

@mengfei25

Description

@mengfei25

🐛 Describe the bug

Inductor latency (2.9/2.10) Eager latency (2.9/2.10) Model Category
0.72610501 1.025510577 hf_T5 torchbench_amp_fp16_training
0.73099026 1.03495716 T5ForConditionalGeneration huggingface_amp_fp16_training
0.735776757 1.041661775 T5Small huggingface_amp_fp16_training
0.737908893 1.022629232 hf_T5_large torchbench_amp_fp16_training
0.73895893 1.101044035 hf_Bert_large torchbench_amp_fp16_training
0.740390088 1.014260415 hf_T5 torchbench_amp_bf16_training
0.744329785 1.009002422 T5Small huggingface_amp_bf16_training
0.744863203 1.021090637 hf_T5_base torchbench_amp_fp16_training
0.745682418 1.020768778 T5ForConditionalGeneration huggingface_amp_bf16_training
0.756941149 0.997778599 hf_T5_base torchbench_amp_bf16_training
0.766096062 0.999174179 hf_T5_large torchbench_amp_bf16_training
0.777368912 1.03257717 RobertaForCausalLM huggingface_amp_fp16_training
0.781435989 1.067483312 hf_Bert_large torchbench_amp_bf16_training
0.781447491 1.072060631 hf_Bert torchbench_amp_fp16_training
0.790601984 1.015495208 nvidia_deeprecommender torchbench_bfloat16_training
0.792600022 1.029893407 nvidia_deeprecommender torchbench_float16_training
0.793479222 1.026854581 RobertaForCausalLM huggingface_amp_bf16_training
0.797416575 1.065162481 hf_Bert torchbench_amp_bf16_training
0.817952188 1.058941128 hf_DistilBert torchbench_amp_fp16_training
0.821282005 1.027905051 nvidia_deeprecommender torchbench_float32_training
0.828940716 0.936525048 cm3leon_generate torchbench_amp_bf16_inference
0.832581429 1.012749187 cait_m36_384 timm_models_amp_fp16_training
0.832634247 1.019993632 hf_DistilBert torchbench_amp_bf16_training
0.834760191 1.003724431 MegatronBertForCausalLM huggingface_amp_bf16_training
0.835253899 1.080106732 BertForMaskedLM huggingface_amp_fp16_training
0.83819159 0.997527805 cait_m36_384 timm_models_amp_bf16_training
0.838499532 1.033842331 MegatronBertForCausalLM huggingface_amp_fp16_training
0.839248456 0.917759385 cm3leon_generate torchbench_bfloat16_inference
0.84319389 1.01168299 MegatronBertForQuestionAnswering huggingface_amp_bf16_training
0.854570411 1.080008059 BertForMaskedLM huggingface_amp_bf16_training
0.854633055 1.046595918 MegatronBertForCausalLM huggingface_float16_training
0.854841305 1.035040232 MegatronBertForQuestionAnswering huggingface_amp_fp16_training
0.857927257 1.077568317 hf_Bert_large torchbench_float16_training
0.858227582 1.085429821 nfnet_l0 timm_models_amp_bf16_training
0.860412414 1.045948918 hf_Bert_large torchbench_bfloat16_training
0.86220791 1.058394598 RobertaForCausalLM huggingface_float16_training
0.862822993 1.10097243 nfnet_l0 timm_models_amp_fp16_training
0.865090223 1.063423975 hf_Bert torchbench_bfloat16_training
0.86656158 1.013820158 MegatronBertForCausalLM huggingface_bfloat16_training
0.867096966 1.063023382 MegatronBertForQuestionAnswering huggingface_float16_training
0.867672465 1.058526803 MegatronBertForQuestionAnswering huggingface_bfloat16_training
0.869067316 1.007590129 hf_T5 torchbench_bfloat16_inference
0.869479568 1.032627504 RobertaForCausalLM huggingface_bfloat16_training
0.870200174 1.035579506 LayoutLMForMaskedLM huggingface_amp_fp16_training
0.871785239 1.007962757 hf_T5_large torchbench_bfloat16_training
0.872581665 1.012940341 hf_T5 torchbench_float16_inference
0.875032542 1.084723548 timm_nfnet torchbench_amp_bf16_training
0.876608108 1.077426002 hf_Bert torchbench_float16_training
0.876685353 1.00108782 PLBartForConditionalGeneration huggingface_amp_bf16_training
0.876690161 1.015495415 LayoutLMForMaskedLM huggingface_amp_bf16_training
0.88035635 1.101150998 dm_nfnet_f0 timm_models_amp_fp16_training
0.882346621 1.021002982 hf_DistilBert torchbench_bfloat16_training
0.884984897 1.012550166 volo_d1_224 timm_models_amp_bf16_inference
0.888364965 1.102525905 nfnet_l0 timm_models_bfloat16_training
0.889071522 1.097869058 BertForMaskedLM huggingface_float16_training
0.890791743 1.021974958 LayoutLMForMaskedLM huggingface_bfloat16_training
0.891880454 1.059520152 LayoutLMForMaskedLM huggingface_float16_training
0.893603208 1.088030044 BertForQuestionAnswering huggingface_amp_fp16_training
0.89649246 0.999278129 hf_T5 torchbench_bfloat16_training
0.896948944 1.073180417 tnt_s_patch16_224 timm_models_float16_inference
0.899363278 1.074808448 jx_nest_base timm_models_amp_fp16_inference

Reproducer

docker run -it --device=/dev/mem --device=/dev/dri --group-add video --privileged --shm-size=8g intelgpu/ubuntu-24.04-lts2:2523.31 bash

apt update
apt install python3-dev python3-venv python3-pip
python3 -m venv myvenv
source myvenv/bin/activate

pip install torch==2.10.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/xpu
# pip install torch==2.9.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu

git clone https://github.com/pytorch/pytorch
cd pytorch
git checkout v2.10.0-rc1
git clone https://github.com/intel/torch-xpu-ops
cp torch-xpu-ops/.ci/benchmarks/timm_models_list.txt benchmarks/dynamo/timm_models_list.txt

pip install timm==1.0.19 pandas psutil scipy

python benchmarks/dynamo/timm_models.py --training --bfloat16 -d xpu -n10 --performance --disable-cudagraphs --batch-size 4 --only beit_base_patch16_224 --cold-start-latency --backend=inductor

Versions

View detailed

Collecting environment information...
PyTorch version: 2.10.0+xpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35

Python version: 3.10.19 (main, Oct 10 2025, 01:02:36) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.0-153-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
Is XPU available: True
XPU used to build PyTorch: 20250301
Intel GPU driver version:

  • intel-opencl-icd: 25.18.33578.38-1146~22.04
  • libze1: 1.21.9.0-1136~22.04
    Intel GPU models onboard:
    N/A
    Intel GPU models detected:
  • [0] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, uuid=8680da0b-2f00-0000-0f00-000000000000, driver_version='1.6.33578+38', total_memory=49136MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
  • [1] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, uuid=8680da0b-2f00-0000-1600-000000000000, driver_version='1.6.33578+38', total_memory=49136MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
  • [2] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, uuid=8680da0b-2f00-0000-1a00-000000000000, driver_version='1.6.33578+38', total_memory=49136MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
  • [3] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, uuid=8680da0b-2f00-0000-1e00-000000000000, driver_version='1.6.33578+38', total_memory=49136MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
  • [4] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, uuid=8680da0b-2f00-0000-8a00-000000000000, driver_version='1.6.33578+38', total_memory=49136MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
  • [5] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, uuid=8680da0b-2f00-0000-8e00-000000000000, driver_version='1.6.33578+38', total_memory=49136MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
  • [6] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, uuid=8680da0b-2f00-0000-c000-000000000000, driver_version='1.6.33578+38', total_memory=49136MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
  • [7] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, uuid=8680da0b-2f00-0000-c400-000000000000, driver_version='1.6.33578+38', total_memory=49136MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
    HIP runtime version: N/A
    MIOpen runtime version: N/A
    Is XNNPACK available: True
    Caching allocator config: N/A

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 192
On-line CPU(s) list: 0-191
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Platinum 8468V
CPU family: 6
Model: 143
Thread(s) per core: 2
Core(s) per socket: 48
Socket(s): 2
Stepping: 8
Frequency boost: enabled
CPU max MHz: 2401.0000
CPU min MHz: 800.0000
BogoMIPS: 4800.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 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 vnmi 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 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 amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 4.5 MiB (96 instances)
L1i cache: 3 MiB (96 instances)
L2 cache: 192 MiB (96 instances)
L3 cache: 195 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-47,96-143
NUMA node1 CPU(s): 48-95,144-191
Vulnerability Gather data sampling: Not affected
Vulnerability Indirect target selection: 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 and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB disabled; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

Versions of relevant libraries:
[pip3] dpcpp-cpp-rt==2025.3.1
[pip3] impi-rt==2021.17.0
[pip3] intel-cmplr-lib-rt==2025.3.1
[pip3] intel-cmplr-lib-ur==2025.3.1
[pip3] intel-cmplr-lic-rt==2025.3.1
[pip3] intel-opencl-rt==2025.3.1
[pip3] intel-openmp==2025.3.1
[pip3] intel-pti==0.15.0
[pip3] intel-sycl-rt==2025.3.1
[pip3] mkl==2025.3.0
[pip3] numpy==1.26.4
[pip3] oneccl==2021.17.1
[pip3] oneccl-devel==2021.17.1
[pip3] onemkl-license==2025.3.0
[pip3] onemkl-sycl-blas==2025.3.0
[pip3] onemkl-sycl-dft==2025.3.0
[pip3] onemkl-sycl-lapack==2025.3.0
[pip3] onemkl-sycl-rng==2025.3.0
[pip3] onemkl-sycl-sparse==2025.3.0
[pip3] tbb==2022.3.0
[pip3] tcmlib==1.4.1
[pip3] torch==2.10.0+xpu
[pip3] torchao==0.15.0+git252d1db7
[pip3] torchaudio==2.10.0+xpu
[pip3] torchvision==0.25.0+xpu
[pip3] triton-xpu==3.6.0
[pip3] umf==1.0.2
[conda] Could not collect

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions