-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Hi all,
I think I found a bug in the Vulkan backend regarding casting from booleans to other types.
The affected file is CodeGen_Vulkan_Dev (https://github.com/halide/Halide/blob/main/src/CodeGen_Vulkan_Dev.cpp) at lines:
Halide/src/CodeGen_Vulkan_Dev.cpp
Line 593 in e2448fe
SpvId true_value_id = builder.declare_constant(target_type, &true_data); |
Halide/src/CodeGen_Vulkan_Dev.cpp
Line 594 in e2448fe
SpvId false_value_id = builder.declare_constant(target_type, &false_data); |
To the declare_constant() method is passed the address of the std::vector object instead of the address of the first element contained by the std::vector. The possible solution I found in line with the code already present is the following (already tested):
SpvId true_value_id = builder.declare_constant(target_type, &true_data[0]);
SpvId false_value_id = builder.declare_constant(target_type, &false_data[0]);
Have a nice day :)
Metadata
Metadata
Assignees
Labels
No labels