Halide icon indicating copy to clipboard operation
Halide copied to clipboard

Python bindings gpu support.

Open LazyDodo opened this issue 6 years ago • 5 comments

I'm working on building the python bindings on windows, and most the correctness and tutorials seem to run, the only issue i have is lesson 12 using the gpu has black image coming back from the GPU (for both opencl and cuda). Before I sink too much time into this, can anyone provide a sanity check and validate this tutorial actually currently works on linux/mac?

LazyDodo avatar Apr 03 '19 21:04 LazyDodo

Confirmed that it's broken on linux, but somehow this doesn't mark the test as failed, so we didn't notice. The C++ version of the test passes. Adding input.set_host_dirty() in main seems to fix it for me. The Buffer constructor must somehow not be setting it.

abadams avatar Apr 03 '19 22:04 abadams

Allright! can confirm calling input.set_host_dirty() fixes it, thanks for the sanity check!

LazyDodo avatar Apr 03 '19 22:04 LazyDodo

The fact that there is a difference between Python and C++ here indicates there's something amiss.

steven-johnson avatar Jul 31 '19 17:07 steven-johnson

Also noticed the same thing.

oliver-batchelor avatar Jun 19 '20 07:06 oliver-batchelor

Though the suggested fix also does not work for me - with input.set_host_dirty() AssertionError: Mismatch between output (0) and reference output (255) at 463, 0, 0

Without set_host_dirty: AssertionError: Mismatch between output (0) and reference output (3) at 1, 0, 0

oliver-batchelor avatar Jun 19 '20 07:06 oliver-batchelor