[TVM Discuss] [Questions] AttributeError: module 'tvm' has no attribute 'thread_axis'

2020-05-06 Thread pankuolung via TVM Discuss
Hi there, I'm running the below code and shows the error. May I confirm what I'm missing? Thanks your help! = Python 3.7.7 (default, Mar 10 2020, 15:16:38) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "lice

[TVM Discuss] [Questions] Autotvm.task_extract_from_program in TFLite

2020-05-06 Thread Abelardo López-Lagunas via TVM Discuss
Ok so I commented out the `tune_graph()` call and use `sch_log` which is the schedule from `tune_kernels()` ``` with autotvm.apply_graph_best(sch_log): logging.info("Compiling the schedule") with relay.build_config(opt_level=3): graph, lib, params = relay.build_module

[TVM Discuss] [Questions] Why use const constexpr instead of constexpr in TVM_DECLARE_FINAL_OBJECT_INFO

2020-05-06 Thread Krzysztof Parzyszek via TVM Discuss
No reason. `constexpr` implies `const` in object declarations. --- [Visit Topic](https://discuss.tvm.ai/t/why-use-const-constexpr-instead-of-constexpr-in-tvm-declare-final-object-info/6571/2) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from t

[TVM Discuss] [Questions] Autotvm.task_extract_from_program in TFLite

2020-05-06 Thread Abelardo López-Lagunas via TVM Discuss
Thanks! I'll give that a try. --- [Visit Topic](https://discuss.tvm.ai/t/autotvm-task-extract-from-program-in-tflite/6578/19) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe

[TVM Discuss] [Questions] Autotvm.task_extract_from_program in TFLite

2020-05-06 Thread Animesh Jain via TVM Discuss
Thanks for sharing. The failure is while calling tune_graph. The graph tuning assumes the data to be float32. Additionally, last time I tried, the graph tuning cant work with QNN ops. One way to handle this is to call QnnCanonilcalize (python/tvm/relay/qnn/transform.py) before calling graph tu

[TVM Discuss] [Questions] Autotvm.task_extract_from_program in TFLite

2020-05-06 Thread Abelardo López-Lagunas via TVM Discuss
Here is the script that reproduces the issue: ``` import sys import os import tvm from tvm import relay from tvm import autotvm from tvm.autotvm.tuner import XGBTuner, GATuner, RandomTuner, GridSearchTuner from tvm.autotvm.graph_tuner import DPTuner, PBQPTuner import tflite.Model # # This fun

[TVM Discuss] [Questions] Autotvm.task_extract_from_program in TFLite

2020-05-06 Thread Abelardo López-Lagunas via TVM Discuss
Right now, I think the process fails in `relay.build_module.build(mod, target=target, params=params)` That is after the code I showed above. I just verified that the layout transformation takes place by comparing the both `relay_NHWC.txt` and `relay_NCHW.txt`. Let me create a minimal script s

[TVM Discuss] [Questions] Autotvm.task_extract_from_program in TFLite

2020-05-06 Thread Animesh Jain via TVM Discuss
Hmm, this is weird. My script seems to work well. Is it possible for you to share the script? If not, can you reach the printing on relay_NHWC.txt for quantized model, or it fails before that? --- [Visit Topic](https://discuss.tvm.ai/t/autotvm-task-extract-from-program-in-tflite/6578/15)

[TVM Discuss] [Questions] Question about "qconfig" options for quantization

2020-05-06 Thread Sergio via TVM Discuss
Hi eveyrone, I would like to know whether int4/int16 quantization was possible using "`relay.quantize.quantize`". So far, I have gone through the documentation in https://github.com/apache/incubator-tvm/blob/master/python/tvm/relay/quantize/quantize.py But I have a few questions: 1) What is

[TVM Discuss] [Questions] Autotvm.task_extract_from_program in TFLite

2020-05-06 Thread Abelardo López-Lagunas via TVM Discuss
I have double checked the type and made sure the NHWC -> NCHW is applied: ``` assert input_type == "uint8", "Quantized models use uint8 input_type" mod, params =\ relay.frontend.from_tflite(tflite_model, shape_dict={input_name: dshape},

[TVM Discuss] [Questions] Execution order of operators at Runtime in TVM

2020-05-06 Thread masahi via TVM Discuss
See DNNL example below. Since TVM runtime is sequential, there is no synchronization of any kind. You just deal with pointers to tensors via DLTensor https://github.com/apache/incubator-tvm/tree/master/src/runtime/contrib/dnnl https://github.com/apache/incubator-tvm/tree/master/src/relay/backen

[TVM Discuss] [Questions] Execution order of operators at Runtime in TVM

2020-05-06 Thread Hanting Huang via TVM Discuss
It seems that annotate_target tutorial has not been uploaded. I am wondering how one runtime communicates with another runtime. Something like a host runtime and a kernel runtime?Host runtime uses jit to generate kernel's code? Or they use other synchronization mechanisms? ![微信截图_2020050619291

[TVM Discuss] [Questions] Execution order of operators at Runtime in TVM

2020-05-06 Thread Hanting Huang via TVM Discuss
I guess external_mods is the mods needed external codegen tools. The official document shows the codegen sequence. https://docs.tvm.ai/dev/codebase_walkthrough.html ``` /*! * \brief Lower the external function using external codegen tools. * \return The runtime moduels for each needed ex

[TVM Discuss] [Questions] Execution order of operators at Runtime in TVM

2020-05-06 Thread masahi via TVM Discuss
Yes two ops, even if they are independent, are run sequentially. This is the code that executes operators: https://github.com/apache/incubator-tvm/blob/master/src/runtime/graph/graph_runtime.cc#L55-L57 If you have a custom HW and you are interested in inter-op parallelism, you should be looki

[TVM Discuss] [Questions] Execution order of operators at Runtime in TVM

2020-05-06 Thread Steve via TVM Discuss
Thank you @masahi This is very helpful. But, I am more than puzzled. Let us say you have two HW units of capable of running (the original example add1 and add2). So according to your answer, the add1 and add2 CAN NOT run in parallel? Could you provide some insights and on this? Also provide

[TVM Discuss] [Questions] Execution order of operators at Runtime in TVM

2020-05-06 Thread Steve via TVM Discuss
Thank you @hht This is very useful. I have two follow up questions. 1) what is the purpose of external_mods in the LoweredOutput structure? 2) Ia m wondering if I can get more details about how the CodeGen in TVM works? I mean what is the sequence. I know it starts from Relay, and I am