No extracted tasks in cuda autotuning tutorial

Hello !

I have been trying to compile and install from source TVM in an ubuntu. I also had to compile from source LLVM, as the automatic installation script didnt work for ubuntu 18.04. Cuda 9.0 is already installed in the system for the GTX 980Ti

The LLVM build and installation was successful as well as the TVM build (CUDA ON and LLVM ON, with the path to llvm-config). I also installed all the recommended python dependencies:

pip3 install --user numpy decorator attrs
pip3 install --user tornado psutil xgboost
pip3 install --user mypy orderedset antlr4-python3-runtime=4.7.2
sudo apt install antlr4

I had to specify antler version so I dont get the error: ANTLR runtime and generated code versions disagree: 4.8!=4.7.2.

Im now trying to run this tutorial https://colab.research.google.com/github/uwsampl/tutorial/blob/master/notebook/03c_TVM_Tutorial_TuneRelayCuda.py.ipynb. But there are no tasks extracted to tune the network.

Extract tasks...
Tasks extracted: 0
Tuning...
Running tasks 0
Compile...
Evaluate inference time cost...
Mean inference time (std dev): 27.00 ms (12.09 ms)

The script is exactly the same I just added two prints with the length of the tasks and because there seems to be an error where the tmp log file is not created later on I added two lines to create the file inside the tune_tasks function.

# create tmp log file
tmp_log_file = log_filename + ".tmp"
if os.path.exists(tmp_log_file):
    os.remove(tmp_log_file)

with open(tmp_log_file, 'w') as _:   # <---- Create the  file
    pass

The script works in the Google Colab environment though. And Im not getting any error message in my ubuntu. Why is there no tuning occurring ? Thanks.

Try to remove ops in the following call so that it will cover all ops by default.

tasks = autotvm.task.extract_from_program(net, target=target, params=params)

I just realised I didnt write you a proper response. I know it has been a year but that was indeed the correct answer