Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[circlechef] Remove extype used for custom op #11867

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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