halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.9k stars 1.07k forks source link

Configure finds Vulkan but target.has_gpu_feature() returns false #8375

Open yurivict opened 3 months ago

yurivict commented 3 months ago

Configure prints this:

-- Enabling Vulkan target

but this code evaluates to false:

        find_gpu_target().has_gpu_feature();

Binaries aren't linked with vulkan libraries.

Version: 18.0.0 clang-18 FreeBSD 14.1

abadams commented 3 months ago

It's correct that the binaries aren't linked with vulkan libraries. They dlopen them instead.

find_gpu_target in tutorial lesson 12 doesn't consider Vulkan as a possibility. I'm hesitant to enable it, because we don't currently test vulkan on the bots due to some outstanding bugs (see https://github.com/halide/Halide/issues?q=is%3Aissue+is%3Aopen+vulkan)

yurivict commented 3 months ago

So how to use it then if I just want to see whether it works?

abadams commented 3 months ago

Change find_gpu_target to just return Target{"host-vulkan-vk_int8-vk_int16-vk_int64-vk_float16-vk_float64-vk_v13"}

Or just Target{"host-vulkan"} if you want to go with the minimum supported feature set.