mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[GH-ISSUE #22] Bundle torch-cublas-hgemm #14
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-kitchen#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @woct0rdho on GitHub (Jan 17, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/22
As you're already using cublas, would you consider bundling torch-cublas-hgemm in this repo? It's been in ComfyUI's
--fastfor a while. Bundling it would make it easier for more people to install it.@contentis commented on GitHub (Jan 22, 2026):
Can you explain what the added gain would be? PyTorch is already relying on cublasLt for all GEMM operations and it should do the exact same calls. ReLU, GeLU should be possible to be enforced but the seed-up not very large.
If I'm not mistaken you can enable the half accum in PyTorch directly by using https://docs.pytorch.org/docs/stable/backends.html#torch.backends.cuda.matmul.allow_fp16_reduced_precision_reduction
And I belive this is even a start-up flag in ComfyUI
@woct0rdho commented on GitHub (Jan 22, 2026):
In my impression
--fast cublas_opsindeed gives speedup when running SDXL, even when--fast fp16_accumulationis already enabled. But I may need to do benchmarking again when I have time.@woct0rdho commented on GitHub (Jan 26, 2026):
Nevermind. After doing benchmarks again and looking at the source code, I can confirm that nowadays
torch.nn.Linearis as fast asCublasLinearwhen fp16 accum is enabled.