Cleaning up HAL buffer transfer usage.#8556
Merged
Conversation
Device-specific transfer allows for more optimized transfer impls.
A rubbish API.
ccc5876 to
98304d2
Compare
Collaborator
Author
|
Failing test was the asan flake in scalar.mlir. |
ScottTodd
reviewed
Mar 16, 2022
Comment on lines
223
to
228
| status = iree_hal_cuda_buffer_wrap( | ||
| (iree_hal_allocator_t*)allocator, memory_type, params->access, | ||
| allocator->base_device, base_allocator, memory_type, params->access, | ||
| params->usage, allocation_size, | ||
| /*byte_offset=*/0, | ||
| /*byte_length=*/allocation_size, device_ptr, host_ptr, &buffer); |
Member
There was a problem hiding this comment.
compile error caught on postsubmit:
../iree/hal/cuda/cuda_allocator.c:228:64: error: too many arguments to function call, expected 10, have 11
/*byte_length=*/allocation_size, device_ptr, host_ptr, &buffer);
^~~~~~~
../iree/hal/cuda/cuda_buffer.h:19:1: note: 'iree_hal_cuda_buffer_wrap' declared here
iree_status_t iree_hal_cuda_buffer_wrap(
^
Contributor
There was a problem hiding this comment.
I just hit the same issue when building IREE with dbg mode.
ScottTodd
added a commit
that referenced
this pull request
Mar 17, 2022
Fixes the compile warning/error reported at #8556 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This cleans up places using the
iree_hal_buffer_*API in an effort to move more toward device-based transfers. In order to make the requirement of the buffer functions acting on mappable buffers more explicit "map" was added to their name.