Skip to content

Commit ae9d934

Browse files
xinhe3ulivne
authored andcommitted
[SW-192931] align setup.py with github INC and remove fp8_convert
Change-Id: Ibbc157646cfcfad64b323ecfd96b9bbda5ba9e2f Signed-off-by: xinhe3 <[email protected]>
1 parent a92d70a commit ae9d934

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

setup.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def get_build_version():
2828
return __version__
2929
try:
3030
result = subprocess.run(["git", "describe", "--tags"], capture_output=True, text=True, check=True)
31-
distance = result.stdout.strip().split("-")[-2]
32-
commit = result.stdout.strip().split("-")[-1]
31+
_, distance, commit = result.stdout.strip().split("-")
3332
return f"{__version__}.dev{distance}+{commit}"
3433
except subprocess.CalledProcessError:
3534
return __version__
@@ -185,17 +184,6 @@ def get_build_version():
185184
sys.argv.remove("ort")
186185
cfg_key = "neural_compressor_3x_ort"
187186

188-
if bool(os.getenv("USE_FP8_CONVERT", False)):
189-
from torch.utils.cpp_extension import BuildExtension, CppExtension
190-
191-
ext_modules = [
192-
CppExtension(
193-
"fp8_convert",
194-
["neural_compressor/torch/algorithms/habana_fp8/tensor/convert.cpp"],
195-
),
196-
]
197-
cmdclass = {"build_ext": BuildExtension}
198-
199187
project_name = PKG_INSTALL_CFG[cfg_key].get("project_name")
200188
include_packages = PKG_INSTALL_CFG[cfg_key].get("include_packages") or {}
201189
package_data = PKG_INSTALL_CFG[cfg_key].get("package_data") or {}
@@ -211,15 +199,16 @@ def get_build_version():
211199
description="Repository of Intel® Neural Compressor",
212200
long_description=open("README.md", "r", encoding="utf-8").read(),
213201
long_description_content_type="text/markdown",
202+
keywords="quantization,auto-tuning,post-training static quantization,"
203+
"post-training dynamic quantization,quantization-aware training",
214204
license="Apache 2.0",
215-
keywords="quantization",
216-
url="",
205+
url="https://github.com/intel/neural-compressor",
217206
packages=include_packages,
218207
include_package_data=True,
219208
package_data=package_data,
220209
install_requires=install_requires,
221-
ext_modules=ext_modules, # for fp8
222-
cmdclass=cmdclass, # for fp8
210+
ext_modules=ext_modules,
211+
cmdclass=cmdclass,
223212
entry_points=entry_points,
224213
extras_require=extras_require,
225214
python_requires=">=3.7.0",

0 commit comments

Comments
 (0)