Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loopy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
loopy
Commits
eb6d2bfb
Commit
eb6d2bfb
authored
12 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Remove drive_timing_run().
parent
c479959f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
loopy/__init__.py
+2
-2
2 additions, 2 deletions
loopy/__init__.py
loopy/compiled.py
+0
-51
0 additions, 51 deletions
loopy/compiled.py
with
2 additions
and
53 deletions
loopy/__init__.py
+
2
−
2
View file @
eb6d2bfb
...
...
@@ -32,7 +32,7 @@ from loopy.cse import precompute
from
loopy.preprocess
import
preprocess_kernel
,
realize_reduction
from
loopy.schedule
import
generate_loop_schedules
from
loopy.codegen
import
generate_code
from
loopy.compiled
import
CompiledKernel
,
drive_timing_run
,
auto_test_vs_ref
from
loopy.compiled
import
CompiledKernel
,
auto_test_vs_ref
from
loopy.check
import
check_kernels
__all__
=
[
"
ValueArg
"
,
"
ScalarArg
"
,
"
GlobalArg
"
,
"
ArrayArg
"
,
"
ConstantArg
"
,
"
ImageArg
"
,
...
...
@@ -47,7 +47,7 @@ __all__ = ["ValueArg", "ScalarArg", "GlobalArg", "ArrayArg", "ConstantArg", "Ima
"
preprocess_kernel
"
,
"
realize_reduction
"
,
"
generate_loop_schedules
"
,
"
generate_code
"
,
"
CompiledKernel
"
,
"
drive_timing_run
"
,
"
auto_test_vs_ref
"
,
"
check_kernels
"
,
"
CompiledKernel
"
,
"
auto_test_vs_ref
"
,
"
check_kernels
"
,
"
make_kernel
"
,
"
split_dimension
"
,
"
join_dimensions
"
,
"
tag_dimensions
"
,
"
extract_subst
"
,
"
expand_subst
"
,
...
...
This diff is collapsed.
Click to expand it.
loopy/compiled.py
+
0
−
51
View file @
eb6d2bfb
...
...
@@ -239,57 +239,6 @@ def get_highlighted_code(text):
# {{{ timing driver
def
drive_timing_run
(
kernel_generator
,
queue
,
launch
,
flop_count
=
None
,
options
=
[],
print_code
=
True
,
edit_code
=
False
):
def
time_run
(
compiled_knl
,
warmup_rounds
=
2
,
timing_rounds
=
5
):
check
=
True
for
i
in
range
(
warmup_rounds
):
launch
(
compiled_knl
.
cl_kernel
,
compiled
.
global_size_func
,
compiled
.
local_size_func
,
check
=
check
)
check
=
False
events
=
[]
for
i
in
range
(
timing_rounds
):
events
.
append
(
launch
(
compiled_knl
.
cl_kernel
,
compiled
.
global_size_func
,
compiled
.
local_size_func
,
check
=
check
))
for
evt
in
events
:
evt
.
wait
()
return
sum
(
1e-9
*
evt
.
profile
.
END
-
1e-9
*
evt
.
profile
.
START
for
evt
in
events
)
/
timing_rounds
soln_count
=
0
for
kernel
in
kernel_generator
:
compiled
=
CompiledKernel
(
queue
.
context
,
kernel
,
options
=
options
,
edit_code
=
edit_code
)
print
"
-----------------------------------------------
"
print
"
SOLUTION #%d
"
%
soln_count
print
"
-----------------------------------------------
"
if
print_code
:
print
get_highlighted_code
(
compiled
.
code
)
print
"
-----------------------------------------------
"
elapsed
=
time_run
(
compiled
)
print
"
time: %f
"
%
elapsed
if
flop_count
is
not
None
:
print
"
gflops/s: %f (#%d)
"
%
(
flop_count
/
elapsed
/
1e9
,
soln_count
)
print
"
-----------------------------------------------
"
soln_count
+=
1
print
"
%d solutions
"
%
soln_count
# }}}
# {{{ automatic testing
def
fill_rand
(
ary
):
...
...
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