Skip to content

Deallocate HostIr Op and Test#4286

Merged
nsarka merged 11 commits intoNVIDIA:mainfrom
nsarka:nsarka/hostir-integration-3
Apr 23, 2025
Merged

Deallocate HostIr Op and Test#4286
nsarka merged 11 commits intoNVIDIA:mainfrom
nsarka:nsarka/hostir-integration-3

Conversation

@nsarka
Copy link
Member

@nsarka nsarka commented Apr 21, 2025

This PR adds the Deallocate HostIr, which erases an Allocation from the expression evaluator. It also modifies LaunchKernel to take in preallocated output arguments. Lastly, it adds a gtest which allocates and deallocates a buffer in a loop, then checks the memory used is 0 bytes.

@nsarka nsarka requested review from samnordmann and wujingyue April 21, 2025 22:50
@nsarka nsarka self-assigned this Apr 21, 2025
@nsarka nsarka force-pushed the nsarka/hostir-integration-3 branch from 21b327e to 3216c2b Compare April 21, 2025 22:58
Copy link
Collaborator

@samnordmann samnordmann left a comment

Choose a reason for hiding this comment

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

Thank you!

@nsarka nsarka requested a review from wujingyue April 22, 2025 18:43
@nsarka nsarka force-pushed the nsarka/hostir-integration-3 branch from ec0e3d1 to 7b2a9b0 Compare April 22, 2025 18:43
@nsarka nsarka requested a review from samnordmann April 22, 2025 18:43
nsarka and others added 11 commits April 23, 2025 14:52
@nsarka nsarka force-pushed the nsarka/hostir-integration-3 branch from 23286e1 to 615a825 Compare April 23, 2025 18:52
@nsarka
Copy link
Member Author

nsarka commented Apr 23, 2025

!test

@nsarka nsarka merged commit 515e65e into NVIDIA:main Apr 23, 2025
14 of 16 checks passed
wujingyue added a commit that referenced this pull request Apr 23, 2025
jjsjann123 pushed a commit that referenced this pull request Apr 23, 2025
Reverts #4286 because of http://nv/eF0
nsarka added a commit that referenced this pull request May 5, 2025
Follow-up PR to #4286. The PR will
insert allocate ops for every LaunchKernel output, and also insert a
Deallocate right after the last use of every input expr in the Hostir
container. It adds a test to check the number of Deallocate ops and the
max memory usage is correct for an example fusion as well.

---------

Co-authored-by: Jingyue Wu <wujingyue@gmail.com>
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.

3 participants