Skip to content

Commit

Permalink
[circlechef] Remove extype used for custom op (#11867)
Browse files Browse the repository at this point in the history
This commit includes removing extype used for custom op because it is no longer necessary.

ONE-DCO-1.0-Signed-off-by: SeungHui Lee <[email protected]>
  • Loading branch information
Seunghui98 authored Nov 2, 2023
1 parent 7a9a062 commit d47f14f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions compiler/circlechef/core/src/ModelChef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ gather_builtincode_map(const ::circlechef::ModelRecipe &model_recipe)

for (const auto &operation : model_recipe.operation())
{
if (operation.type() == "Custom" || (operation.has_extype() && operation.extype() == "Custom"))
if (operation.type() == "Custom")
continue;

auto op_chef = op_chef_registry().lookup(operation.type()).create(&operation);
Expand All @@ -151,8 +151,7 @@ gather_builtincode_map(const ::circlechef::ModelRecipe &model_recipe)
const auto &graph = model_recipe.graph(g);
for (const auto &operation : graph.operation())
{
if (operation.type() == "Custom" ||
(operation.has_extype() && operation.extype() == "Custom"))
if (operation.type() == "Custom")
continue;

auto op_chef = op_chef_registry().lookup(operation.type()).create(&operation);
Expand All @@ -172,7 +171,7 @@ std::set<std::string> gather_customcode_set(const ::circlechef::ModelRecipe &mod
std::set<std::string> customcode_set;
for (const auto &operation : model_recipe.operation())
{
if (operation.type() == "Custom" || (operation.has_extype() && operation.extype() == "Custom"))
if (operation.type() == "Custom")
{
assert(not operation.custom_code().empty());
customcode_set.insert(operation.custom_code());
Expand All @@ -185,8 +184,7 @@ std::set<std::string> gather_customcode_set(const ::circlechef::ModelRecipe &mod
const auto &graph = model_recipe.graph(g);
for (const auto &operation : graph.operation())
{
if (operation.type() == "Custom" ||
(operation.has_extype() && operation.extype() == "Custom"))
if (operation.type() == "Custom")
{
assert(not operation.custom_code().empty());
customcode_set.insert(operation.custom_code());
Expand Down
1 change: 0 additions & 1 deletion compiler/circlechef/proto/circlechef.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ message Operation {
optional int32 version = 4 [default = 1];
optional string custom_code = 5;

optional string extype = 99;
optional BatchMatMulOptions batch_matmul_options = 100;
optional InstanceNormOptions instance_norm_options = 101;
optional BCQFullyConnectedOptions bcq_fully_connected_options = 102;
Expand Down

0 comments on commit d47f14f

Please sign in to comment.