stable-diffusion.cpp icon indicating copy to clipboard operation
stable-diffusion.cpp copied to clipboard

GGMLRunner: avoid multiple calls to get_graph

Open idostyle opened this issue 8 months ago • 0 comments

Not setting up the compute graph twice might result in a minor (/negligible?) performance improvement.

Previously it worked like the following in GGMLRunner#compute:

  1. calls alloc_compute_buffer 1.1 calls reset_compute_ctx 1.2 calls get_graph
  2. calls reset_compute_ctx
  3. calls get_graph

Tested on cpu and vulkan locally.

idostyle avatar Apr 03 '25 13:04 idostyle