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

[PyOV] Fix segfault when constructing std::string and using GPU Plugin #26121

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/bindings/python/src/pyopenvino/core/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void fill_tensor_from_strings(ov::Tensor& tensor, py::array& array) {
PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, reinterpret_cast<void*>(ptr), buf.itemsize / 4);
PyObject* _utf8_obj = PyUnicode_AsUTF8String(_unicode_obj);
const char* _tmp_str = PyBytes_AsString(_utf8_obj);
data[i] = std::string(_tmp_str);
data[i] = std::string(_tmp_str, buf.ndim == 0 ? buf.itemsize : buf.strides[0]);
Py_XDECREF(_unicode_obj);
Py_XDECREF(_utf8_obj);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ def create_lookup_table_size_net(self, hash_table_type, keys_type, values_type,
@pytest.mark.nightly
def test_lookup_table_size(self, hash_table_type, params, ie_device, precision, ir_version, temp_dir,
use_legacy_frontend):
keys_type = params['keys_type']
if ie_device == 'GPU' and keys_type == str:
pytest.skip("148921: Segmentation fault on GPU")
self._test(*self.create_lookup_table_size_net(hash_table_type=hash_table_type, **params),
ie_device, precision, ir_version, temp_dir=temp_dir,
use_legacy_frontend=use_legacy_frontend)
Loading