Skip to content

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

Merged
zhiics merged 2 commits into
apache:masterfrom
kazum:coreml_cleanup
Jul 14, 2020
Merged

[BYOC][COREML] Handle one symbol for each runtime#5989
zhiics merged 2 commits into
apache:masterfrom
kazum:coreml_cleanup

Conversation

@kazum

@kazumkazum commented Jul 3, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

Choose a reason for hiding this comment

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

change to DLOG?

NDArray out = model_->GetOutput(0);
if (args[args.size() - 1].type_code() == kTVMDLTensorHandle) {
DLTensor* arg = args[args.size() - 1];
out.CopyTo(arg);

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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:masterJul 14, 2020
@zhiics

Copy link
Copy Markdown
Member

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 freeto 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

@kazum@zhiics@tqchen