Skip to content

Commit

Permalink
Complete to run benchmark_app f32 for resample cpu impl
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinchoi-intel committed Dec 24, 2024
1 parent 0f00606 commit 219ebb1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/plugins/intel_gpu/src/graph/impls/ocl/resample.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "impls/registry/implementation_manager.hpp"
#include "program_node.h"
//#include "intel_gpu/primitives/resample.hpp"
#include "resample_inst.h"

#include <memory>
namespace cldnn {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const std::vector<std::shared_ptr<cldnn::ImplementationManager>>& Registry<resam
// [](const cldnn::program_node& node){
// return false;
// })

OV_GPU_GET_INSTANCE_CPU(resample, shape_types::static_shape,
[](const cldnn::program_node& node){
return true;
Expand All @@ -46,6 +45,18 @@ const std::vector<std::shared_ptr<cldnn::ImplementationManager>>& Registry<resam
// [](const cldnn::program_node& node){
// return false;
// })


// OV_GPU_GET_INSTANCE_OCL(resample, shape_types::static_shape, not_in_shape_flow())
// OV_GPU_GET_INSTANCE_OCL(resample, shape_types::dynamic_shape, not_in_shape_flow())
// OV_GPU_GET_INSTANCE_CPU(resample, shape_types::static_shape, in_shape_flow())
// OV_GPU_GET_INSTANCE_CPU(resample, shape_types::dynamic_shape, in_shape_flow())


// OV_GPU_CREATE_INSTANCE_OCL(ocl::ResampleImplementationManager, shape_types::static_shape, not_in_shape_flow())
// //OV_GPU_CREATE_INSTANCE_OCL(ocl::ResampleImplementationManager, shape_types::dynamic_shape, not_in_shape_flow())
// OV_GPU_GET_INSTANCE_CPU(resample, shape_types::static_shape, in_shape_flow())
// //OV_GPU_GET_INSTANCE_CPU(resample, shape_types::dynamic_shape, in_shape_flow())
};

return impls;
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/intel_gpu/src/graph/include/primitive_type_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ struct primitive_type_base : primitive_type {

std::shared_ptr<ImplementationManager> choose_impl(const program_node& node, shape_types requested_shape_type) const override {
OPENVINO_ASSERT(node.type() == this, "[GPU] primitive_type_base::choose_impl: primitive type mismatch");
// if (node.id().find("interpolate:Interpolate") != std::string::npos)
// std::cout << "=============================================" << node.id() << std::endl;
for (auto& impl : get_supported_implementations(node)) {
impl_types impl_type = impl->get_impl_type();
if ((node.get_forced_impl_type() & impl_type) != impl_type)
Expand All @@ -58,6 +60,7 @@ struct primitive_type_base : primitive_type {
if ((requested_shape_type & supported_shape_type) != requested_shape_type && requested_shape_type != shape_types::any)
continue;

// std::cout << "=== choose_impl " << node.id() << ", impl_type=" << impl_type << std::endl;
return impl;
}
return nullptr;
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/intel_gpu/src/graph/primitive_inst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1792,6 +1792,10 @@ void primitive_inst::prepare_primitive() {
}
GPU_DEBUG_TRACE_DETAIL << "-----------------------------------------------------------------" << std::endl;

// if (this->get_node().id().find("__module.depth_head.scratch.refinenet1/aten::upsample_bilinear2d/Interpolate") != std::string::npos) {
// std::cout << "=============" << std::endl;
// std::cout << "=============primitive_inst::prepare_primitive() " << this->get_node().id() << ", impl_type=" << this->_impl->m_manager->get_impl_type() << std::endl;
// }
// If it is optimized out or skipped for zero dimension at the previous iteration,
// Set this flag true to reset output memory in realloc_if_needed.
const bool prev_execution_skipped = can_be_optimized()
Expand Down Expand Up @@ -1972,6 +1976,9 @@ void primitive_inst::execute() {

set_out_event(_impl->execute(_impl_params->dep_events, *this));

// if (this->get_node().id().find("__module.depth_head.scratch.refinenet1/aten::upsample_bilinear2d/Interpolate") != std::string::npos)
// std::cout << "=============primitive_inst::execute() " << this->get_node().id() << ", impl_type=" << this->_impl->m_manager->get_impl_type() << std::endl;

GPU_DEBUG_GET_INSTANCE(debug_config);
GPU_DEBUG_IF(!debug_config->dump_profiling_data.empty()) {
auto ev = _impl_params->out_event;
Expand Down

0 comments on commit 219ebb1

Please sign in to comment.