@@ -64,36 +64,29 @@ def get_extensions():
64
64
use_cuda = torch .cuda .is_available () and CUDA_HOME is not None
65
65
extension = CUDAExtension if use_cuda else CppExtension
66
66
67
+ extra_link_args = []
68
+ extra_compile_args = {
69
+ "nvcc" : [
70
+ "-O3" if not debug_mode else "-O0" ,
71
+ "-t=0" ,
72
+ ]
73
+ }
74
+
67
75
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
+ ]
79
80
80
81
if debug_mode :
81
82
extra_compile_args ["cxx" ].append ("-g" )
82
83
extra_compile_args ["nvcc" ].append ("-g" )
83
84
extra_link_args .extend (["-O0" , "-g" ])
84
-
85
85
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
+ ]
97
90
98
91
if debug_mode :
99
92
extra_compile_args ["cxx" ].append ("/ZI" )
@@ -125,6 +118,7 @@ def get_extensions():
125
118
126
119
return ext_modules
127
120
121
+
128
122
setup (
129
123
name = "torchao" ,
130
124
version = version + version_suffix ,
@@ -138,7 +132,7 @@ def get_extensions():
138
132
description = "Package for applying ao techniques to GPU models" ,
139
133
long_description = open ("README.md" ).read (),
140
134
long_description_content_type = "text/markdown" ,
141
- url = "https://github.com/pytorch-labs /ao" ,
135
+ url = "https://github.com/pytorch/ao" ,
142
136
cmdclass = {"build_ext" : BuildExtension },
143
137
options = {"bdist_wheel" : {
144
138
"py_limited_api" : "cp39"
0 commit comments