Skip to content

Add XPU toggleCollectionDynamic mechanism#1410

Draft
PawelSwider2000 wants to merge 1 commit into
pytorch:mainfrom
intel-staging:dev/pawelswi/toggle-collection
Draft

Add XPU toggleCollectionDynamic mechanism#1410
PawelSwider2000 wants to merge 1 commit into
pytorch:mainfrom
intel-staging:dev/pawelswi/toggle-collection

Conversation

@PawelSwider2000

Copy link
Copy Markdown
Contributor

Fixes: intel/torch-xpu-ops#3479

PR fixing test_dynamic_toggle for XPU.

Mark IActivityProfilerSession::toggleCollectionDynamic(bool) as virtual and make sure it will be called from: GenericActivityProfiler::toggleCollectionDynamic(const bool enable) for properly handling of dynamic toggle mechanism for XPU Profiler

@meta-cla meta-cla Bot added the cla signed label May 20, 2026
@PawelSwider2000

Copy link
Copy Markdown
Contributor Author

@gujinghui Please review

// Both to prevent the synchronization event from showing up in traces.
if (!enable) {
for (auto& session : sessions_) {
session->toggleCollectionDynamic(enable);

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.

Can we have explicit false here instead of enable being false? Currently this can be misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[release/2.13] [upstream_ut] profiler/test_profiler.py AssertionError: False is not true

2 participants