intel / intel/torch-xpu-ops

[Inductor][XPU] test_snode_runtime.py ComputeBoundedTests/MemoryBoundedTests fail on B60 (runtime estimate returns 0)

Open
#5,124 1 comment 0 reactions 0 assignees View on GitHub
functionality hw: BMG module: inductor test: ut
Dominant language
Python
Stars
113
Forks
128
Avg merge
5d 13h
Merged PRs (30d)
107

Description

## Description
On XPU (device B60), all tests in `test/inductor/test_snode_runtime.py` fail with
the same error, on torch 2.14:

AssertionError: AssertionError not raised

## Impacted cases
| testfile | classname | name |
|---|---|---|
| test/inductor/test_snode_runtime.py | ComputeBoundedTests | test_addmm |
| test/inductor/test_snode_runtime.py | ComputeBoundedTests | test_bmm |
| test/inductor/test_snode_runtime.py | ComputeBoundedTests | test_conv1d |
| test/inductor/test_snode_runtime.py | ComputeBoundedTests | test_conv2d |
| test/inductor/test_snode_runtime.py | ComputeBoundedTests | test_conv2d_transpose |
| test/inductor/test_snode_runtime.py | ComputeBoundedTests | test_conv3d |
| test/inductor/test_snode_runtime.py | ComputeBoundedTests | test_mm |
| test/inductor/test_snode_runtime.py | MemoryBoundedTests | test_dynamic |
| test/inductor/test_snode_runtime.py | MemoryBoundedTests | test_horizontal_reduction_pointwise |
| test/inductor/test_snode_runtime.py | MemoryBoundedTests | test_pointwise |
| test/inductor/test_snode_runtime.py | MemoryBoundedTests | test_relu |

## Root cause (brief)
These tests assert `assertNotZero(calculate_runtime(...))`, where
`calculate_runtime` sums `metrics.node_runtimes` from the inductor scheduler's
runtime estimator. On XPU the estimate comes back as 0.0, so `assertNotZero`
(-> `assertNotEqual(x, 0.0)`) fails, surfacing as "AssertionError not raised".

The scheduler runtime estimate depends on per-device info (peak FLOPS and DRAM
GB/s). The XPU device-info support added in #189819 only populates data for PVC.
On B60 (Battlemage) the device is not covered, so FLOPS/bandwidth resolve to 0
and every node's estimated runtime is 0 -- failing both the compute-bound and
memory-bound tests.

## Fix direction
Add B60 (and other non-PVC XPU devices) to the device-info table / GBps data-sheet
lookup so the runtime estimator returns nonzero FLOPS and DRAM bandwidth.

## Environment
- torch 2.14
- device: B60

Contributor guide

Open the contributing guide

Research direction

Start with test/inductor/test_snode_runtime.py and trace calculate_runtime into the inductor scheduler's runtime estimator. Then inspect the XPU device-info table and GBps data-sheet lookup described in the issue, checking how PVC is populated and why B60 resolves FLOPS and bandwidth to zero. Done means B60 and other non-PVC XPU devices produce nonzero estimates and the listed compute- and memory-bound tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.