Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: deepspeedai/DeepSpeed
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: abacusai/DeepSpeed
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 3 commits
  • 1 file changed
  • 1 contributor

Commits on Aug 26, 2024

  1. Allow triton==3.0.x for fp_quantizer

    Tested with triton==3.0.x and the kernel tests pass so adding as an allowed version.
    siddartha-RE authored Aug 26, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    097f525 View commit details

Commits on Aug 27, 2024

  1. Fix variable name

    siddartha-RE committed Aug 27, 2024
    Copy the full SHA
    a628f12 View commit details
  2. Pre-commit fixes

    siddartha-RE committed Aug 27, 2024
    Copy the full SHA
    ed8a765 View commit details
Showing with 10 additions and 6 deletions.
  1. +10 −6 op_builder/fp_quantizer.py
16 changes: 10 additions & 6 deletions op_builder/fp_quantizer.py
Original file line number Diff line number Diff line change
@@ -49,23 +49,27 @@ def is_compatible(self, verbose=False):
import triton
except ImportError:
if verbose:
self.warning(f"please install triton==2.3.0 or 2.3.1 if you want to use the FP Quantizer Kernels")
self.warning(
f"please install triton==2.3.0, 2.3.1 or 3.0.0 if you want to use the FP Quantizer Kernels")
return False

# triton 2.3.0 and 2.3.1 are okay and the only versions released in 2.3.x before 3.x was released
# triton 2.3.{0,1} and 3.0.0 are ok.
allowed_versions = ("2.3", "3.0")
if pkg_version:
allowed = pkg_version.parse("2.3")
allowed = (pkg_version.parse(v) for v in allowed_versions)
installed_triton = pkg_version.parse(triton.__version__)
triton_mismatch = installed_triton.major != allowed.major or installed_triton.minor != allowed.minor
triton_mismatch = all(installed_triton.major != a.major or installed_triton.minor != a.minor
for a in allowed)
else:
installed_triton = triton.__version__
major, minor, _ = installed_triton.split(".")
triton_mismatch = major != "2" or minor != "3"
allowed = (v.split(".") for v in allowed_versions)
triton_mismatch = all(major != v[0] or minor != v[1] for v in allowed)

if triton_mismatch:
if verbose:
self.warning(
f"FP Quantizer is using an untested triton version ({installed_triton}), only 2.3.0 and 2.3.1 are known to be compatible with these kernels"
f"FP Quantizer is using an untested triton version ({installed_triton}), only 2.3.{0,1} and 3.0.0 are known to be compatible with these kernels"
)
return False