Skip to content

[SYCL][UR][L0 v2] import host ptr when SYCL_USM_HOSTPTR_IMPORT=1 and fix mapHostPtr #19297

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

Open
wants to merge 2 commits into
base: sycl
Choose a base branch
from

Conversation

igchor
Copy link
Member

@igchor igchor commented Jul 3, 2025

No description provided.

@igchor igchor requested a review from a team as a code owner July 3, 2025 17:37
@igchor igchor temporarily deployed to WindowsCILock July 3, 2025 17:37 — with GitHub Actions Inactive
@igchor igchor temporarily deployed to WindowsCILock July 3, 2025 17:59 — with GitHub Actions Inactive
@igchor igchor temporarily deployed to WindowsCILock July 3, 2025 17:59 — with GitHub Actions Inactive
igchor added 2 commits July 3, 2025 18:26
This matches v1 functionality and speeds up subsequent
buffer map/unmap operations by making memory copy faster.
The logic for freeing mappedPtr was incorrect. We should only free
the memory in unmapHostPtr if the pointer was allocated in mapHostPtr,
not the other way around.
Copy link
Contributor

@pbalcer pbalcer left a comment

Choose a reason for hiding this comment

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

lgtm, but tests seem to be failing:

native_specialization_constant

ur_integrated_buffer_handle_t(ur_context_handle_t hContext, void *hostPtr,
size_t size, host_ptr_action_t useHostPtr,
device_access_mode_t accesMode);
size_t size, device_access_mode_t accesMode);

ur_integrated_buffer_handle_t(ur_context_handle_t hContext, void *hostPtr,
size_t size, device_access_mode_t accesMode,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
size_t size, device_access_mode_t accesMode,
size_t size, device_access_mode_t accessMode,

(I know, unrelated to this PR :P)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants