Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PyFstat
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gregory Ashton
PyFstat
Commits
b86bcac9
Commit
b86bcac9
authored
Jan 12, 2018
by
David Keitel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GPU device selection: default when no env variable set
parent
95487807
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
pyfstat/tcw_fstat_map_funcs.py
pyfstat/tcw_fstat_map_funcs.py
+4
-1
No files found.
pyfstat/tcw_fstat_map_funcs.py
View file @
b86bcac9
...
...
@@ -129,7 +129,10 @@ def init_transient_fstat_map_features ( ):
for
n
,
devn
in
enumerate
(
devices
):
logging
.
debug
(
'device {} model: {}, RAM: {}MB'
.
format
(
n
,
devn
.
name
(),
devn
.
total_memory
()
/
(
2.
**
20
)
))
devnum
=
int
(
os
.
environ
[
'CUDA_DEVICE'
])
if
'CUDA_DEVICE'
in
os
.
environ
:
devnum
=
int
(
os
.
environ
[
'CUDA_DEVICE'
])
else
:
devnum
=
0
devn
=
drv
.
Device
(
devnum
)
logging
.
info
(
'Choosing CUDA device {}, of {} devices present: {}... (Can be changed through environment variable $CUDA_DEVICE.)'
.
format
(
devnum
,
num_gpus
,
devn
.
name
()))
logging
.
debug
(
'Available GPU memory: {}/{} MB free'
.
format
(
drv
.
mem_get_info
()[
0
]
/
(
2.
**
20
),
drv
.
mem_get_info
()[
1
]
/
(
2.
**
20
)))
...
...
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