Skip to content

Commit aea2356

Browse files
authored
Set the url to pytorch/ao and clean up some duplication (#1446)
1 parent 1beb6d0 commit aea2356

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed

setup.py

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -64,36 +64,29 @@ def get_extensions():
6464
use_cuda = torch.cuda.is_available() and CUDA_HOME is not None
6565
extension = CUDAExtension if use_cuda else CppExtension
6666

67+
extra_link_args = []
68+
extra_compile_args = {
69+
"nvcc": [
70+
"-O3" if not debug_mode else "-O0",
71+
"-t=0",
72+
]
73+
}
74+
6775
if not IS_WINDOWS:
68-
extra_link_args = []
69-
extra_compile_args = {
70-
"cxx": [
71-
"-O3" if not debug_mode else "-O0",
72-
"-fdiagnostics-color=always",
73-
],
74-
"nvcc": [
75-
"-O3" if not debug_mode else "-O0",
76-
"-t=0",
77-
]
78-
}
76+
extra_compile_args["cxx"] = [
77+
"-O3" if not debug_mode else "-O0",
78+
"-fdiagnostics-color=always",
79+
]
7980

8081
if debug_mode:
8182
extra_compile_args["cxx"].append("-g")
8283
extra_compile_args["nvcc"].append("-g")
8384
extra_link_args.extend(["-O0", "-g"])
84-
8585
else:
86-
extra_link_args = []
87-
extra_compile_args = {
88-
"cxx": [
89-
"/O2" if not debug_mode else "/Od",
90-
"/permissive-"
91-
],
92-
"nvcc": [
93-
"-O3" if not debug_mode else "-O0",
94-
"-t=0",
95-
]
96-
}
86+
extra_compile_args["cxx"] = [
87+
"/O2" if not debug_mode else "/Od",
88+
"/permissive-"
89+
]
9790

9891
if debug_mode:
9992
extra_compile_args["cxx"].append("/ZI")
@@ -125,6 +118,7 @@ def get_extensions():
125118

126119
return ext_modules
127120

121+
128122
setup(
129123
name="torchao",
130124
version=version+version_suffix,
@@ -138,7 +132,7 @@ def get_extensions():
138132
description="Package for applying ao techniques to GPU models",
139133
long_description=open("README.md").read(),
140134
long_description_content_type="text/markdown",
141-
url="https://github.com/pytorch-labs/ao",
135+
url="https://github.com/pytorch/ao",
142136
cmdclass={"build_ext": BuildExtension},
143137
options={"bdist_wheel": {
144138
"py_limited_api": "cp39"

0 commit comments

Comments
 (0)