Cannot find config for target=llvm when using autotvm in tensorflow example for cpu

On running the example script (https://docs.tvm.ai/tutorials/nnvm/from_tensorflow.html#sphx-glr-tutorials-nnvm-from-tensorflow-py) for tensorflow model optimization with autotvm, we encountered the following warning/error:-

WARNING:autotvm:Cannot find config for target=llvm, workload=(‘conv2d’, (1, 299, 299, 3, ‘float32’), (3, 3, 3, 32, ‘float32’), (2, 2), (0, 0), (1, 1), ‘NHWC’, ‘float32’). A fallback configuration is used, which may bring great performance regression.

We successfully installed all the components along with openblas and latest llvm(7.0.1) before testing the above example code. Also we used the sample input from the given link: https://github.com/dmlc/web-data/tree/master/tensorflow/models/InceptionV1

What is the reason for this warning and how can it be resolved?
(NB: We are particularly concerned with model performance)

For the x86 CPU, please refer this link: https://docs.tvm.ai/tutorials/autotvm/tune_nnvm_x86.html This warning is because you don’t tune this workload of model.

I encountered the same problem on the ubuntu 16.04 64-bit in VMware workstation. I used the sample code in https://docs.tvm.ai/tutorials/autotvm/tune_nnvm_x86.html. How can I solve it?

1 Like

I am facing a similar problem. Is there a fix yet ?

WARNING:tensorflow:From tvm_mxnet_ex.py:77: __init__ (from tensorflow.python.platform.gfile) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.gfile.GFile.
2019-03-21 15:22:14.561070: W tensorflow/core/framework/op_def_util.cc:355] Op BatchNormWithGlobalNormalization is deprecated. It will cease to work in GraphDef version 9. Use tf.nn.batch_normalization().
2019-03-21 15:22:14.684594: E tensorflow/stream_executor/cuda/cuda_driver.cc:300] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2019-03-21 15:22:14.684627: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:163] retrieving CUDA diagnostic information for host: b511ca91b4c7
2019-03-21 15:22:14.684634: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:170] hostname: b511ca91b4c7
2019-03-21 15:22:14.684671: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:194] libcuda reported version is: 410.73.0
2019-03-21 15:22:14.684689: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:198] kernel reported version is: 410.73.0
2019-03-21 15:22:14.684696: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:305] kernel version seems to match DSO: 410.73.0
/tvm/python/tvm/relay/frontend/tensorflow.py:1355: UserWarning: Ignore the passed shape. Shape in graphdef will be used for operator DecodeJpeg/contents.
  "will be used for operator %s." % node.name)
/tvm/python/tvm/relay/frontend/tensorflow.py:420: UserWarning: DecodeJpeg: It's a pass through, please handle preprocessing before input
  warnings.warn("DecodeJpeg: It's a pass through, please handle preprocessing before input")
Tensorflow protobuf imported to relay frontend.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 8, 8, 2048, 'float32'), (1, 1, 2048, 1152, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which $
ay bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 8, 8, 1280, 'float32'), (1, 1, 1280, 1152, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which $
ay bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 17, 17, 192, 'float32'), (3, 3, 192, 320, 'float32'), (2, 2), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 17, 17, 768, 'float32'), (1, 1, 768, 384, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 17, 17, 768, 'float32'), (1, 1, 768, 576, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 17, 17, 768, 'float32'), (1, 1, 768, 512, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 17, 17, 768, 'float32'), (1, 1, 768, 448, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 35, 35, 288, 'float32'), (3, 3, 288, 384, 'float32'), (2, 2), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 35, 35, 288, 'float32'), (1, 1, 288, 176, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 35, 35, 256, 'float32'), (1, 1, 256, 176, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 35, 35, 192, 'float32'), (1, 1, 192, 176, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which m$
y bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 73, 73, 80, 'float32'), (3, 3, 80, 192, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which may 
bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 73, 73, 64, 'float32'), (1, 1, 64, 80, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which may $
ring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 149, 149, 32, 'float32'), (3, 3, 32, 64, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which ma$
 bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 149, 149, 32, 'float32'), (3, 3, 32, 32, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which ma$
 bring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 299, 299, 3, 'float32'), (3, 3, 3, 32, 'float32'), (2, 2), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which may $
ring great performance regression.
[15:22:19] /tvm/src/arithmetic/int_set.cc:540: cannot evaluate set type Cast
[15:22:19] /tvm/src/arithmetic/int_set.cc:540: cannot evaluate set type Cast
[15:22:19] /tvm/src/arithmetic/int_set.cc:540: cannot evaluate set type Cast
[15:22:19] /tvm/src/arithmetic/int_set.cc:540: cannot evaluate set type Cast
[15:22:19] /tvm/src/arithmetic/int_set.cc:540: cannot evaluate set type Cast
[15:22:19] /tvm/src/arithmetic/int_set.cc:540: cannot evaluate set type Cast
[15:22:19] /tvm/src/arithmetic/int_set.cc:540: cannot evaluate set type Cast
[15:22:19] /tvm/src/arithmetic/int_set.cc:540: cannot evaluate set type Cast
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 39, 39, 48, 'float32'), (5, 5, 48, 64, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which may $
ring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 37, 37, 96, 'float32'), (3, 3, 96, 96, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which may $
ring great performance regression.
WARNING:autotvm:Cannot find config for target=llvm, workload=('conv2d', (1, 37, 37, 64, 'float32'), (3, 3, 64, 96, 'float32'), (1, 1), (0, 0), (1, 1), 'NHWC', 'float32'). A fallback configuration is used, which may $
ring great performance regression.

Shouldn’t this sym, params = relay.frontend.from_tensorflow(graph_def, layout=layout, shape=shape_dict) tune it automatically ? DO we have to manually tune everytime we import from tensorflow ?

1 Like

from_tensorflow just loads the model and without the tuning process
You have to auto-tune the model yourself

1 Like

hallo! so, how can i to do it ?

same question, do you solved it?