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
6aa5778f
Commit
6aa5778f
authored
7 years ago
by
Matt Wala
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into scan-actually-this-time
Conflicts: test/test_loopy.py
parents
cd88b8b1
bd12a464
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!105
Scans
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
loopy/kernel/tools.py
+6
-0
6 additions, 0 deletions
loopy/kernel/tools.py
loopy/library/reduction.py
+12
-12
12 additions, 12 deletions
loopy/library/reduction.py
with
18 additions
and
12 deletions
loopy/kernel/tools.py
+
6
−
0
View file @
6aa5778f
...
...
@@ -318,10 +318,16 @@ class SetOperationCacheManager:
return
result
def
dim_min
(
self
,
set
,
*
args
):
if
set
.
plain_is_empty
():
raise
LoopyError
(
"
domain
'
%s
'
is empty
"
%
set
)
from
loopy.isl_helpers
import
dim_min_with_elimination
return
self
.
op
(
set
,
"
dim_min
"
,
dim_min_with_elimination
,
args
)
def
dim_max
(
self
,
set
,
*
args
):
if
set
.
plain_is_empty
():
raise
LoopyError
(
"
domain
'
%s
'
is empty
"
%
set
)
from
loopy.isl_helpers
import
dim_max_with_elimination
return
self
.
op
(
set
,
"
dim_max
"
,
dim_max_with_elimination
,
args
)
...
...
This diff is collapsed.
Click to expand it.
loopy/library/reduction.py
+
12
−
12
View file @
6aa5778f
...
...
@@ -455,9 +455,9 @@ def parse_reduction_op(name):
def
reduction_function_mangler
(
kernel
,
func_id
,
arg_dtypes
):
if
isinstance
(
func_id
,
ArgExtFunction
)
and
func_id
.
name
==
"
init
"
:
from
loopy.target.opencl
import
OpenCL
Target
if
not
isinstance
(
kernel
.
target
,
OpenCL
Target
):
raise
LoopyError
(
"
only
OpenCL
supported for now
"
)
from
loopy.target.opencl
import
C
Target
if
not
isinstance
(
kernel
.
target
,
C
Target
):
raise
LoopyError
(
"
%s:
only
C-like targets
supported for now
"
%
func_id
)
op
=
func_id
.
reduction_op
...
...
@@ -471,9 +471,9 @@ def reduction_function_mangler(kernel, func_id, arg_dtypes):
)
elif
isinstance
(
func_id
,
ArgExtFunction
)
and
func_id
.
name
==
"
update
"
:
from
loopy.target.opencl
import
OpenCL
Target
if
not
isinstance
(
kernel
.
target
,
OpenCL
Target
):
raise
LoopyError
(
"
only
OpenCL
supported for now
"
)
from
loopy.target.opencl
import
C
Target
if
not
isinstance
(
kernel
.
target
,
C
Target
):
raise
LoopyError
(
"
%s:
only
C-like targets
supported for now
"
%
func_id
)
op
=
func_id
.
reduction_op
...
...
@@ -491,9 +491,9 @@ def reduction_function_mangler(kernel, func_id, arg_dtypes):
)
elif
isinstance
(
func_id
,
SegmentedFunction
)
and
func_id
.
name
==
"
init
"
:
from
loopy.target.opencl
import
OpenCL
Target
if
not
isinstance
(
kernel
.
target
,
OpenCL
Target
):
raise
LoopyError
(
"
only
OpenCL
supported for now
"
)
from
loopy.target.opencl
import
C
Target
if
not
isinstance
(
kernel
.
target
,
C
Target
):
raise
LoopyError
(
"
%s:
only
C-like targets
supported for now
"
%
func_id
)
op
=
func_id
.
reduction_op
...
...
@@ -507,9 +507,9 @@ def reduction_function_mangler(kernel, func_id, arg_dtypes):
)
elif
isinstance
(
func_id
,
SegmentedFunction
)
and
func_id
.
name
==
"
update
"
:
from
loopy.target.opencl
import
OpenCL
Target
if
not
isinstance
(
kernel
.
target
,
OpenCL
Target
):
raise
LoopyError
(
"
only
OpenCL
supported for now
"
)
from
loopy.target.opencl
import
C
Target
if
not
isinstance
(
kernel
.
target
,
C
Target
):
raise
LoopyError
(
"
%s:
only
C-like targets
supported for now
"
%
func_id
)
op
=
func_id
.
reduction_op
...
...
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