Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonbok committed Apr 30, 2024
1 parent 2a20287 commit 399fd56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ namespace cldnn {
struct memory;
struct shared_mem_params;
class engine;

using primitive_id = std::string;
//struct memory_user;
//struct memory_user_comparer;
//using memory_set = std::set<memory_user, memory_user_comparer>;
using memory_ptr = std::shared_ptr<memory>;

struct memory_user {
size_t _unique_id;
uint32_t _network_id;
Expand Down
7 changes: 2 additions & 5 deletions src/plugins/intel_gpu/src/runtime/memory_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ memory::ptr memory_pool::alloc_memory(const layout& layout, allocation_type type

memory_pool::~memory_pool() {}

bool memory_pool::has_conflict(const memory_set& a,
bool memory_pool::has_conflict(const memory_set& mem_cand,
const std::unordered_set<size_t>& restrictions,
uint32_t b_network_id) {
for (auto const& mem_usr : a) {
for (const auto& mem_usr : mem_cand) {
if (restrictions.find(mem_usr._unique_id) != restrictions.end())
return true;
}
Expand Down Expand Up @@ -114,10 +114,7 @@ memory::ptr memory_pool::get_from_non_padded_pool(const layout& layout,
allocation_type type,
bool reset) {
auto it = _non_padded_pool.lower_bound(layout.bytes_count());
// std::cout << "Get memory from pool for " << prim_id << " (" << layout.bytes_count() << ")" << std::endl;
while (it != _non_padded_pool.end()) {
// std::cout << " --- check mem " << it->second._memory->get_layout().bytes_count() << std::endl;
// std::cout << " # mem deps : " << restrictions.size() << " , # mem users: " << it->second._users.size() << std::endl;
if (it->second._network_id == network_id &&
it->second._type == type &&
it->second._memory->get_layout().format != format::fs_b_yx_fsv32 &&
Expand Down

0 comments on commit 399fd56

Please sign in to comment.