pyocl / pyopencl-examples Goto Github PK
View Code? Open in Web Editor NEWExamples for Learning PyOpenCL
License: MIT License
Examples for Learning PyOpenCL
License: MIT License
I have launched 3-1 on RTX 2060, with mask size = 32. OpenCL elapsed time was 6 seconds, GPU appeared fully loaded
Does not look normal if consider result only.
What might be the reasons? Are there some issues with OpenCL or PyOpenCL to fight with? Or maybe kernel is suboptimal, just for OpenCL activation?
I use anaconda3 and pyopencl there and running example I got error
(cl) ~/work/p1/pyopencl-examples/1-3$ python city_distance.py
load program from cl source file
prepare data
create context
Choose platform:
[0] <pyopencl.Platform 'Intel(R) OpenCL HD Graphics' at 0x1f8c6c0>
[1] <pyopencl.Platform 'Experimental OpenCL 2.1 CPU Only Platform' at 0x1f6ddc0>
Choice [0]:0
Set the environment variable PYOPENCL_CTX='0' to avoid being asked again.
create command queue
prepare device memory for input / output
compile kernel code
execute kernel programs
wait for kernel executions
elapsed time: 0.094729371
Traceback (most recent call last):
File "city_distance.py", line 49, in <module>
cl.enqueue_read_buffer(queue, dev_fianl, final).wait()
AttributeError: module 'pyopencl' has no attribute 'enqueue_read_buffer'
(cl) ~/work/p1/pyopencl-examples/1-3$
as well for 2-1-implicit
(cl) ~/work/p1/pyopencl-examples/2-1-implicit$ python adjust_score.py
load program from cl source file
prepare data ...
create context
Choose platform:
[0] <pyopencl.Platform 'Intel(R) OpenCL HD Graphics' at 0x179dd70>
[1] <pyopencl.Platform 'Experimental OpenCL 2.1 CPU Only Platform' at 0x12b0220>
Choice [0]:0
Set the environment variable PYOPENCL_CTX='0' to avoid being asked again.
create command queue
prepare device memory for input / output
compile kernel code
execute kernel programs
wait for kernel executions
Traceback (most recent call last):
File "adjust_score.py", line 45, in <module>
cl.enqueue_read_buffer(queue, dev_fianl, final).wait()
AttributeError: module 'pyopencl' has no attribute 'enqueue_read_buffer'
(cl) ~/work/p1/pyopencl-examples/2-1-implicit$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.