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

[GPU] Allow unlimited allocations #25955

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vladimir-paramuzov
Copy link
Contributor

@vladimir-paramuzov vladimir-paramuzov commented Aug 7, 2024

Tickets:

@@ -3,13 +3,15 @@
//

#include "intel_gpu/runtime/debug_configuration.hpp"
#include "intel_gpu/runtime/device.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

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

[random spot]
Shouldn't we apply the same extended limit for OpenCL buffers?

cl_mem_flags flags = 0;
flags |= CL_MEM_ALLOW_UNRESTRICTED_SIZE_INTEL;

cl_mem buffer = clCreateBuffer(context, flags, size, host_ptr, errcode_ret);

switch (get_allocation_type()) {
case allocation_type::usm_host:
_buffer.allocateHost(_bytes_count);
_buffer.allocateHost(_bytes_count, &properties[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Accessing an empty vector (in case of engine->get_device_info().vendor_id == INTEL_VENDOR_ID) at index 0 with operator[] could cause UB probably
And specs say (regarding the properties argument): The list is terminated with the special property 0. So it should be either nullptr or vector with single 0 value by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: GPU OpenVINO GPU plugin no_stale Do not mark as stale under_perf_check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants