Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyopencl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
pyopencl
Commits
6edb5af6
Commit
6edb5af6
authored
13 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Document pyopencl.characterize.
parent
446dd6d5
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
doc/source/tools.rst
+5
-0
5 additions, 0 deletions
doc/source/tools.rst
pyopencl/characterize.py
+9
-0
9 additions, 0 deletions
pyopencl/characterize.py
with
14 additions
and
0 deletions
doc/source/tools.rst
+
5
−
0
View file @
6edb5af6
...
@@ -100,3 +100,8 @@ Testing
...
@@ -100,3 +100,8 @@ Testing
PYOPENCL_TEST_PLATFORM_BLACKLIST=nvidia,intel
PYOPENCL_TEST_PLATFORM_BLACKLIST=nvidia,intel
PYOPENCL_TEST_DEVICE_BLACKLIST=nvidia:260,intel:i5
PYOPENCL_TEST_DEVICE_BLACKLIST=nvidia:260,intel:i5
Device Characterization
-----------------------
.. automodule:: pyopencl.characterize
This diff is collapsed.
Click to expand it.
pyopencl/characterize.py
+
9
−
0
View file @
6edb5af6
...
@@ -48,6 +48,10 @@ def reasonable_work_group_size_multiple(dev, ctx=None):
...
@@ -48,6 +48,10 @@ def reasonable_work_group_size_multiple(dev, ctx=None):
def
nv_compute_capability
(
dev
):
def
nv_compute_capability
(
dev
):
"""
If *dev* is an Nvidia GPU :class:`pyopencl.Device`, return a tuple
*(major, minor)* indicating the device
'
s compute capability.
"""
try
:
try
:
return
(
dev
.
compute_capability_major_nv
,
return
(
dev
.
compute_capability_major_nv
,
dev
.
compute_capability_minor_nv
)
dev
.
compute_capability_minor_nv
)
...
@@ -61,6 +65,7 @@ def usable_local_mem_size(dev, nargs=None):
...
@@ -61,6 +65,7 @@ def usable_local_mem_size(dev, nargs=None):
"""
Return an estimate of the usable local memory size.
"""
Return an estimate of the usable local memory size.
:arg nargs: Number of 32-bit arguments passed.
:arg nargs: Number of 32-bit arguments passed.
"""
"""
usable_local_mem_size
=
dev
.
local_mem_size
usable_local_mem_size
=
dev
.
local_mem_size
nv_compute_cap
=
nv_compute_capability
(
dev
)
nv_compute_cap
=
nv_compute_capability
(
dev
)
...
@@ -165,6 +170,10 @@ def why_not_local_access_conflict_free(dev, itemsize,
...
@@ -165,6 +170,10 @@ def why_not_local_access_conflict_free(dev, itemsize,
:param itemsize: size of accessed data in bytes
:param itemsize: size of accessed data in bytes
:param array_shape: array dimensions, fastest-moving last
:param array_shape: array dimensions, fastest-moving last
(C order)
(C order)
:returns: a tuple (multiplicity, explanation), where *multiplicity*
is the number of work items that will conflict on a bank when accessing
local memory. *explanation* is a string detailing the found conflict.
"""
"""
# FIXME: Treat 64-bit access on NV CC 2.x + correctly
# FIXME: Treat 64-bit access on NV CC 2.x + correctly
...
...
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