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
3058e2e0
Commit
3058e2e0
authored
1 month ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
fix gpu target check in lbstep. Re-enable gpu tests.
parent
676bc8a3
No related branches found
No related tags found
1 merge request
!172
Draft: Changes for compatibility with pystencils 2.0
Pipeline
#77944
failed
1 month ago
Stage: Code Quality
Stage: Tests
Stage: Prerelease-Tests
Stage: docs
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lbmpy/lbstep.py
+3
-1
3 additions, 1 deletion
src/lbmpy/lbstep.py
tests/test_cpu_gpu_equivalence.py
+4
-2
4 additions, 2 deletions
tests/test_cpu_gpu_equivalence.py
with
7 additions
and
3 deletions
src/lbmpy/lbstep.py
+
3
−
1
View file @
3058e2e0
...
...
@@ -47,8 +47,10 @@ class LatticeBoltzmannStep:
if
config
is
not
None
:
if
IS_PYSTENCILS_2
:
target
=
config
.
get_target
()
is_gpu
=
target
.
is_gpu
()
else
:
target
=
config
.
target
is_gpu
=
target
==
Target
.
GPU
else
:
target
=
optimization
.
get
(
'
target
'
,
Target
.
CPU
)
...
...
@@ -91,7 +93,7 @@ class LatticeBoltzmannStep:
self
.
density_data_name
=
name
+
"
_density
"
if
density_data_name
is
None
else
density_data_name
self
.
density_data_index
=
density_data_index
self
.
_gpu
=
target
==
Target
.
GPU
self
.
_gpu
=
is_gpu
layout
=
lbm_optimisation
.
field_layout
alignment
=
False
...
...
This diff is collapsed.
Click to expand it.
tests/test_cpu_gpu_equivalence.py
+
4
−
2
View file @
3058e2e0
...
...
@@ -53,7 +53,9 @@ def test_force_driven_channel_short(scenario):
config
=
CreateKernelConfig
(
gpu_indexing_params
=
{
'
block_size
'
:
block_size
})
else
:
if
IS_PYSTENCILS_2
:
pytest
.
xfail
(
"
Line indexing not available yet
"
)
config
=
CreateKernelConfig
(
gpu_indexing
=
'
line
'
)
config
=
CreateKernelConfig
()
config
.
gpu
.
indexing_scheme
=
"
blockwise4d
"
else
:
config
=
CreateKernelConfig
(
gpu_indexing
=
'
line
'
)
run_equivalence_test
(
domain_size
=
ds
,
lbm_config
=
lbm_config
,
lbm_opt
=
lbm_opt
,
base_config
=
config
)
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