Skip to content

Conversation

@fprotopapa
Copy link
Contributor

@fprotopapa fprotopapa commented Dec 8, 2020

I ran into import errors while following the VTA tutorial for 'Deploy Pretrained Vision Model from MxNet on VTA' under Ubuntu 18.04.5 LTS and Docker images created with Dockerfile.ci_cpu. Scripts launched from tvm base directory.

File: tvm/vta/tutorials/frontend/deploy_classification.py
In line 59 to 61:

import vta
from vta.testing import simulator
from vta.top import graph_pack

Import paths have changed and function call for graph_pack in line 181.

Changed to:

import vta
from vta.python.vta.testing import simulator
from vta.python.vta.top import graphpack as graph_pack
from vta.python import vta

and in line 181

relay_prog = graph_pack.graph_pack(

Issue in file tvm/vta/tutorials/frontend/legacy/deploy_detection.py

Line 61:

   from tvm.contrib import graph_runtime, graph_runtime, util

Changed to:

   from tvm.contrib import graph_runtime, graph_runtime, utils

Also layer id for stop layer 'cast' changed from 185 to 186 in line 126 and in the comment.

Fabbio Protopapa added 2 commits December 8, 2020 16:04
Changed import paths
changed import paths and stop layer id
@zhiics
Copy link
Member

zhiics commented Dec 8, 2020

cc @tmoreau89 @vegaluisjose @liangfu

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

Thank you for catching these bugs, LGTM

Fabbio Protopapa added 2 commits December 9, 2020 08:35
Set working directory to TVM base.
Set working directory to TVM base. Changed layer id in comment to 186.
Copy link
Member

@liangfu liangfu left a comment

Choose a reason for hiding this comment

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

Thanks for catching the bug. Please resolve the CI errors before we could merge the PR.

@liangfu liangfu added the status: need update need update based on feedbacks label Dec 9, 2020
Fabbio Protopapa added 2 commits December 9, 2020 14:06
Reversed changes in import path. Imports working as expected.
Imports working as expected.
@liangfu liangfu removed the status: need update need update based on feedbacks label Dec 10, 2020
Copy link
Member

@liangfu liangfu left a comment

Choose a reason for hiding this comment

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

Thanks for the update @fprotopapa. The changes look good.

from tvm.relay.testing import yolo_detection, darknet
from tvm.relay.testing.darknet import __darknetffi__
from tvm.contrib import graph_runtime, graph_runtime, util
from tvm.contrib import graph_runtime, graph_runtime, utils
Copy link
Member

Choose a reason for hiding this comment

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

Do you mind remove the duplicated graph_runtime here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Duplicated import is removed.

Duplicated graph_runtime import removed.
@tmoreau89 tmoreau89 merged commit 19e2631 into apache:main Dec 11, 2020
@tmoreau89
Copy link
Contributor

Thank you @fprotopapa and @liangfu and @vegaluisjose for reviewing the PR!

@codgeek
Copy link

codgeek commented Jan 17, 2021

Thanks for fixing it! I've run into this bug too on Dec 10 01:26:05 2020 version code.

After this fix, I am using the newest version code of 'Fri Jan 15 07:59:28 2021', there is another error when running python vta/tutorials/frontend/legacy/deploy_detection.py on pynq Z1 board. on pynq Z1 board. actually this error occurs ongraph_pack() stage, still on host, not on Z1.

File "vta/tutorials/frontend/legacy/deploy_detection.py", line 243, in <module>
    stop_name_idx=pack_dictMODEL_NAME,
  Check failed: false == false: [00:55:37]  tvm/src/relay/op/tensor/transform.cc:703: 
  Check failed: oshape_sum == data_shape_sum (172380 vs. 173056) : Input tensor shape and reshaped shape are not compatible

Did your deploy_detection.py run successfully? @fprotopapa looking forward to you practice.

TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Jan 20, 2021
…y_classification.py (apache#7059)

* Update deploy_classification.py

Changed import paths

* Update deploy_detection.py

changed import paths and stop layer id

* Update deploy_classification.py

Set working directory to TVM base.

* Update deploy_detection.py

Set working directory to TVM base. Changed layer id in comment to 186.

* reverse changes in deploy_classification.py

Reversed changes in import path. Imports working as expected.

* Reverse change in import paths

Imports working as expected.

* Update deploy_detection.py

Duplicated graph_runtime import removed.
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jan 21, 2021
…y_classification.py (apache#7059)

* Update deploy_classification.py

Changed import paths

* Update deploy_detection.py

changed import paths and stop layer id

* Update deploy_classification.py

Set working directory to TVM base.

* Update deploy_detection.py

Set working directory to TVM base. Changed layer id in comment to 186.

* reverse changes in deploy_classification.py

Reversed changes in import path. Imports working as expected.

* Reverse change in import paths

Imports working as expected.

* Update deploy_detection.py

Duplicated graph_runtime import removed.
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
…y_classification.py (apache#7059)

* Update deploy_classification.py

Changed import paths

* Update deploy_detection.py

changed import paths and stop layer id

* Update deploy_classification.py

Set working directory to TVM base.

* Update deploy_detection.py

Set working directory to TVM base. Changed layer id in comment to 186.

* reverse changes in deploy_classification.py

Reversed changes in import path. Imports working as expected.

* Reverse change in import paths

Imports working as expected.

* Update deploy_detection.py

Duplicated graph_runtime import removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants