-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#12046: Populate/use Buffer ctor "allocate" field in CreateBuffer() &…
… deallocate() - Buffer constructor already had "allocate" field which protected against Buffer::allocate() from being called, and BUFFER_MAP insert. - Now, it's driven by CreateBuffer, added to Shard/Interleave configs, stored as state in Buffer class, and respected by Buffer::deallocate() to early exit if !allocate. - Solves segfault on metal Device::close() in tt-mlir where Buffer is created as view over memory and lifetime (alloc/dealloc) is managed by tt-mlir, but attempted to be deallocated again during teardown, so will be created with allocate=false now.
- Loading branch information
Showing
3 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters