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
bd71da88
Commit
bd71da88
authored
1 year ago
by
Alexandru Fikl
Committed by
Andreas Klöckner
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
use np.prod instead of np.product
parent
0cfc0689
No related branches found
No related tags found
No related merge requests found
Pipeline
#440459
failed
1 year ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_enqueue_copy.py
+4
-4
4 additions, 4 deletions
test/test_enqueue_copy.py
with
4 additions
and
4 deletions
test/test_enqueue_copy.py
+
4
−
4
View file @
bd71da88
...
@@ -77,8 +77,8 @@ def test_enqueue_copy_rect_2d(ctx_factory, honor_skip=True):
...
@@ -77,8 +77,8 @@ def test_enqueue_copy_rect_2d(ctx_factory, honor_skip=True):
h_ary_in
=
rng
.
integers
(
0
,
256
,
ary_in_shp
,
dtype
=
np
.
uint8
)
h_ary_in
=
rng
.
integers
(
0
,
256
,
ary_in_shp
,
dtype
=
np
.
uint8
)
# Create device buffers
# Create device buffers
d_in_buf
=
cl
.
Buffer
(
ctx
,
cl
.
mem_flags
.
READ_ONLY
,
size
=
np
.
prod
uct
(
buf_in_shp
))
d_in_buf
=
cl
.
Buffer
(
ctx
,
cl
.
mem_flags
.
READ_ONLY
,
size
=
np
.
prod
(
buf_in_shp
))
d_out_buf
=
cl
.
Buffer
(
ctx
,
cl
.
mem_flags
.
READ_ONLY
,
size
=
np
.
prod
uct
(
buf_out_shp
))
d_out_buf
=
cl
.
Buffer
(
ctx
,
cl
.
mem_flags
.
READ_ONLY
,
size
=
np
.
prod
(
buf_out_shp
))
# Copy sub-array (rectangular buffer) from host to device
# Copy sub-array (rectangular buffer) from host to device
cl
.
enqueue_copy
(
cl
.
enqueue_copy
(
...
@@ -166,8 +166,8 @@ def test_enqueue_copy_rect_3d(ctx_factory, honor_skip=True):
...
@@ -166,8 +166,8 @@ def test_enqueue_copy_rect_3d(ctx_factory, honor_skip=True):
h_ary_in
=
rng
.
integers
(
0
,
256
,
ary_in_shp
,
dtype
=
np
.
uint8
)
h_ary_in
=
rng
.
integers
(
0
,
256
,
ary_in_shp
,
dtype
=
np
.
uint8
)
# Create device buffers
# Create device buffers
d_in_buf
=
cl
.
Buffer
(
ctx
,
cl
.
mem_flags
.
READ_ONLY
,
size
=
np
.
prod
uct
(
buf_in_shp
))
d_in_buf
=
cl
.
Buffer
(
ctx
,
cl
.
mem_flags
.
READ_ONLY
,
size
=
np
.
prod
(
buf_in_shp
))
d_out_buf
=
cl
.
Buffer
(
ctx
,
cl
.
mem_flags
.
READ_ONLY
,
size
=
np
.
prod
uct
(
buf_out_shp
))
d_out_buf
=
cl
.
Buffer
(
ctx
,
cl
.
mem_flags
.
READ_ONLY
,
size
=
np
.
prod
(
buf_out_shp
))
# Copy sub-array (rectangular buffer) from host to device
# Copy sub-array (rectangular buffer) from host to device
cl
.
enqueue_copy
(
cl
.
enqueue_copy
(
...
...
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