Skip to content

Reset persisting l2 cache - #459

Draft
oleksandr-pavlyk wants to merge 2 commits into
NVIDIA:mainfrom
oleksandr-pavlyk:reset-persisting-l2-cache
Draft

Reset persisting l2 cache#459
oleksandr-pavlyk wants to merge 2 commits into
NVIDIA:mainfrom
oleksandr-pavlyk:reset-persisting-l2-cache

Conversation

@oleksandr-pavlyk

Copy link
Copy Markdown
Collaborator

Closes #458

Introduces --disable-persistent-l2-cache option to opt-in and reset persistent L2-cache state in measure_cold and measure_hot.

For measure_cold (isolated measurements), the reset occurs before L2 is flushed before every launch. The reset is also done for warm-up runs.

For measure_hot (batched measurements), the reset occurs at the start of every batch.

If user opts in, persistent L2-cache state is reset before
timer starts in measure_cold, and before batch executes in
measure_cold.

Warm-up runs also reset persistent L2 cache state.

Reset is performed before L2 flushing to demote persisting
cache lines ahead of flushing to allow them to be flushed as well.
Save the current cudaLimitPersistingL2CacheSize when
--disable-persisting-l2-cache is active, reset persisting L2 state before
cold/hot measurements, and explicitly restore the saved limit after the
measurement scope exits or throws.

Keep the reset helper out of public measurement headers to avoid leaking
the private fmt dependency through nvbench/nvbench.cuh, and add cleanup
guard coverage for the no-device helper path.
@oleksandr-pavlyk

Copy link
Copy Markdown
Collaborator Author

@brycelelbach Please let me know if this is what you had in mind.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide an option to reset persisting-L2 state between benchmark cells

1 participant