Any updates on this? I looked at the repo today (I was away for something else) and it seems the repo has changed quite a bit and your previous instructions does not work anymore?
Thanks!
Any updates on this? I looked at the repo today (I was away for something else) and it seems the repo has changed quite a bit and your previous instructions does not work anymore?
Thanks!
hi @kwmaeng,
I gave a tutorial at TVMconf demoing these two approaches. There are still some significant limitations of approach #2 mentioned above–particularly around memory usage. I’m working to address those.
Code for the tutorial, plus instructions on how to replicate it, is at https://github.com/areusch/microtvm-blogpost-eval.
Let me know if you’re able to get it running!
Andrew
Dear Andrew. This is an old thread, but I finally managed my time to try uTVM out. I am following GitHub - areusch/microtvm-blogpost-eval and set up zephyr-2.5 VM. However, I cannot log in to the VM both with/without SSH. Because the SSH with Vagrant was not working, I manually tried turning on the VM (with Virtualbox GUI) and logging in using the ID and PW you gave me earlier: tvm/tvm. It says invalid login. What is the ID/PW for the generated VM?
Thank you, Best regards, Kiwan
hey Kiwan,
Seems like if the VM was off, you need to run vagrant up
to turn it on and provision it. I’d suggest first destroying the VM with vagrant destroy
, then following the microTVM Reference VM tutorial again.
Since we’ve merged that PR, the username/password now follows the vagrant convention (I believe ubuntu/vagrant, but vagrant ssh
should take care of these details for you).
-Andrew
Never mind. It was vagrant/vagrant, I guess which is the default. I am trying to do ssh which is failing, but I’ll try more.
Hi, Andrew. I can now log in with the default ID/PW like I said above, but my vagrant ssh is not working properly. I am using WSL2, and with some searching I think this is the main problem. Instead of trying to fix my WSL2+Vagrant problem, since I now have a VM generated by Vagrant. Will it work the same if I just clone the TVM/blogpost-eval repo inside the VM (currently, it only has a few Zephyr files) and run the rest of the steps from here?: GitHub - areusch/microtvm-blogpost-eval
If so, where should I put tvm / blogpost-eval repo inside the VM? I don’t fully understand what it would have been like if the Vagrant up process + ssh was entirely successful, so if you can hint me with some workaround it would be great.
Thank you, Best regards, Kiwan Maeng
hi @kwmaeng,
could you try running apps/microtvm/reference-vm/zephyr/setup.sh
inside your VM? that should ensure that all of the provision steps ran by vagrant up
are executed.
btw, I haven’t used WSL2 before, but I think there may be an issue using WSL2 to communicate with usb devices. I’m not sure it would make too much sense to continue to push on this direction (would suggest using Virtualbox) if it can’t communicate with USB-Serial or J-Link devices.
Andrew
[EDIT] This is fixed. No need to look into this. Though, I leave this for any future reference.
Thank you for the help. Though I thought the device must be connected to the VM itself, not the host (which is WSL2). Isn’t it the case?
I have successfully connected the device USB to the VM. Currently, the VM runs outside WSL2. WSL2 can talk to the Virtualbox running outside WSL2 with a proper setup.
However, running setup.sh segfaults while trying to build TVM. I have no idea why this is the case because the VM is provided by your Vagrant cloud and I didn’t modify anything. If the build was segfaulting on my machine I would be suspicious about the compiler version etc., but I’m using your VM so I am clueless.
Do you have any suggestion on why it may be segfaulting? Does it have any possible dependency with my host Windows/WSL? I thought everything that is running inside the VM is self-contained (e.g., compiler, etc).
I posted the log in a separate post:
Thank you for your help.
Dear Andrew,
Is the current microtvm-blogpost-eval repo supposed to work with the latest TVM repo? If not, can you tell me the commit of TVM that microtvm-blogpost-eval master would work with? I am seeing several issues, that seems like an incompatible TVM version issue, including: AttributeError: module ‘tvm.micro.build’ has no attribute ‘_CRT_GENERATED_LIB_OPTIONS’ Also, there’s many deprecated warnings.
Thank you, Best regards, Kiwan
hi Kiwan,
Let me have a look at this and I’ll reply back here when I have an answer. I think this has happened a few times, and µTVM is under a lot of development right now. I have some updates to push to this repo, I’ll try to pin microtvm-blogpost-eval to a TVM revision via submodule first.
-Andrew
You’re right, that repo is busted at master. I made several fixes, which you could test if you like:
git submodule update --init --recursive
After the two PRs land, I will merge pin-tvm-repo to master.
-Andrew
Dear Andrew. Thank you for the fix!
This almost works, except it is not flashing properly. After flashing, checksum mismatch occurs. It says “Warn : no flash bank found for address 0x08010000”, I think might be the source of the problem.
I want to fix it by looking at the flash command, but cannot locate it (e.g., I used to flash to 0x08000000 instead of 0x08010000, which might not be relevant, but…). Can you help me understand which part of the repo sets such flash-related configs? (I used to have a file called stm32f746g_disco.cfg or so for my prior experience with STM32F board. I wonder if there is something similar in the current setup)
Thank you for your help! I think I am already there. Best regards, Kiwan
Hi Kiwan,
Ah, I’m testing on the STM32F746-Nucleo board. Did you adjust the zephyr_board option (or provide the equivalent command-line flag) in microtvm-blogpost-eval scripts?
Andrew
Oops, sorry. I was connected to a wrong board (I have several boards attached to my system and it was flashing to a wrong one). Now it is finally working!! Thank you so much for your help!
Is there a way for me to try out autotuning on the current branch, or is it broken at this point? Thanks for your help.
Great to hear! I think autotuning is unfortunately still busted at HEAD. My plan is to merge it behind the Project API refactor, since it introduced more Python dependencies to TVM I’d like to place in a separate dependency file.
Will there be a easy fix for me to enable autotuning, (e.g., is it going to be mainly patching the changed function call parameters) or is it something that might not be doable? If autotuning cannot be done with this repo, I am wondering if going back to your earlier experimental_blogpost branch would be better to try out autotuning, since you definitely had autotuning there (I already tried this actually – mbed-cli is not recognizing my device and I wonder if this is a rabbit hole worth digging).
Any suggestion on how I might be able to try out autotuning? Thank you always.
right now you’d need to merge PR 7545 and update python/micro_eval/bin/autotune.py
to match. I did get autotuning working at a recent-ish (e.g. February) main
witht PR 7545, so you could give it a shot if you’d like to try out autotuning now. Otherwise yeah, you may need to revert to the demo from last June .
I merged pin-tvm-repo
into master
, so there is now no need for the separate branch.
Thanks, I will first try merging this PR. Is it a PR for microTVM that simply hasn’t been merged? Also, are there any plan for making microTVM work again in master in the near future? Thanks!
hi @kwmaeng,
my post above was just following up to say that I have updated microtvm-blogpost-eval to work with approximately main
as of Friday. I have pinned the working revision of apache/tvm
repository in microtvm-blogpost-eval
via git submodules, so, with the exception of autotuning, you shouldn’t see any breakage at that revision (please let me know if you do, so we can fix it).
Regarding PR 7545–yes, it enables autotuning with microTVM, and it will merge after Project API PR (branch) merges.
-Andrew