mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-16 01:00:49 +08:00
write better tx commentary
This commit is contained in:
parent
e2b440b25e
commit
e2d29926a9
@ -170,8 +170,11 @@ def cast_bias_weight_with_vbar(s, dtype, device, bias_dtype, non_blocking, compu
|
||||
|
||||
if pin is not None:
|
||||
xfer_dest = comfy.memory_management.interpret_gathered_like([ pin ], xfer_dest)[0]
|
||||
#FIXME: This might be the wrong thing to do. Some reading suggests the DMA engine
|
||||
#is posted writes and the compute stream could just fire and forget here. That
|
||||
#would save this sync and some stalling on the offload stream that is better off
|
||||
#running ahead to the next layer to read.
|
||||
if offload_stream is not None:
|
||||
#FIXME: if post cast didnt do anything this sync is un-needed
|
||||
offload_stream.wait_stream(comfy.model_management.current_stream(device))
|
||||
comfy.model_management.cast_to(xfer_dest, device=pin.device, non_blocking=non_blocking, stream=offload_stream, r=pin)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user