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

Add kCall to GetFusibleComputations #21998

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chaserileyroberts
Copy link
Contributor

Previously, we had issues with the stream annotation being applied to non-Gemm operations, and having the compilation fail at IR emitter stage. Operations that normally should've been fused weren't getting fused inside the async computation. This PR is intended to fix this issue by including the call computations when searching for fusible computations.

This was suggested by @jreiffers

@jreiffers
Copy link
Contributor

This affects priority fusion, so we'll probably want a test in priority_fusion_test.cc as well.

@@ -858,6 +858,7 @@ std::vector<HloComputation*> GetFusibleComputations(
// flow. See also fusion_wrapper.cc, which does the same.
if (HloInstruction::MightHaveCalledComputations(instr->opcode()) &&
instr->opcode() != HloOpcode::kWhile &&
instr->opcode() != HloOpcode::kCall &&
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we want to fuse inside all calls. We might want to just enable the async ones you care about for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I broke out this check, now it only applies to calls with stream annotations.

@chaserileyroberts chaserileyroberts force-pushed the chase/fusions_in_async_computation branch from aded974 to a748f44 Compare February 2, 2025 22:03
@chaserileyroberts chaserileyroberts force-pushed the chase/fusions_in_async_computation branch from a748f44 to 1ef97c8 Compare February 2, 2025 22:09
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