[Relay][Frontend] CoreML Support#2476
Merged
icemelon merged 5 commits intoapache:masterfrom Jan 30, 2019
Merged
Conversation
zhreshold
reviewed
Jan 22, 2019
| @@ -1,4 +1,4 @@ | |||
| import urllib | |||
| from six.moves import urllib | |||
Member
There was a problem hiding this comment.
make sure six in installed as dependency in CI
Member
Author
There was a problem hiding this comment.
added. thanks for reminding.
yzhliu
commented
Jan 25, 2019
| out_shape=(1, 1000), input_name='image', dtype='float32'): | ||
| shape_dict = {input_name : x.shape} | ||
| with nnvm.compiler.build_config(opt_level=3): | ||
| with nnvm.compiler.build_config(opt_level=2): |
Member
Author
There was a problem hiding this comment.
with opt_level=3, mobilenet fails with error below. Looks like it is due to some problem in nnvm's foldaxis pass, I will open an issue to track.
$ python -m nose -v nnvm/tests/python/frontend/coreml
test_forward.test_mobilenet_checkonly ... ERROR
test_forward.test_resnet50_checkonly ... ^C
======================================================================
ERROR: test_forward.test_mobilenet_checkonly
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/ubuntu/tvm/nnvm/tests/python/frontend/coreml/test_forward.py", line 41, in test_mobilenet_checkonly
run_model_checkonly(model_file, 'mobilenet')
File "/home/ubuntu/tvm/nnvm/tests/python/frontend/coreml/test_forward.py", line 36, in run_model_checkonly
tvm_output = get_tvm_output(sym, x, params, target, ctx)
File "/home/ubuntu/tvm/nnvm/tests/python/frontend/coreml/test_forward.py", line 21, in get_tvm_output
graph, lib, params = nnvm.compiler.build(symbol, target, shape_dict, params=params)
File "/home/ubuntu/tvm/nnvm/python/nnvm/compiler/build_module.py", line 292, in build
graph = graph.apply("InferShape")
File "/home/ubuntu/tvm/nnvm/python/nnvm/graph.py", line 234, in apply
check_call(_LIB.NNGraphApplyPasses(self.handle, npass, cpass, ctypes.byref(ghandle)))
File "/home/ubuntu/tvm/nnvm/python/nnvm/_base.py", line 75, in check_call
raise NNVMError(py_str(_LIB.NNGetLastError()))
nnvm._base.NNVMError: Error in operator _param_9_sc: [01:28:47] /home/ubuntu/tvm/nnvm/src/top/tensor/broadcast.cc:119: Check failed: l == 1 || r == 1 operands could not be broadcast together with shapes [32,1,3,3] [32,1,1,1,112,112], l=3, r=112
Stack trace returned 10 entries:
[bt] (0) /home/ubuntu/tvm/build/libtvm.so(dmlc::StackTrace[abi:cxx11](unsigned long)+0x1f5) [0x7fca99a28365]
[bt] (1) /home/ubuntu/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x3e) [0x7fca99a28fee]
[bt] (2) /home/ubuntu/tvm/nnvm/python/nnvm/../../../build/libnnvm_compiler.so(nnvm::top::BinaryBroadcastShape(nnvm::NodeAttrs const&, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*)+0x6c0) [0x7fca949c6e00]
[bt] (3) /home/ubuntu/tvm/nnvm/python/nnvm/../../../build/libnnvm_compiler.so(+0x1174dd) [0x7fca948b04dd]
[bt] (4) /home/ubuntu/tvm/nnvm/python/nnvm/../../../build/libnnvm_compiler.so(+0x118c4a) [0x7fca948b1c4a]
[bt] (5) /home/ubuntu/tvm/nnvm/python/nnvm/../../../build/libnnvm_compiler.so(+0x119f3a) [0x7fca948b2f3a]
[bt] (6) /home/ubuntu/tvm/nnvm/python/nnvm/../../../build/libnnvm_compiler.so(nnvm::ApplyPasses(nnvm::Graph, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)+0x127d) [0x7fca94885eed]
[bt] (7) /home/ubuntu/tvm/nnvm/python/nnvm/../../../build/libnnvm_compiler.so(NNGraphApplyPasses+0x320) [0x7fca94863d10]
[bt] (8) /home/ubuntu/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7fcaac8cdec0]
[bt] (9) /home/ubuntu/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7fcaac8cd87d]
Member
Author
There was a problem hiding this comment.
Previously this test did not run on CI. besides, it only fails on CUDA. CPU is good.
Also Relay is good.
Member
Author
There was a problem hiding this comment.
Member
Author
|
@zhreshold Please help to review again. |
Closed
zhreshold
approved these changes
Jan 28, 2019
Member
Author
|
Thanks for the review @zhreshold |
merrymercy
pushed a commit
to merrymercy/tvm
that referenced
this pull request
Feb 18, 2019
* [Relay][Frontend] Add CoreML Support * pip install six in CI * remove triggering nnvm coreml test * set opt_level=2 for nnvm coreml test case
wweic
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Feb 20, 2019
* [Relay][Frontend] Add CoreML Support * pip install six in CI * remove triggering nnvm coreml test * set opt_level=2 for nnvm coreml test case
wweic
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Feb 20, 2019
* [Relay][Frontend] Add CoreML Support * pip install six in CI * remove triggering nnvm coreml test * set opt_level=2 for nnvm coreml test case
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@zhreshold @siju-samuel @tqchen Please help to review