Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cuda] Avoid sorting descriptors in stream command buffer #15437

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

antiagainst
Copy link
Contributor

This commit changes the stream command buffer to keep track of a fixed list of descriptor sets. This simplifies the logic of pushing descriptors/constants; we only perform kernel parameter serialization at the dispatch time. This means we don't pay the overhead if multiple push descriptor/constant commands are issued before dispatching. Also we don't need to sort descriptors anymore.

Progress towards #13245

This commit changes the stream command buffer to keep track of a fixed
list of descriptor sets. This simplifies the logic of pushing
descriptors/constants; we only perform kernel parameter serialization at
the dispatch time. This means we don't pay the overhead if multiple push
descriptor/constant commands are issued before dispatching. Also we
don't need to sort descriptors anymore.
@antiagainst antiagainst added the hal/cuda Runtime CUDA HAL backend label Nov 6, 2023
Copy link
Collaborator

@benvanik benvanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nits, great cleanup!

experimental/cuda2/stream_command_buffer.c Outdated Show resolved Hide resolved
experimental/cuda2/stream_command_buffer.c Show resolved Hide resolved
experimental/cuda2/stream_command_buffer.c Show resolved Hide resolved
@antiagainst
Copy link
Contributor Author

Hi @benvanik, a kind ping on this. :)

@antiagainst antiagainst merged commit 522fac0 into iree-org:main Nov 14, 2023
48 checks passed
@antiagainst antiagainst deleted the cuda2-no-sort-stream-cmdbuf branch November 14, 2023 05:31
ramiro050 pushed a commit to ramiro050/iree that referenced this pull request Dec 19, 2023
…5437)

This commit changes the stream command buffer to keep track of a fixed
list of descriptor sets. This simplifies the logic of pushing
descriptors/constants; we only perform kernel parameter serialization at
the dispatch time. This means we don't pay the overhead if multiple push
descriptor/constant commands are issued before dispatching. Also we
don't need to sort descriptors anymore.

Progress towards iree-org#13245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hal/cuda Runtime CUDA HAL backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants