-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
31 lines (26 loc) · 964 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import glob
import os
from setuptools import find_packages, setup
from torch.utils.cpp_extension import CUDAExtension, BuildExtension
setup(
name=f"lpmm",
description="low-bit optimizers.",
keywords="gpu optimizers optimization low-bit quantization compression",
url="https://github.com/thu-ml/low-bit-optimizers",
packages=find_packages(),
cmdclass={'build_ext': BuildExtension},
ext_modules=[
CUDAExtension(
'lpmm.cpp_extension.quantization',
['lpmm/cpp_extension/quantization.cc', 'lpmm/cpp_extension/quantization_kernel.cu']
),
CUDAExtension(
'lpmm.cpp_extension.fused_adamw',
['lpmm/cpp_extension/fused_adamw.cc', 'lpmm/cpp_extension/fused_adamw_kernel.cu']
),
],
)