Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yujq2
AutoAWQ_kernels
Commits
e6398f88
Unverified
Commit
e6398f88
authored
Jan 21, 2024
by
Casper
Committed by
GitHub
Jan 21, 2024
Browse files
Fix windows build + Bump version (#3)
* Attempt to fix Windows build * Revert build * Bump to 0.0.2
parent
fc700a82
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
setup.py
setup.py
+8
-1
No files found.
setup.py
View file @
e6398f88
...
@@ -7,7 +7,7 @@ from torch.utils.cpp_extension import BuildExtension, CUDA_HOME, CUDAExtension
...
@@ -7,7 +7,7 @@ from torch.utils.cpp_extension import BuildExtension, CUDA_HOME, CUDAExtension
os
.
environ
[
"CC"
]
=
"g++"
os
.
environ
[
"CC"
]
=
"g++"
os
.
environ
[
"CXX"
]
=
"g++"
os
.
environ
[
"CXX"
]
=
"g++"
AUTOAWQ_KERNELS_VERSION
=
"0.0.
1
"
AUTOAWQ_KERNELS_VERSION
=
"0.0.
2
"
PYPI_BUILD
=
os
.
getenv
(
"PYPI_BUILD"
,
"0"
)
==
"1"
PYPI_BUILD
=
os
.
getenv
(
"PYPI_BUILD"
,
"0"
)
==
"1"
if
not
PYPI_BUILD
:
if
not
PYPI_BUILD
:
...
@@ -105,6 +105,7 @@ def get_compute_capabilities():
...
@@ -105,6 +105,7 @@ def get_compute_capabilities():
check_dependencies
()
check_dependencies
()
extra_link_args
=
[]
include_dirs
=
get_include_dirs
()
include_dirs
=
get_include_dirs
()
generator_flags
=
get_generator_flag
()
generator_flags
=
get_generator_flag
()
arch_flags
=
get_compute_capabilities
()
arch_flags
=
get_compute_capabilities
()
...
@@ -117,6 +118,9 @@ if os.name == "nt":
...
@@ -117,6 +118,9 @@ if os.name == "nt":
extra_compile_args
=
{
"nvcc"
:
arch_flags
}
extra_compile_args
=
{
"nvcc"
:
arch_flags
}
else
:
else
:
extra_compile_args
=
{}
extra_compile_args
=
{}
cuda_path
=
os
.
environ
.
get
(
"CUDA_PATH"
,
None
)
extra_link_args
=
[
"-L"
,
f
"
{
cuda_path
}
/lib/x64/cublas.lib"
]
else
:
else
:
extra_compile_args
=
{
extra_compile_args
=
{
"cxx"
:
[
"-g"
,
"-O3"
,
"-fopenmp"
,
"-lgomp"
,
"-std=c++17"
,
"-DENABLE_BF16"
],
"cxx"
:
[
"-g"
,
"-O3"
,
"-fopenmp"
,
"-lgomp"
,
"-std=c++17"
,
"-DENABLE_BF16"
],
...
@@ -151,6 +155,7 @@ extensions = [
...
@@ -151,6 +155,7 @@ extensions = [
extra_compile_args
=
extra_compile_args
,
extra_compile_args
=
extra_compile_args
,
)
)
]
]
extensions
.
append
(
extensions
.
append
(
CUDAExtension
(
CUDAExtension
(
"exllama_kernels"
,
"exllama_kernels"
,
...
@@ -162,6 +167,7 @@ extensions.append(
...
@@ -162,6 +167,7 @@ extensions.append(
"awq_ext/exllama/cuda_func/q4_matrix.cu"
,
"awq_ext/exllama/cuda_func/q4_matrix.cu"
,
],
],
extra_compile_args
=
extra_compile_args
,
extra_compile_args
=
extra_compile_args
,
extra_link_args
=
extra_link_args
,
)
)
)
)
extensions
.
append
(
extensions
.
append
(
...
@@ -173,6 +179,7 @@ extensions.append(
...
@@ -173,6 +179,7 @@ extensions.append(
"awq_ext/exllamav2/cuda/q_gemm.cu"
,
"awq_ext/exllamav2/cuda/q_gemm.cu"
,
],
],
extra_compile_args
=
extra_compile_args
,
extra_compile_args
=
extra_compile_args
,
extra_link_args
=
extra_link_args
,
)
)
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment