Marmaduke,
I would also be interested in making PyOpenCL self contained enough that it can be installed without any further dependencies, in particular no OpenCL implementation. Ideally, 'pip install PyOpenCL' would just succeed no matter what. Pocl seems like a reasonable vehicle for that. The problem is that it has a nontrivial build system... And then there's LLVM... It feels like a substantial amount of engineering effort.
Another avenue I explored for a bit was a conda package. I even got to the point of making that work. I can dig those package recipes up if you're interested. I believe I also put them up on github. For those I did the thing that you asked about, which is link PyOpenCL directly to pocl.
Hope that helps, and let me know if you'd like to try and work together to engineer something.
Andreas
Am 18. Mai 2016 03:16:04 GMT-05:00, schrieb Marmaduke Woodman <mmwoodman(a)gmail.com>:
>hi
>
>I'm curious if anyone has succeeded in building and using PyOpenCL,
>linked
>directly to the Beignet or PortableCL runtimes?
>
>In my case, I'm writing a library using PyOpenCL, and it would be
>useful to
>fall-back on such an alternative, if the user of my library does not
>have
>an OpenCL installation such as Intel's or Nvidia's.
>
>
>Thanks,
>Marmaduke
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>PyOpenCL mailing list
>PyOpenCL(a)tiker.net
>https://lists.tiker.net/listinfo/pyopencl
Hi all,
I am not quite getting the function of the event system together with
non-blocking copies.
I want to enqueue a non-blocking copy function which returns an event
for a kernel to wait on:
wev1 = cl.enqueue_copy(IOqueue, device_image, host_image,
is_blocking=False, origin=(0,0,0), region=host_image_shape)
program.kernel_name(workqueue,(work_group_shape,),None,device_image,wait_for
= [wev1])
Both queues are defined as OoO queues in the same context on the same
device.
In my profiling I can see the start of the kernel, before the copying is
finished. Does that mean, I have to use blocking copies,
or am I doing something else wrong?
Thanks for any help
Jonathan
Marmaduke Woodman <mmwoodman(a)gmail.com> writes:
> Thanks. On Deb 7, after GCC 493, LLVM 37, Clang 37, I managed to build PoCL
> and PyOpenCL against it. However, when I import pyopencl in Python, I hit a
> link error, undefined symbol clLinkProgram.
>
> I also noticed that the _cffi.so in pyopencl doesn't link PoCL statically.
> Are these related? Any advice here on build flags in siteconf.py?
It could be that pocl doesn't implement all of CL 1.2.
CL_PRETEND_VERSION = "1.1"
may help.
Andreas
FYI: I was able to get Pyopencl running on Windows 10 using the method outlined in this link
https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_PyO…
The laptop is HP ENVY with I7-6700HQ with Intel 530 graphics and NVidia GeForce GTX 950M. I was able to get my code working on both graphics cards with no problems using both Python 2.7 and Python 3.5 based installers from anaconda, and the Pyopencl binaries from Christoph Golke, (2015 for 2.7, 2016 for 3.5). Python 3.5 is slow in a couple of places, seemingly due to arbitrary integer precision and the fact I have a couple of while loops that are 32 bit integer dependent. Indeed, those would not finish on the python 3.5 code. BUT, Pyopencl worked as expected. I did not run the test suite only my code.
Also, I was able to put Ubuntu 16.04 on this same laptop and get Pyopencl to run with no problems by using the Ubuntu repository binaries for nvidia-cuda-toolkit and python-pyopencl. However, I had to disable UEFI secure boot or the NVIDIA drivers would not load. I need to run the test suite here because I am seeing the following problem with my code.
On Windows everything calculates as expected that is I get the results I expect in my code test. In Ubuntu there appears to be a problem with my sorting function. (Code on windows and Ubuntu are exactly the same except for the program working directory.) That is particles in the simulation appear stacked to one side instead of uniformly randomly distributed across the simulation grid. If I remove the sorting function that problem goes away but the final answer I expect (100) is double (200). I see this on my Ubuntu 14.04 workstation with NVidia GTX 780 TI as well.
I assume the problem is in the CUDA toolkit and Pyopencl combination. No other systems have this behavior. I have the code running on windows on Intel Graphics Cards, AMD graphics cards, and now NVidia Cards. It doesn't work on Linux. The equivalent Cuda version works as expected on Linux and an OpenCL version using Scipy Weave inline works as expected (only a little slower).
Joe Reese Haywood, Ph.D., DABR
Medical Physicist
Johnson Family Cancer Center
Mercy Health Muskegon
1440 E. Sherman Blvd, Suite 300
Muskegon, MI 49444
Phone: 231-672-2019
Email: haywoojr(a)mercyhealth.com
Confidentiality Notice:
This e-mail, including any attachments is the property of Trinity Health and is intended for the sole use of the intended recipient(s). It may contain information that is privileged and confidential. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please delete this message, and reply to the sender regarding the error in a separate email.
Marmaduke Woodman <mmwoodman(a)gmail.com> writes:
> Another current problem is that PoCL also does not appear to work on
> Windows, which is a platform I would like to see supported, but I suspect
> this is just a few tweaks here and there to get it running since LLVM &
> CMake work on Windows.
>
> Ideally, a single PyOpenCL package would always have a PoCL platform to
> work with, but it could take advantage of Intel, AMD, etc if present. I
> guess this would require some work on the loader itself.
>
> I'm looking at rewriting a current numerical project to PyOpenCL so I'm
> willing to invest some effort here. Can you point out those conda recipes
> you mentioned?
https://github.com/inducer/ak-conda-recipeshttps://anaconda.org/inducer
Andreas
Hello sir/Madam
I'm a beginner of PyOpenCl. These days, I encounted some problems about the installation of pyopencl on Ubuntu OS.
My OS is ubuntu 15.04, and the instruction I am referring to is : https://wiki.tiker.net/PyOpenCL/Installation/Linux/Ubuntu.
I can not work through the step 3 which is "Build PyOpenCl". The error I encounted was as follow:
I don't know why? Can you help me?
BR//Zilong
Hi,
POCL has been okay - tested primarily with Fedora 22 on AMD.
Regards,
Benson
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 18 May 2016 10:16:04 +0200
> From: Marmaduke Woodman <mmwoodman(a)gmail.com>
> To: pyopencl(a)tiker.net
> Subject: [PyOpenCL] PyOpenCL linked to Beignet or PoCL
> Message-ID:
> <CAMqwjDa76JNSG_T6FNW0-WV7LoD4zgK7m1H35XKBUxbAKpNH1Q(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> hi
>
> I'm curious if anyone has succeeded in building and using PyOpenCL, linked
> directly to the Beignet or PortableCL runtimes?
>
> In my case, I'm writing a library using PyOpenCL, and it would be useful to
> fall-back on such an alternative, if the user of my library does not have
> an OpenCL installation such as Intel's or Nvidia's.
>
>
> Thanks,
> Marmaduke
>
hi
I'm curious if anyone has succeeded in building and using PyOpenCL, linked
directly to the Beignet or PortableCL runtimes?
In my case, I'm writing a library using PyOpenCL, and it would be useful to
fall-back on such an alternative, if the user of my library does not have
an OpenCL installation such as Intel's or Nvidia's.
Thanks,
Marmaduke
Dear Reese,
Sorry not with that combination. Perhaps something like this might be
useful to add to Pyopen-CL website (though could also be hosted elsewhere):
https://www.qubes-os.org/hcl/
Regards,
Benson
On 5/14/16 7:00 PM, pyopencl-request(a)tiker.net wrote:
> --------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 14 May 2016 04:11:18 +0000
> From: Joe Haywood <haywoojr(a)mercyhealth.com>
> To: pyopencl <pyopencl(a)tiker.net>
> Subject: [PyOpenCL] Pyopencl with nvidia cards
> Message-ID:
> <8A98791D01FC474D9BF9D985BB3805D1913FB738(a)NODCMSTMBX08.no.trinity-health.org>
>
> Content-Type: text/plain; charset="utf-8"
>
> I would like to know if anyone has had success using pyopencl with the newer Nvidia cards in laptops with Windows 10. Specifically I have followed this tutorial
> https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_PyO…
> For getting pyopencl working on an Intel only laptop with Windows 10. I'd like to get a laptop like the Asus ROG with i7 processor and Nvidia 970M. I don't want to buy the laptop and find out pyopencl doesn't work with the NVidia card. Also, I'd prefer not to have to download and use Windows studio either, hence the reason for following the above tutorial which uses the precompiled binary.
>
> Though Windows is preferable, if you have a similar hardware setup but with Linux, I'd like to know if you have that working.
>
> Thanks for any insights you might have
> Reese
>
> Confidentiality Notice:
> This e-mail, including any attachments is the property of Trinity Health and is intended for the sole use of the intended recipient(s). It may contain information that is privileged and confidential. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please delete this message, and reply to the sender regarding the error in a separate email.
>
"M.Rule" <mrule7404(a)gmail.com> writes:
> Update:
>
> I removed everything and used the system package manager. I think the "No
> module named 'pyopencl._cffi'" and "undefined symbol: clCreateSubDevice"
> were related to building from source. Using the package manger version
> seems to avoid these errors.
>
> Which just leaves the "PLATFORM_NOT_FOUND_KHR", and the related CUDA
> "cuInit failed: no device" error, which is presumably due to
> misconfiguration.
>
> I don't remember how to fix this. I searched around, and applied commonly
> reported solutions, but none have worked so far. I'll work on this some
> more later.
Two questions:
1) Do you see /dev/nvidia{0,1,2,3}?
2) Do you have sufficient permissions to access them from the account in
which you run your code?
About your issue with clCreateSubDevices: To fully rebuild, you may need
to 'rm -Rf build' before rebuilding, within the source directory.
Hope that helps,
Andreas