Skip to content

Use HAS_CUPTI_RANGE_PROFILER to avoid range profiler init#1298

Closed
divyanshk wants to merge 1 commit intomainfrom
export-D94610428
Closed

Use HAS_CUPTI_RANGE_PROFILER to avoid range profiler init#1298
divyanshk wants to merge 1 commit intomainfrom
export-D94610428

Conversation

@divyanshk
Copy link
Copy Markdown
Contributor

Summary:
Range profiler initialization (CuptiRangeProfilerInit) was running whenever HAS_CUPTI was defined, even when HAS_CUPTI_RANGE_PROFILER was not defined (i.e., range profiler is not actually supported).

That is bad because

  1. This would be causing unnecessary memory allocation for unique_ptr rangeProfilerInit.
  2. It leads to registration of CuptiRangeProfilerConfig factory

Reviewed By: aaronenyeshi, scotts

Differential Revision: D94610428

Summary:
Range profiler initialization (CuptiRangeProfilerInit) was running whenever HAS_CUPTI was defined, even when HAS_CUPTI_RANGE_PROFILER was not defined (i.e., range profiler is not actually supported).

That is bad because
1. This would be causing unnecessary memory allocation for unique_ptr rangeProfilerInit.
2. It leads to registration of CuptiRangeProfilerConfig factory

Reviewed By: aaronenyeshi, scotts

Differential Revision: D94610428
@meta-cla meta-cla Bot added the cla signed label Mar 11, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 11, 2026

@divyanshk has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94610428.

Copy link
Copy Markdown
Member

@aaronenyeshi aaronenyeshi left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 11, 2026

This pull request has been merged in 1f9ceb1.

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.

3 participants