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
6b567a1a
Commit
6b567a1a
authored
8 years ago
by
Matt Wala
Browse files
Options
Downloads
Patches
Plain Diff
More cleanup.
parent
3f52b7f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
loopy/schedule/device_mapping.py
+18
-16
18 additions, 16 deletions
loopy/schedule/device_mapping.py
with
18 additions
and
16 deletions
loopy/schedule/device_mapping.py
+
18
−
16
View file @
6b567a1a
...
@@ -3,12 +3,25 @@ from __future__ import division, absolute_import, print_function
...
@@ -3,12 +3,25 @@ from __future__ import division, absolute_import, print_function
__copyright__
=
"
Copyright (C) 2016 Matt Wala
"
__copyright__
=
"
Copyright (C) 2016 Matt Wala
"
__license__
=
"""
__license__
=
"""
(unclear)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the
"
Software
"
), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED
"
AS IS
"
, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
"""
# TODO: Matt, please replace the license header
# TODO: Should move to loopy.schedule.device_mapping
from
pytools
import
Record
from
pytools
import
Record
from
loopy.diagnostic
import
LoopyError
from
loopy.diagnostic
import
LoopyError
...
@@ -62,6 +75,7 @@ def get_common_hw_inames(kernel, insn_ids):
...
@@ -62,6 +75,7 @@ def get_common_hw_inames(kernel, insn_ids):
# {{{ Use / def analysis
# {{{ Use / def analysis
def
filter_out_subscripts
(
exprs
):
def
filter_out_subscripts
(
exprs
):
result
=
set
()
result
=
set
()
from
pymbolic.primitives
import
Subscript
from
pymbolic.primitives
import
Subscript
...
@@ -268,18 +282,6 @@ def save_and_restore_temporaries(kernel):
...
@@ -268,18 +282,6 @@ def save_and_restore_temporaries(kernel):
"
Cannot promote temporaries with base_storage to global
"
"
Cannot promote temporaries with base_storage to global
"
hw_inames
=
get_common_hw_inames
(
kernel
,
def_lists
[
temporary
.
name
])
hw_inames
=
get_common_hw_inames
(
kernel
,
def_lists
[
temporary
.
name
])
=======
class
HostInvokeKernel
(
Record
):
# TOOD: Should have docstring indicating what attributes can occur
pass
def
map_schedule_onto_host_or_device
(
kernel
):
from
functools
import
partial
kernel_name_gen
=
partial
(
kernel
.
get_var_name_generator
(),
kernel
.
name
+
kernel
.
target
.
device_program_name_suffix
)
>>>>>>>
55
ba3a29f0cf120ae0f74be5d0ee2bb7773ba8e5
# This takes advantage of the fact that g < l in the alphabet :)
# This takes advantage of the fact that g < l in the alphabet :)
hw_inames
=
sorted
(
hw_inames
,
hw_inames
=
sorted
(
hw_inames
,
...
...
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