-
Notifications
You must be signed in to change notification settings - Fork 435
Removes MPI dependency from MNNVL AllReduce #1379
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
Open
pranavm-nvidia
wants to merge
4
commits into
flashinfer-ai:main
Choose a base branch
from
pranavm-nvidia:no-mpi-ar
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d947167
Removes MPI dependency from MNNVL AllReduce implementation
pranavm-nvidia 694af3a
Adds groups argument to use custom process groups
pranavm-nvidia 5e5410e
Pipes changes to pass group up through API
481e9bc
Applies pre-commit hook
pranavm-nvidia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,18 +51,20 @@ def _get_workspace_dir_name() -> pathlib.Path: | |
FLASHINFER_WORKSPACE_DIR = _get_workspace_dir_name() | ||
FLASHINFER_JIT_DIR = FLASHINFER_WORKSPACE_DIR / "cached_ops" | ||
FLASHINFER_GEN_SRC_DIR = FLASHINFER_WORKSPACE_DIR / "generated" | ||
_package_root = pathlib.Path(__file__).resolve().parents[1] | ||
FLASHINFER_DATA = _package_root / "data" | ||
FLASHINFER_INCLUDE_DIR = _package_root / "data" / "include" | ||
FLASHINFER_CSRC_DIR = _package_root / "data" / "csrc" | ||
# FLASHINFER_SRC_DIR = _package_root / "data" / "src" | ||
FLASHINFER_TVM_BINDING_DIR = _package_root / "data" / "tvm_binding" | ||
FLASHINFER_AOT_DIR = _package_root / "data" / "aot" | ||
# TODO (pranavm): Check if this is right? | ||
# Why were these pointing to non-existent directories? Must be a copy missing somewhere? | ||
_package_root = pathlib.Path(__file__).resolve().parents[2] | ||
FLASHINFER_DATA = _package_root | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc: @yzh119 |
||
FLASHINFER_INCLUDE_DIR = _package_root / "include" | ||
FLASHINFER_CSRC_DIR = _package_root / "csrc" | ||
# FLASHINFER_SRC_DIR = _package_root / "src" | ||
FLASHINFER_TVM_BINDING_DIR = _package_root / "tvm_binding" | ||
FLASHINFER_AOT_DIR = _package_root / "aot" | ||
CUTLASS_INCLUDE_DIRS = [ | ||
_package_root / "data" / "cutlass" / "include", | ||
_package_root / "data" / "cutlass" / "tools" / "util" / "include", | ||
_package_root / "3rdparty" / "cutlass" / "include", | ||
_package_root / "3rdparty" / "cutlass" / "tools" / "util" / "include", | ||
] | ||
SPDLOG_INCLUDE_DIR = _package_root / "data" / "spdlog" / "include" | ||
SPDLOG_INCLUDE_DIR = _package_root / "3rdparty" / "spdlog" / "include" | ||
|
||
|
||
def get_nvshmem_include_dirs(): | ||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pranavm-nvidia , we shouldn't change the logic here.
When you install flashinfer (using pip install), the data folder will be created:
flashinfer/pyproject.toml
Lines 64 to 86 in 40471bf
all of the original paths such as
_package_root / "include"
or_package_root / "3rdparty"
will be gone when you build the packages.If you develop locally in editable mode, you will not see the difference because your package root is the repository path, but if you install flashinfer package on pypi on a new environment, you will find there is no
include
/3rdparty
path in flashinfer package directory, and that why there is adata
path designed to handle these source code dependencies.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I had a feeling it was a setup issue on my end. What's the correct way to test local changes then? Do I always need to reinstall the package when I make a change? I was so far just setting
PYTHONPATH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make editable installations:
and you don't have to reinstall the package for source code changes (because it's editable).