Skip to content

Vulkan generated targets and shader organization #5356

Closed
@bandoti

Description

@bandoti

The generated header ggml-vulkan-shaders.hpp is 3 MB of generated binary from the packed Vulkan shaders. These should ideally be generated as a make or CMake target at build time instead of being placed under source control.

In addition, I would like to propose splitting the actual shaders out from ggml_vk_generate_shaders.py. It will likely be easier to reason about the shaders (even though there will be many of them) if they are placed within a separate folder (perhaps $LLAMA_ROOT/vulkan) and then collected/assembled by the python script, instead of having them inline.

That way it will be clearer which part of Vulkan is affected by a given change—and also commit conflicts will be lessened if multiple people are working on separate shaders. In addition, if new shaders need to be added they can simply be dropped in the folder, and the python script may glob them before packing into ggml-vulkan-shaders.hpp.

The hard work to get Vulkan going is greatly appreciated—I look forward to exploring this back-end further. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    VulkanIssues specific to the Vulkan backendenhancementNew feature or requeststale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions