Add device-side workspace prep kernel#4
Conversation
wangye805
left a comment
There was a problem hiding this comment.
Overall looks good. Two issues:
1). With host pinned memory moved to device, we will need to increase the device workspace size for the previous host pinned memory, right? But I didn't see where are they
2). How about the performance of this host->device change? Can we test several configs, maybe starting from ck example c++ api first.
If the performance and correctness looks good, we can file PR to CK first. Then we will also need to validate this change in tridao's flash-attn
The (very small) host-side memory was simply for metadata for the kernel launch since it needed to be graph safe. With the on-device kernel the memory cost is eliminated entirely.
Sure, I'll post a follow-up with comparisons. |
The runtimes are comparable with no indication of a meaningful regression. |
Actually, the runtime looks consistently better. Try to have hd64 comparison as well. If the device side is always better, we should suggest to CK to remove the host side kernel |
Motivation
Removes host-side memory management requirements by computing metadata directly on device.
Technical Details
Test Plan
Test Result
Submission Checklist