Skip to content

fix: initialize lamport buffer only once after creating new workspace#1111

Merged
yyihuang merged 7 commits intoflashinfer-ai:mainfrom
yyihuang:fix_lamport_init
Jun 4, 2025
Merged

fix: initialize lamport buffer only once after creating new workspace#1111
yyihuang merged 7 commits intoflashinfer-ai:mainfrom
yyihuang:fix_lamport_init

Conversation

@yyihuang
Copy link
Copy Markdown
Collaborator

@yyihuang yyihuang commented Jun 3, 2025

📌 Description

Lamport buffer should be initialized to neg_zero only once after creating new workspace. No need to re-init between each all-reduce.

🔍 Related Issues

related PRs: #1096

🚀 Pull Request Checklist

Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete.

✅ Pre-commit Checks

  • I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • I have installed the hooks with pre-commit install.
  • I have run the hooks manually with pre-commit run --all-files and fixed any reported issues.

If you are unsure about how to set up pre-commit, see the pre-commit documentation.

🧪 Tests

  • Tests have been added or updated as needed.
  • All tests are passing (unittest, etc.). Note: replace assertion to printed error message.

Reviewer Notes

@yyihuang yyihuang requested a review from yzh119 June 3, 2025 20:29
Copy link
Copy Markdown
Collaborator

@yzh119 yzh119 left a comment

Choose a reason for hiding this comment

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

LGTM, the tolerance for bf16 seems look too high to me, we will investigate it later.

Comment thread tests/test_trtllm_allreduce.py Outdated
Comment thread tests/test_trtllm_allreduce.py Outdated
@yyihuang yyihuang merged commit 4e8bb77 into flashinfer-ai:main Jun 4, 2025
2 checks passed
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