forked from mindspore-Ecosystem/mindspore
[MSLITE] mindrt actor name unique
This commit is contained in:
parent
2a6caf97cc
commit
d41a56f7f2
|
@ -727,6 +727,9 @@ std::vector<std::shared_ptr<LiteOpActor>> CreateOpActor(const std::vector<kernel
|
|||
return actors;
|
||||
}
|
||||
for (auto &kernel : kernels) {
|
||||
/* make subgraph name (actor name) unique */
|
||||
kernel->set_name(kernel->name() + to_string(actor_count++));
|
||||
|
||||
if ((kernel::LiteKernelUtil::IsSwitchCall(kernel))) {
|
||||
auto switch_actor = std::make_shared<LiteSwitchOpActor>(kernel);
|
||||
if (switch_actor == nullptr) {
|
||||
|
|
|
@ -150,6 +150,7 @@ class LiteSwitchOpActor : public LiteOpActor {
|
|||
int MindrtInit();
|
||||
void MindrtTerminate(const std::vector<std::shared_ptr<LiteOpActor>> &);
|
||||
|
||||
static std::atomic_int64_t actor_count = 0;
|
||||
std::vector<std::shared_ptr<LiteOpActor>> CreateOpActor(const std::vector<kernel::LiteKernel *> &kernels,
|
||||
const lite::InnerContext *ctx);
|
||||
} // namespace mindspore::lite
|
||||
|
|
Loading…
Reference in New Issue