Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
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
lbmpy
Commits
1989507b
Commit
1989507b
authored
1 year ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Implement fallback case
parent
f2314863
No related branches found
No related tags found
1 merge request
!145
Replace PyCuda with CuPy
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lbmpy/max_domain_size_info.py
+9
-0
9 additions, 0 deletions
lbmpy/max_domain_size_info.py
with
9 additions
and
0 deletions
lbmpy/max_domain_size_info.py
+
9
−
0
View file @
1989507b
...
@@ -41,6 +41,15 @@ except ImportError:
...
@@ -41,6 +41,15 @@ except ImportError:
cupy
=
None
cupy
=
None
device
=
None
device
=
None
if
cupy
:
try
:
device
=
cupy
.
cuda
.
Device
(
pystencils
.
GPU_DEVICE
)
except
AttributeError
:
warnings
.
warn
(
"
You are using an old pystencils version. Consider updating it
"
)
device
=
cupy
.
cuda
.
Device
(
0
)
else
:
device
=
None
try
:
try
:
from
psutil
import
virtual_memory
from
psutil
import
virtual_memory
except
ImportError
:
except
ImportError
:
...
...
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