Skip to content

Commit

Permalink
Revert "[GPU] WA to avoid too long consecutive runtime skippable nodes (
Browse files Browse the repository at this point in the history
#27635)" (#27781)

This reverts commit 9a5d3a5.

### Details:
 - The WA causes accuracy issue in mixtral model

### Tickets:
 - 157374
  • Loading branch information
wilson-seok authored Nov 29, 2024
1 parent 7b3fd79 commit 2d4f1b5
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
#include "scatter_nd_update_inst.h"
#include "program_helpers.h"

#include <unordered_map>

using namespace cldnn;

void mark_runtime_skippable_nodes::run(program& p) {
std::unordered_map<program_node*, uint8_t> runtime_skippable_depth;
auto itr = p.get_processing_order().begin();

while (itr != p.get_processing_order().end()) {
Expand Down Expand Up @@ -55,24 +52,6 @@ void mark_runtime_skippable_nodes::run(program& p) {
continue;
}

// Check whether consecutive runtime skippable nodes is lower than max count.
// Too long consecutive runtime skippable nodes causes huge time consumption in add_memory_dependency() of basic_memory_dependencies pass.
// max count 7 is experimentally selected in specific model.
const uint8_t max_runtime_skippable_depth = 7;
uint8_t dep_runtime_skippable_depth = 0;
for (const auto& dep : node->get_dependencies()) {
if (dep.first->is_runtime_skippable() &&
(runtime_skippable_depth.find(dep.first) != runtime_skippable_depth.end())) {
dep_runtime_skippable_depth = std::max(runtime_skippable_depth[dep.first], dep_runtime_skippable_depth);
}
}
if (!node->is_runtime_skippable() && (dep_runtime_skippable_depth >= max_runtime_skippable_depth)) {
GPU_DEBUG_TRACE_DETAIL << "[mark_runtime_skippable_nodes] : " << node->id()
<< " doesn't have runtime skippable due to max_runtime_skippable_depth("
<< static_cast<int>(max_runtime_skippable_depth) << ")." << std::endl;
continue;
}

program_helpers::do_for_types<gather>(*node, [](gather_node& node) {
// Check pattern
auto impl_params = node.get_kernel_impl_params();
Expand Down Expand Up @@ -276,9 +255,5 @@ void mark_runtime_skippable_nodes::run(program& p) {
GPU_DEBUG_TRACE_DETAIL << "[mark_runtime_skippable_nodes] : " << node.id() << " can_be_optimized" << std::endl;
}
});

if (node->is_runtime_skippable()) {
runtime_skippable_depth[node] = dep_runtime_skippable_depth + 1;
}
}
}

0 comments on commit 2d4f1b5

Please sign in to comment.