Skip to content

Enable profiler tests for XPU device. - #193961

Closed
kdrozd-dev wants to merge 7 commits into
pytorch:mainfrom
kdrozd-dev:xpu-profiler-native-tests
Closed

kdrozd-dev wants to merge 7 commits into
pytorch:mainfrom
kdrozd-dev:xpu-profiler-native-tests

Conversation

@kdrozd-dev

@kdrozd-dev kdrozd-dev commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Adjust test/profiler/test_cpp_thread.py, test/profiler/test_kineto.py, test/profiler/test_memory_profiler.py, test/profiler/test_profiler.py to work with XPU devices. Added test_profiler_with_xpu_graph to test/profiler/test_xpu_profiler.py it test profiler and xpu graph coexistence similar to test_cudagraph_profiling_workaround. Also removed "profiler/test_memory_profiler", from XPU_BLOCKLIST in test/run_test.py to reflect the enablement. Also added a fix to torch/profiler/_memory_profiler.py so it works correctly with XPU high-bit addresses.

Skipped:

  • test_forked_process as it hangs on XPU after the changes to setUpModule. Will investigate internally.

Rest of the affected UTs work fine from my testing.

@pytorch-bot

pytorch-bot Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/193961

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Unrelated Failure

As of commit fe860ee with merge base a0afa8e (image):

NEW FAILURE - The following job has failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@kdrozd-dev

Copy link
Copy Markdown
Contributor Author

@gujinghui could you take a look?

@chuanqi129 chuanqi129 added the ciflow/xpu Run XPU CI tasks label Sep 4, 2026

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pointer normalization is important for XPU memory profiling: allocation events expose signed intptr_t while tensor metadata carries the same address unsigned, so canonicalising before TensorKey construction prevents false identity splits. The explicit negative-pointer regression pins that representation boundary.

@kdrozd-dev

Copy link
Copy Markdown
Contributor Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Sep 7, 2026
@kdrozd-dev

Copy link
Copy Markdown
Contributor Author

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased xpu-profiler-native-tests onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout xpu-profiler-native-tests && git pull --rebase)

@pytorchmergebot
pytorchmergebot force-pushed the xpu-profiler-native-tests branch from d1da133 to 6dc56cd Compare September 7, 2026 10:41
@pytorch-bot

pytorch-bot Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@aostrowski-hbn

Copy link
Copy Markdown
Contributor

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased xpu-profiler-native-tests onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout xpu-profiler-native-tests && git pull --rebase)

@pytorchmergebot
pytorchmergebot force-pushed the xpu-profiler-native-tests branch from 6dc56cd to 52e7dc3 Compare September 9, 2026 14:10
@kdrozd-dev

Copy link
Copy Markdown
Contributor Author

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased xpu-profiler-native-tests onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout xpu-profiler-native-tests && git pull --rebase)

@pytorchmergebot
pytorchmergebot force-pushed the xpu-profiler-native-tests branch from 52e7dc3 to e352b6b Compare September 16, 2026 07:25
@kdrozd-dev

Copy link
Copy Markdown
Contributor Author

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased xpu-profiler-native-tests onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout xpu-profiler-native-tests && git pull --rebase)

@kdrozd-dev
kdrozd-dev force-pushed the xpu-profiler-native-tests branch from 529b383 to fe860ee Compare September 24, 2026 08:42
@kdrozd-dev kdrozd-dev closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

7 participants