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

[BYOC][COREML] Handle one symbol for each runtime #5989

Merged
merged 2 commits into from
Jul 14, 2020

Conversation

kazum
Copy link
Contributor

@kazum kazum commented Jul 3, 2020

It's no longer necessary to handle multiple subgraphs in one runtime thanks to the change of #5770, which simplifies the CoreML runtime a bit.

@zhiics @mbaret @FrozenGene Please help this to review.

stream->Write(symbol_);
stream->Write((uint64_t)[dirData length]);
stream->Write([dirData bytes], [dirData length]);
LOG(INFO) << "Save " << symbol_ << " (" << [dirData length] << " bytes)";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to DLOG?


// TODO: Support multiple outputs.
NDArray out = model.GetOutput(0);
NDArray out = model_->GetOutput(0);
if (args[args.size() - 1].type_code() == kTVMDLTensorHandle) {
DLTensor* arg = args[args.size() - 1];
out.CopyTo(arg);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the ndarrays allocated by the host for both inputs and outputs? If so, I think we might be able to do zero copy (in a separate PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will do it in the next PR :)

@zhiics zhiics merged commit 5d75f8c into apache:master Jul 14, 2020
@zhiics
Copy link
Member

zhiics commented Jul 14, 2020

Thanks @kazum

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jul 14, 2020
* [BYOC][COREML] Handle one symbol for each runtime

* LOG -> DLOG
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jul 14, 2020
* [BYOC][COREML] Handle one symbol for each runtime

* LOG -> DLOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants