Skip to content

[GPU] Use the same flags as the whole buffer when creating an OCL subbuffer #31180

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: master
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
3 changes: 1 addition & 2 deletions src/plugins/intel_gpu/src/runtime/ocl/ocl_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ memory::ptr ocl_engine::create_subbuffer(const memory& memory, const layout& new
} else {
auto buffer = reinterpret_cast<const ocl::gpu_buffer&>(memory).get_buffer();
cl_buffer_region sub_buffer_region = { byte_offset, new_layout.get_linear_size() };
auto sub_buffer = buffer.createSubBuffer(CL_MEM_READ_WRITE| CL_MEM_USE_HOST_PTR,
CL_BUFFER_CREATE_TYPE_REGION, &sub_buffer_region);
auto sub_buffer = buffer.createSubBuffer({}, CL_BUFFER_CREATE_TYPE_REGION, &sub_buffer_region);

return std::make_shared<ocl::gpu_buffer>(this,
new_layout,
Expand Down
Loading