Skip to content

[SYCL][UR][L0 v2] add missing offset calculation to #18355

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 1 commit into
base: sycl
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions unified-runtime/source/adapters/level_zero/v2/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ ur_usm_handle_t::ur_usm_handle_t(ur_context_handle_t hContext, size_t size,

void *ur_usm_handle_t::getDevicePtr(
ur_device_handle_t /*hDevice*/, device_access_mode_t /*access*/,
size_t /*offset*/, size_t /*size*/,
size_t offset, size_t /*size*/,
std::function<void(void *src, void *dst, size_t)> /*migrate*/) {
return ptr;
return ur_cast<char *>(ptr) + offset;
}

void *
ur_usm_handle_t::mapHostPtr(ur_map_flags_t /*flags*/, size_t /*offset*/,
ur_usm_handle_t::mapHostPtr(ur_map_flags_t /*flags*/, size_t offset,
size_t /*size*/,
std::function<void(void *src, void *dst, size_t)>) {
return ptr;
return ur_cast<char *>(ptr) + offset;
}

void ur_usm_handle_t::unmapHostPtr(
Expand Down
Loading