-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[microTVM] Enable micro tvmc tutorial testing in CI #10555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments, and cc @Mousius
python3 gallery/how_to/work_with_microtvm/micro_tflite.py | ||
python3 gallery/how_to/work_with_microtvm/micro_autotune.py | ||
./gallery/how_to/work_with_microtvm/micro_tvmc.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add this to make docs
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script requires zephyr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah hmm. that is a bit challenging then....maybe my other questions are tricky to implement given this limitation of doc-builder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would be a bigger change. GPU docker image which is used for doc generation should be able to run Zephyr and other platforms in future. Other possibility is to have each docker step to run and convert the script which is related to their target and store the output in a shared directory which is passed to GPU doc stage. Not sure how much of this idea is feasible in our Jenkins configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is almost what we do now (the GPU docker image runs the tutorials and sends a tar.gz
to another step to deploy it), we could do the same here and add some way of unifying the two (like unpack, make sure no file names collide, send the whole thing to the docs deploy)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@driazati Does this work between executors? Can we run something on ci-qemu and pass it to ci-gpu for doc generation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k, so for this PR the delta is at least that now we test the tvmc commands to make sure they don't crash. next it would be great to do what @driazati mentioned, where we run script_convert.py in ci-qemu and then forward the output to the doc-builder step. let's merge this now though to make incremental progress.
if bash_detected: | ||
if line == BASH: | ||
# write the bash block to destination | ||
python_code = "# .. code-block:: bash\n#\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we run the bash script from this file and include the output? we could probably do that by injecting output markers into the script e.g.
echo -e "\nSTART OF COMMAND 1 OUTPUT --->"
tvmc ...
echo -e "\n<--- START OF COMMAND 1 OUTPUT"
then we could take the bash-ignore
commented areas, extract them into a common prelude, and also include stuff like set -eux
so that people write proper bash scripts. we could maybe do this by putting that into a docs/bash_gallery_prelude.sh
and erroring in this script if we don't see a line like:
source docs/bash_gallery_prelude.sh || exit 2
might need to think about the path a little bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea to add the output of each command to generated python file and finally have it as part of generated HTML file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah exactly
@areusch I added test file and address your comments. PTAL, thanks! |
python3 gallery/how_to/work_with_microtvm/micro_tflite.py | ||
python3 gallery/how_to/work_with_microtvm/micro_autotune.py | ||
./gallery/how_to/work_with_microtvm/micro_tvmc.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k, so for this PR the delta is at least that now we test the tvmc commands to make sure they don't crash. next it would be great to do what @driazati mentioned, where we run script_convert.py in ci-qemu and then forward the output to the doc-builder step. let's merge this now though to make incremental progress.
This file is generated automatically by `tests/scripts/task_convert_scripts_to_python.sh`, added in apache#10555, and can be generated when running the `ci.py lint` script locally.
This file is generated automatically by `tests/scripts/task_convert_scripts_to_python.sh`, added in #10555, and can be generated when running the `ci.py lint` script locally.
* Add script convertor * Address comments: added test * address comments
This file is generated automatically by `tests/scripts/task_convert_scripts_to_python.sh`, added in apache#10555, and can be generated when running the `ci.py lint` script locally.
This PR changes micro_tvmc.py tutorial to a bash script tutorial. Also it adds a python script which converts a bash script tutorial to python format for doc generation.
I have added the script conversion to lint task to make sure the generated python tutorial passes the format.
cc @areusch @driazati