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
OpenDAS
AutoAWQ
Commits
a7d87540
Unverified
Commit
a7d87540
authored
Oct 30, 2023
by
Casper
Committed by
GitHub
Oct 30, 2023
Browse files
CUDA 11.8.0 and 12.1.1 build (#128)
parent
f1a2e56e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
.github/workflows/build.yaml
.github/workflows/build.yaml
+6
-4
setup.py
setup.py
+6
-1
No files found.
.github/workflows/build.yaml
View file @
a7d87540
...
...
@@ -41,7 +41,7 @@ jobs:
matrix
:
os
:
[
ubuntu-20.04
,
windows-latest
]
pyver
:
[
"
3.8"
,
"
3.9"
,
"
3.10"
,
"
3.11"
]
cuda
:
[
"
11.8"
]
cuda
:
[
"
11.8
.0"
,
"
12.1.1
"
]
defaults
:
run
:
shell
:
pwsh
...
...
@@ -81,15 +81,17 @@ jobs:
-
name
:
Install Dependencies
run
:
|
# Install CUDA toolkit
mamba install -y 'cuda' -c "nvidia/label/cuda-${env:CUDA_VERSION}
.0
"
mamba install -y 'cuda' -c "nvidia/label/cuda-${env:CUDA_VERSION}"
# Env variables
$env:CUDA_PATH = $env:CONDA_PREFIX
$env:CUDA_HOME = $env:CONDA_PREFIX
# Install torch
$cudaVersionPytorch = $env:CUDA_VERSION.Replace('.', '')
python -m pip install --upgrade --no-cache-dir torch==2.0.1+cu$cudaVersionPytorch --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch
$cudaVersion = $env:CUDA_VERSION.Replace('.', '')
$cudaVersionPytorch = $cudaVersion.Substring(0, $cudaVersion.Length - 1)
if ([int]$cudaVersionPytorch -gt 118) { $pytorchVersion = "torch==2.1.0" } else {$pytorchVersion = "torch==2.0.1"}
python -m pip install --upgrade --no-cache-dir $pytorchVersion+cu$cudaVersionPytorch --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch
python -m pip install build setuptools wheel ninja
# Print version information
...
...
setup.py
View file @
a7d87540
...
...
@@ -8,8 +8,13 @@ from torch.utils.cpp_extension import BuildExtension, CUDA_HOME, CUDAExtension
os
.
environ
[
"CC"
]
=
"g++"
os
.
environ
[
"CXX"
]
=
"g++"
try
:
CUDA_VERSION
=
""
.
join
(
os
.
environ
.
get
(
"CUDA_VERSION"
,
torch
.
version
.
cuda
).
split
(
"."
))
except
Exception
as
ex
:
raise
RuntimeError
(
"Your system must have an Nvidia GPU for installing AutoAWQ"
)
common_setup_kwargs
=
{
"version"
:
"0.1.5"
,
"version"
:
f
"0.1.5
+cu
{
CUDA_VERSION
}
"
,
"name"
:
"autoawq"
,
"author"
:
"Casper Hansen"
,
"license"
:
"MIT"
,
...
...
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