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
ba466980
Commit
ba466980
authored
9 years ago
by
James Stevens
Browse files
Options
Downloads
Patches
Plain Diff
shortened docstrings
parent
a14e5f8a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
loopy/statistics.py
+15
-24
15 additions, 24 deletions
loopy/statistics.py
with
15 additions
and
24 deletions
loopy/statistics.py
+
15
−
24
View file @
ba466980
...
...
@@ -418,20 +418,14 @@ def get_op_poly(knl):
Example usage::
# first create loopy kernel and specify array data types
#
(
first create loopy kernel and specify array data types
)
poly = get_op_poly(knl)
params = {
'
n
'
: 512,
'
m
'
: 256,
'
l
'
: 128}
float32_op_ct = poly.dict[np.dtype(np.float32)].eval_with_dict(params)
float64_op_ct = poly.dict[np.dtype(np.float64)].eval_with_dict(params)
n = 512
m = 256
l = 128
float32_op_ct = poly.dict[np.dtype(np.float32)].eval_with_dict(
{
'
n
'
: n,
'
m
'
: m,
'
l
'
: l})
float64_op_ct = poly.dict[np.dtype(np.float64)].eval_with_dict(
{
'
n
'
: n,
'
m
'
: m,
'
l
'
: l})
# now use these counts to predict performance
# (now use these counts to predict performance)
"""
...
...
@@ -478,21 +472,22 @@ def get_DRAM_access_poly(knl): # for now just counting subscripts
Example usage::
# first create loopy kernel and specify array data types
#
(
first create loopy kernel and specify array data types
)
subscript_map = get_DRAM_access_poly(knl)
params = {
'
n
'
: 512,
'
m
'
: 256,
'
l
'
: 128}
f32_uncoalesced_load = subscript_map.dict[
(np.dtype(np.float32),
'
nonconsecutive
'
,
'
load
'
)
].eval_with_dict(
{
'
n
'
: n,
'
m
'
: m,
'
l
'
: l}
)
].eval_with_dict(
params
)
f32_coalesced_load = subscript_map.dict[
(np.dtype(np.float32),
'
consecutive
'
,
'
load
'
)
].eval_with_dict(
{
'
n
'
: n,
'
m
'
: m,
'
l
'
: l}
)
].eval_with_dict(
params
)
f32_coalesced_store = subscript_map.dict[
(np.dtype(np.float32),
'
consecutive
'
,
'
store
'
)
].eval_with_dict(
{
'
n
'
: n,
'
m
'
: m,
'
l
'
: l}
)
].eval_with_dict(
params
)
# now use these counts to predict performance
#
(
now use these counts to predict performance
)
"""
...
...
@@ -532,17 +527,13 @@ def get_barrier_poly(knl):
Example usage::
# first create loopy kernel and specify array data types
#
(
first create loopy kernel and specify array data types
)
barrier_poly = get_barrier_poly(knl)
params = {
'
n
'
: 512,
'
m
'
: 256,
'
l
'
: 128}
barrier_count = barrier_poly.eval_with_dict(params)
n = 512
m = 256
l = 128
barrier_count = barrier_poly.eval_with_dict({
'
n
'
: n,
'
m
'
: m,
'
l
'
: l})
# now use this count to predict performance
# (now use this count to predict performance)
"""
...
...
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