Skip to content

Commit 1bb37bd

Browse files
committed
Remove unused code
1 parent 9fd2a52 commit 1bb37bd

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

src/core/dev_api/openvino/runtime/shared_buffer.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ class SharedStreamBuffer : public std::streambuf {
118118
explicit SharedStreamBuffer(const void* data, size_t size)
119119
: SharedStreamBuffer(reinterpret_cast<const char*>(data), size) {}
120120

121-
const char* get_ptr() const { return m_data; }
122-
size_t get_size() const { return m_size; }
123-
124121
protected:
125122
// override std::streambuf methods
126123
std::streamsize xsgetn(char* s, std::streamsize count) override {

src/frontends/ir/src/frontend.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,13 @@ InputModel::Ptr FrontEnd::load_impl(const std::vector<ov::Any>& variants) const
222222
weights = std::make_shared<ov::SharedBuffer<std::shared_ptr<MappedMemory>>>(mapped_memory->data(),
223223
mapped_memory->size(),
224224
mapped_memory);
225-
} else if (ov::util::file_exists(weights_path)) {
226-
ov::util::ParallelReadStreamBuf par_buf(weights_path);
227-
std::istream bin_stream(&par_buf);
225+
} else if (std::ifstream bin_stream(weights_path, std::ios::binary); bin_stream.is_open()) {
228226
bin_stream.seekg(0, std::ios::end);
229-
const size_t file_size = static_cast<size_t>(bin_stream.tellg());
227+
size_t file_size = bin_stream.tellg();
230228
bin_stream.seekg(0, std::ios::beg);
231229

232230
auto aligned_weights_buffer = std::make_shared<ov::AlignedBuffer>(file_size);
233-
bin_stream.read(aligned_weights_buffer->get_ptr<char>(), file_size);
231+
bin_stream.read(aligned_weights_buffer->get_ptr<char>(), aligned_weights_buffer->size());
234232

235233
weights = std::make_shared<ov::SharedBuffer<std::shared_ptr<ov::AlignedBuffer>>>(
236234
aligned_weights_buffer->get_ptr<char>(),

src/plugins/intel_gpu/include/intel_gpu/graph/serialization/binary_buffer.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@
44

55
#pragma once
66

7-
#include <cstring>
8-
#include <iostream>
7+
#include <sstream>
98
#include <stdexcept>
10-
#include <string>
119
#include <type_traits>
1210
#include <vector>
1311
#include "buffer.hpp"
1412
#include "helpers.hpp"
1513
#include "bind.hpp"
16-
#include "intel_gpu/runtime/itt.hpp"
1714

1815

1916
namespace cldnn {
@@ -54,12 +51,11 @@ class BinaryInputBuffer : public InputBuffer<BinaryInputBuffer> {
5451
virtual ~BinaryInputBuffer() = default;
5552

5653
virtual void read(void* const data, std::streamsize size) {
57-
// Large-read parallelism is handled transparently by the streambuf layer
58-
// (ParallelMemStreamBuf for mmap tensors, ParallelReadStreamBuf for file streams).
5954
auto const read_size = _stream.rdbuf()->sgetn(reinterpret_cast<char*>(data), size);
6055
OPENVINO_ASSERT(read_size == size,
6156
"[GPU] Failed to read " + std::to_string(size) + " bytes from stream! Read " + std::to_string(read_size));
6257
}
58+
6359
void setKernelImplParams(void* impl_params) { _impl_params = impl_params; }
6460
void* getKernelImplParams() const { return _impl_params; }
6561

0 commit comments

Comments
 (0)