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
Wiki
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
Kaushik Kulkarni
loopy
Commits
8ebcc066
Commit
8ebcc066
authored
9 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Fix CL image arguments
parent
b7651913
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
loopy/kernel/data.py
+1
-1
1 addition, 1 deletion
loopy/kernel/data.py
loopy/target/__init__.py
+1
-1
1 addition, 1 deletion
loopy/target/__init__.py
loopy/target/opencl.py
+2
-2
2 additions, 2 deletions
loopy/target/opencl.py
with
4 additions
and
4 deletions
loopy/kernel/data.py
+
1
−
1
View file @
8ebcc066
...
...
@@ -244,7 +244,7 @@ class ImageArg(ArrayBase, KernelArgument):
def
get_arg_decl
(
self
,
target
,
name_suffix
,
shape
,
dtype
,
is_written
):
return
target
.
get_image_arg_decl
(
self
.
name
+
name_suffix
,
shape
,
dtype
,
is_written
)
self
.
num_target_axes
(),
dtype
,
is_written
)
class
ValueArg
(
KernelArgument
):
...
...
This diff is collapsed.
Click to expand it.
loopy/target/__init__.py
+
1
−
1
View file @
8ebcc066
...
...
@@ -119,7 +119,7 @@ class TargetBase(object):
def
get_global_arg_decl
(
self
,
name
,
shape
,
dtype
,
is_written
):
raise
NotImplementedError
()
def
get_image_arg_decl
(
self
,
name
,
shape
,
dtype
,
is_written
):
def
get_image_arg_decl
(
self
,
name
,
shape
,
num_target_axes
,
dtype
,
is_written
):
raise
NotImplementedError
()
# }}}
...
...
This diff is collapsed.
Click to expand it.
loopy/target/opencl.py
+
2
−
2
View file @
8ebcc066
...
...
@@ -309,14 +309,14 @@ class OpenCLTarget(CTarget):
return
CLGlobal
(
super
(
OpenCLTarget
,
self
).
get_global_arg_decl
(
name
,
shape
,
dtype
,
is_written
))
def
get_image_arg_decl
(
self
,
name
,
shape
,
dtype
,
is_written
):
def
get_image_arg_decl
(
self
,
name
,
shape
,
num_target_axes
,
dtype
,
is_written
):
if
is_written
:
mode
=
"
w
"
else
:
mode
=
"
r
"
from
cgen.opencl
import
CLImage
return
CLImage
(
self
.
num_target_axes
()
,
mode
,
name
)
return
CLImage
(
num_target_axes
,
mode
,
name
)
def
get_constant_arg_decl
(
self
,
name
,
shape
,
dtype
,
is_written
):
from
loopy.codegen
import
POD
# uses the correct complex type
...
...
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