Closed alexfry closed 1 year ago
Thank you for the report, just some back story:
So the cool thing about OpenCL is that it can run on any CPU or GPU. However my code is definitely not build for CPU. The code architecture is expecting thousands of cores so it would probably be incredibly slow. It looks like on your end it tries to run on the CPU, which definitely is possible as I didn't built anything to check for / prefer the GPU. I'm just picking the first device available which in your case is a CPU.
Regarding your error, I need to replace const with __constant per https://stackoverflow.com/questions/27547974/what-is-a-constant-address-space-qualifier-in-opencl
Additionally I need to figure out a way to automatically choose the GPU / allow the user to select if multiple devices are available.
Ahh brilliant!
Looking forward to trying it out, will have a play with it on my Windows box later.
I played around with different ways of exposing the available devices but since the tool doesn't even run on the CPU I figured it'd be best to just throw up an error about CPU's not being supported.
For now I'd say if you want to play around with it, try it on a machine that has a dedicated GPU and it should automatically pick that one. Unfortunately adding CPU support is a bit further down the road (but definitely doable and a big reason for choosing openCL).
I should flag, this machine does have a dedicated GPU. Not a big one, but it is there, Radeon Pro 5500M 8GB.
I have however had some more success running it on a Windows 11 machine with an Nvidia GPU.
Great info! This means I still will have to figure out how to make it easy for the user to select a device. Thank you for the feedback :)
Added a new section "System" to manually select an opencl device. That section can later be used for memory management etc. You can find this feature in the latest release.
Device selection works!
But flare rendering is still failing.
INFO:root:ApertureTask.run: 0.166ms
INFO:root:StarburstTask.run: 0.430ms
INFO:root:ApertureTask.run: 0.133ms
INFO:root:GhostTask.run: 0.013ms
ERROR:root:'NoneType' object has no attribute 'array'
Traceback (most recent call last):
File "/Users/afry/.pyenv/versions/3.10.8/lib/python3.10/site-packages/realflare/api/engine.py", line 227, in render
render_func(project)
File "/Users/afry/.pyenv/versions/3.10.8/lib/python3.10/site-packages/realflare/api/engine.py", line 116, in flare
path_indexes = self.preprocess_task.run(project.flare, project.render)
File "/Users/afry/.pyenv/versions/3.10.8/lib/python3.10/site-packages/realflare/api/tasks/preprocessing.py", line 76, in run
areas = self.update_areas(rays)
File "/Users/afry/.pyenv/versions/3.10.8/lib/python3.10/site-packages/realflare/api/tasks/preprocessing.py", line 46, in update_areas
path_count, wavelength_count, ray_count = rays.array.shape
AttributeError: 'NoneType' object has no attribute 'array'
INFO:root:Engine.render: 9.101ms
Hey Beat
Just tried to get it running on an Intel Mac running Monterey. Running into some OpenCL errors.
Not sure if I'm running into a user error or a platform issue here?