Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
3d7cb6ac
Commit
3d7cb6ac
authored
5 years ago
by
René Heß
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix in autotuning for loopy kernels
parent
5baf3ae5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/dune/codegen/sumfact/autotune.py
+3
-1
3 additions, 1 deletion
python/dune/codegen/sumfact/autotune.py
python/dune/codegen/sumfact/transformations.py
+2
-2
2 additions, 2 deletions
python/dune/codegen/sumfact/transformations.py
with
5 additions
and
3 deletions
python/dune/codegen/sumfact/autotune.py
+
3
−
1
View file @
3d7cb6ac
...
@@ -349,7 +349,7 @@ def generate_standalone_kernel_code(kernel, signature, filename):
...
@@ -349,7 +349,7 @@ def generate_standalone_kernel_code(kernel, signature, filename):
# Declare random generators
# Declare random generators
real
=
type_floatingpoint
()
real
=
type_floatingpoint
()
lines
=
[
'
std::uniform_real_distribution<{}> unif(0,1);
'
.
format
(
real
),
lines
=
[
'
std::uniform_real_distribution<{}> unif(0,1);
'
.
format
(
real
),
'
std::uniform_int_distribution<int> unif_int(0,1
28
);
'
,
'
std::uniform_int_distribution<int> unif_int(0,1);
'
,
'
std::default_random_engine re;
'
]
'
std::default_random_engine re;
'
]
f
.
write
(
'
\n
'
.
join
(
lines
)
+
'
\n
'
)
f
.
write
(
'
\n
'
.
join
(
lines
)
+
'
\n
'
)
...
@@ -369,6 +369,8 @@ def generate_standalone_kernel_code(kernel, signature, filename):
...
@@ -369,6 +369,8 @@ def generate_standalone_kernel_code(kernel, signature, filename):
else
:
else
:
assert
'
fastdg
'
in
arg
.
name
assert
'
fastdg
'
in
arg
.
name
size
=
reduce
(
mul
,
arg
.
shape
)
size
=
reduce
(
mul
,
arg
.
shape
)
min_stride
=
min
([
tag
.
stride
for
tag
in
arg
.
dim_tags
])
size
*=
min_stride
alignment
=
arg
.
dtype
.
itemsize
alignment
=
arg
.
dtype
.
itemsize
f
.
write
(
'
{} {}[{}] __attribute__ ((aligned ({})));
\n
'
.
format
(
real
,
f
.
write
(
'
{} {}[{}] __attribute__ ((aligned ({})));
\n
'
.
format
(
real
,
arg
.
name
,
arg
.
name
,
...
...
This diff is collapsed.
Click to expand it.
python/dune/codegen/sumfact/transformations.py
+
2
−
2
View file @
3d7cb6ac
...
@@ -176,9 +176,9 @@ def sumfact_performance_transformations(kernel, signature):
...
@@ -176,9 +176,9 @@ def sumfact_performance_transformations(kernel, signature):
# kernel = reorder_loops_in_tensor_contraction(kernel, 'ijlk')
# kernel = reorder_loops_in_tensor_contraction(kernel, 'ijlk')
# from dune.codegen.sumfact.autotune import autotune_realization
# from dune.codegen.sumfact.autotune import autotune_realization
# from dune.codegen.options import set_option
# set_option("autotune_google_benchmark", True)
# test = autotune_realization(kernel=kernel, signature=signature)
# test = autotune_realization(kernel=kernel, signature=signature)
# from pudb import set_trace; set_trace()
pass
pass
return
kernel
return
kernel
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