-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cherry-pick-fdee903f' into 'core_r0.7.0'
Merge branch 'gg_guard' into 'main' See merge request ADLR/megatron-lm!1516
- Loading branch information
Showing
1 changed file
with
11 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. | ||
|
||
from importlib.metadata import version | ||
|
||
from pkg_resources import packaging | ||
|
||
try: | ||
import grouped_gemm | ||
except ImportError: | ||
|
@@ -13,7 +17,13 @@ def grouped_gemm_is_available(): | |
def assert_grouped_gemm_is_available(): | ||
assert grouped_gemm_is_available(), ( | ||
"Grouped GEMM is not available. Please run " | ||
"`pip install git+https://github.com/fanshiqing/[email protected]`." | ||
"`pip install git+https://github.com/fanshiqing/[email protected]`." | ||
) | ||
|
||
_gg_version = packaging.version.Version(version("grouped_gemm")) | ||
assert _gg_version >= packaging.version.Version("1.1.2"), ( | ||
"Grouped GEMM should be v1.1.2 or newer. Please run " | ||
"`pip install git+https://github.com/fanshiqing/[email protected]`." | ||
) | ||
|
||
|
||
|