Skip to content

Commit

Permalink
Update for recently added primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonbok committed Jul 22, 2022
1 parent feced4e commit eb28f54
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 23 deletions.
4 changes: 3 additions & 1 deletion src/plugins/intel_gpu/src/graph/impls/cpu/assign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ struct assign_impl : public typed_primitive_impl<assign> {
void init_kernels() override {}

public:
static primitive_impl* create(assign_node const& arg) { return new assign_impl{}; }
static primitive_impl* create(const assign_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
return new assign_impl{};
}
};


Expand Down
4 changes: 3 additions & 1 deletion src/plugins/intel_gpu/src/graph/impls/cpu/read_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ struct read_value_impl : public typed_primitive_impl<read_value> {
void init_kernels() override {}

public:
static primitive_impl* create(read_value_node const& arg) { return new read_value_impl{}; }
static primitive_impl* create(const read_value_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
return new read_value_impl{};
}
};

namespace detail {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ struct adaptive_pooling_impl : public typed_primitive_impl_ocl<adaptive_pooling>
}

public:
static primitive_impl* create(const adaptive_pooling_node& arg) {
auto params = get_default_params<kernel_selector::adaptive_pooling_params>(arg);
static primitive_impl* create(const adaptive_pooling_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
auto params = get_default_params<kernel_selector::adaptive_pooling_params>(*impl_param);
auto optional_params = get_default_optional_params<kernel_selector::adaptive_pooling_optional_params>(arg.get_program());

const auto& primitive = arg.get_primitive();
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_gpu/src/graph/impls/ocl/bucketize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct bucketize_impl : typed_primitive_impl_ocl<bucketize> {
return make_unique<bucketize_impl>(*this);
}

static primitive_impl* create(const bucketize_node& arg) {
auto params = get_default_params<kernel_selector::bucketize_params>(arg);
static primitive_impl* create(const bucketize_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
auto params = get_default_params<kernel_selector::bucketize_params>(*impl_param);
auto optional_params =
get_default_optional_params<kernel_selector::bucketize_optional_params>(arg.get_program());

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_gpu/src/graph/impls/ocl/dft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ struct dft_impl : typed_primitive_impl_ocl<dft> {
return make_unique<dft_impl>(*this);
}

static primitive_impl* create(const dft_node& arg) {
auto params = get_default_params<kernel_selector::dft_params>(arg);
static primitive_impl* create(const dft_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
auto params = get_default_params<kernel_selector::dft_params>(*impl_param);
auto primitive = arg.get_primitive();
params.axes = primitive->axes;
if (primitive->kind == dft_kind::inverse) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ struct experimental_detectron_detection_output_impl
}

public:
static primitive_impl* create(const experimental_detectron_detection_output_node& arg) {
auto params = get_default_params<kernel_selector::experimental_detectron_detection_output_params>(arg);
static primitive_impl* create(const experimental_detectron_detection_output_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
auto params = get_default_params<kernel_selector::experimental_detectron_detection_output_params>(*impl_param);
auto optional_params =
get_default_optional_params<kernel_selector::experimental_detectron_detection_output_optional_params>(
arg.get_program());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ struct experimental_detectron_generate_proposals_single_image_impl
}

public:
static primitive_impl* create(const experimental_detectron_generate_proposals_single_image_node& arg) {
auto params = get_default_params<kernel_selector::experimental_detectron_generate_proposals_single_image_params>(arg);
static primitive_impl* create(const experimental_detectron_generate_proposals_single_image_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
auto params = get_default_params<kernel_selector::experimental_detectron_generate_proposals_single_image_params>(*impl_param);
auto optional_params = get_default_optional_params<
kernel_selector::experimental_detectron_generate_proposals_single_image_optional_params>(arg.get_program());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ struct experimental_detectron_prior_grid_generator_impl
return make_unique<experimental_detectron_prior_grid_generator_impl>(*this);
}

static primitive_impl* create(const experimental_detectron_prior_grid_generator_node& arg) {
auto params = get_default_params<kernel_selector::experimental_detectron_prior_grid_generator_params>(arg);
static primitive_impl* create(const experimental_detectron_prior_grid_generator_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
auto params = get_default_params<kernel_selector::experimental_detectron_prior_grid_generator_params>(*impl_param);
auto primPtr = arg.get_primitive();
auto& prim = *primPtr;

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_gpu/src/graph/impls/ocl/reverse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct reverse_impl : typed_primitive_impl_ocl<reverse> {
}

public:
static primitive_impl* create(const reverse_node& arg) {
auto params = get_default_params<kernel_selector::reverse_params>(arg);
static primitive_impl* create(const reverse_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
auto params = get_default_params<kernel_selector::reverse_params>(*impl_param);
const auto optional_params =
get_default_optional_params<kernel_selector::reverse_optional_params>(arg.get_program());

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_gpu/src/graph/impls/ocl/roll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct roll_impl : typed_primitive_impl_ocl<roll> {
return make_unique<roll_impl>(*this);
}

static primitive_impl* create(const roll_node& arg) {
auto roll_params = get_default_params<kernel_selector::roll_params>(arg);
static primitive_impl* create(const roll_node& arg, std::shared_ptr<kernel_impl_params> impl_param) {
auto roll_params = get_default_params<kernel_selector::roll_params>(*impl_param);
auto roll_optional_params =
get_default_optional_params<kernel_selector::roll_optional_params>(arg.get_program());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct reduction_onednn : typed_primitive_onednn_impl<reduce, dnnl::reduction::d
}

public:
static primitive_impl* create(const reduce_node& arg) {
static primitive_impl* create(const reduce_node& arg, std::shared_ptr<kernel_impl_params>) {
auto& engine = arg.get_program().get_engine();
auto desc = get_reduction_descriptor(arg);
auto attr = arg.get_onednn_primitive_attributes();
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_gpu/src/graph/include/primitive_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#pragma once

#include "intel_gpu/runtime/layout.hpp"

#include "kernel_selector_helper.h"
#include <memory>
#include <string>

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ static bool is_node_for_onednn(program_node& node, fully_connected_node const& f
bool is_suitable_for_onednn = true;
auto out_layout = node.get_output_layout();
for (auto& fo : node.get_fused_primitives()) {
if (fo.node->is_type<eltwise>()) {
if (fo.is_type<eltwise>()) {
// FC checkings
auto in_layout = node.get_dependency(fo.dep_start_idx).get_output_layout();
auto in_dt = in_layout.data_type;
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/intel_gpu/src/graph/program_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,6 @@ void program_node::init_onednn_primitive_attributes() {
update_onednn_post_op_list(onednn_post_op_type::eltwise_act, empty_mem);
}
} else if (desc.is_type<eltwise>()) {
//auto& e_node = node->as<eltwise>();
auto dep_idx = desc.dep_start_idx;
auto in = get_dependency(dep_idx).get_output_layout();

Expand Down Expand Up @@ -932,7 +931,6 @@ void program_node::init_onednn_primitive_attributes() {
}
}
} else if (desc.is_type<quantize>()) {
// auto& q_node = node->as<quantize>();
auto dep_idx = desc.dep_start_idx;

// ********************************* Common case with output range usage ********************************* //
Expand Down

0 comments on commit eb28f54

Please sign in to comment.