Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
90fd75bb
Commit
90fd75bb
authored
4 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
use nvcc again to get cuda version
parent
9e3e8af0
No related branches found
No related tags found
1 merge request
!436
Introduce Nox for Local and CI Test Automation. Start Writing a Contributors Guide.
Pipeline
#71872
failed
4 months ago
Stage: Code Quality
Stage: Unit Tests
Stage: legacy_test
Stage: docs
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
noxfile.py
+11
-6
11 additions, 6 deletions
noxfile.py
with
11 additions
and
6 deletions
noxfile.py
+
11
−
6
View file @
90fd75bb
...
...
@@ -4,21 +4,26 @@ from typing import Sequence
import
os
import
nox
import
subprocess
import
re
nox
.
options
.
sessions
=
[
"
lint
"
,
"
typecheck
"
,
"
testsuite
"
]
def
get_cuda_version
()
->
None
|
tuple
[
int
,
...]:
smi
_args
=
[
"
nv
idia-smi
"
,
"
--version
"
]
query
_args
=
[
"
nv
cc
"
,
"
--version
"
]
try
:
result
=
subprocess
.
run
(
smi
_args
,
capture_output
=
True
)
query_
result
=
subprocess
.
run
(
query
_args
,
capture_output
=
True
)
except
FileNotFoundError
:
return
None
smi_output
=
str
(
result
.
stdout
).
splitlines
()
cuda_version
=
smi_output
[
-
1
].
split
(
"
:
"
)[
1
].
strip
()
return
tuple
(
int
(
v
)
for
v
in
cuda_version
.
split
(
"
.
"
))
matches
=
re
.
findall
(
r
"
release \d+\.\d+
"
,
str
(
query_result
.
stdout
))
if
matches
:
match
=
matches
[
0
]
version_string
=
match
.
split
()[
-
1
]
return
tuple
(
int
(
v
)
for
v
in
version_string
.
split
(
"
.
"
))
else
:
return
None
def
editable_install
(
session
:
nox
.
Session
,
opts
:
Sequence
[
str
]
=
()):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment