Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
KexinFeng committed Jul 8, 2022
1 parent e36c9f0 commit 5a87a0c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/operator/subgraph/dnnl/dnnl_remove_casts_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class SgDNNLRemoveCastsSelector : public SubgraphSelectorV2 {
}

void Reset() override {
status_ = kFail;
status_ = kExpand;
castDtype = -1;
}
};
Expand All @@ -105,7 +105,7 @@ class SgDNNLRemoveCastsProperty : public SubgraphProperty {
SgDNNLRemoveCastsProperty() {}

static SubgraphPropertyPtr Create() {
static const std::string& name = "Remove casts optimization pass";
static const std::string& name = "Remove Casts optimization pass";
auto property = std::make_shared<SgDNNLRemoveCastsProperty>();
property->SetAttr<std::string>("property_name", name);
property->SetAttr<bool>("inference_only", true);
Expand Down Expand Up @@ -137,6 +137,15 @@ class SgDNNLRemoveCastsProperty : public SubgraphProperty {
auto selector = std::make_shared<SgDNNLRemoveCastsSelector>();
return selector;
}

void ConnectSubgraphOutputs(const nnvm::ObjectPtr subgraph_node,
std::vector<nnvm::NodeEntry*>* output_entries) const override {
// Connect all extern output entries to output[0]
for (size_t i = 0; i < output_entries->size(); ++i) {
auto entry_ptr = output_entries->at(i);
*entry_ptr = nnvm::NodeEntry{subgraph_node, entry_ptr->index, 0};
}
}
};

} // namespace op
Expand Down

0 comments on commit 5a87a0c

Please sign in to comment.