Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conv2dConfig reallocate_halo_output default to true #16185

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

pavlejosipovic
Copy link
Contributor

@pavlejosipovic pavlejosipovic commented Dec 19, 2024

Idea behind this flag is to enable reallocation of halo output buffer in place of input buffer if case deallocate_activation flag is also set.
In this case halo output is moved up and memory
fragmentation is reduced.

In case deallocate_activation is not set reallocate_halo_output won't have an effect as ttnn::move will be a no-op since input buffer is not deallocated.

Current problem is that if user sets deallocate_activation it doesn't help them with memory issue unless they set reallocate_halo_output as well.

This change is addressing this by setting reallocate_halo_output to true by default.

This helps by increasing pass rate in ttnn torch
traces.

Checklist

@pavlejosipovic pavlejosipovic force-pushed the pjosipovic/halo_reallocate branch 2 times, most recently from ad4f79c to b26c6c2 Compare December 23, 2024 09:01
Idea behind this flag is to enable reallocation of
halo output buffer in place of input buffer if case
deallocate_activation flag is also set.
In this case halo output is moved up and memory
fragmentation is reduced.

In case deallocate_activation is not set reallocate_halo_output
won't have an effect as ttnn::move will be a no-op
since input buffer is not deallocated.

Current problem is that if user sets deallocate_activation
it doesn't help them with memory issue unless they
set reallocate_halo_output as well.

This change is addressing this by setting reallocate_halo_output
to true by default.

This helps by increassing pass rate in ttnn torch
traces.
@pavlejosipovic pavlejosipovic force-pushed the pjosipovic/halo_reallocate branch from b26c6c2 to 51652b4 Compare January 7, 2025 11:44
@pavlejosipovic pavlejosipovic merged commit 16ff6f0 into main Jan 7, 2025
236 of 238 checks passed
@pavlejosipovic pavlejosipovic deleted the pjosipovic/halo_reallocate branch January 7, 2025 14:34
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.

2 participants