[TVM Discuss] [Questions] GPU thread binding and iter_var infer

2020-05-05 Thread zachzzc via TVM Discuss
In my schedule there are two ops. One is to calculate the result using gemm and the other is to reshape it . The function is like this: ``` for (i.outer.outer, 0, 98) { for (j.outer.outer, 0, 16) { for (ii, 0, 8) { for (jj, 0, 8) { gemm_C[i.outer.outer*1024) +

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

2020-05-05 Thread Animesh Jain via TVM Discuss
[quote="alopez_13, post:7, topic:6578"] This is part of the Relay code: ``` %0 = layout_transform(%input, src_layout="NHWC", dst_layout="NCHW"); %1 = layout_transform(%v_param_1, src_layout="HWIO", dst_layout="OIHW"); %2 = qnn.conv2d(%0, %1, 128, 122, 0.0078125f, 0.0339689f, strides=[2, 2]

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

2020-05-05 Thread Animesh Jain via TVM Discuss
Just to confirm, can you please double check your script? We specify input shape and dtype for the model while parsing (`from_tflite`). So, even though most of the AutoTVM script can be same, there needs to be a small change while passing on the input shape and dtype for FP32 and quantized mo

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

2020-05-05 Thread Animesh Jain via TVM Discuss
IIUC, simple compilation (no auto-tuning) of both FP32 and quantized models work. But, the auto-tuning + compilation fails for quantized model (while the same script works for FP32), right? --- [Visit Topic](https://discuss.tvm.ai/t/autotvm-task-extract-from-program-in-tflite/6578/11) t

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

2020-05-05 Thread Abelardo López-Lagunas via TVM Discuss
@anijain2305 Thanks for the prompt reply. Yes I am setting `dtype_input = "uint8"` Also I just verified that optimization of a non-quantized TFlite model does work. In summary, the same optimization script will work for an FP32 version but not for a quantized version. Both models come from h

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

2020-05-05 Thread Animesh Jain via TVM Discuss
Are you giving the right input dtypes to the model. Tflite quantized models need `uint8` dtype. --- [Visit Topic](https://discuss.tvm.ai/t/autotvm-task-extract-from-program-in-tflite/6578/9) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from th

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

2020-05-05 Thread Cody H. Yu via TVM Discuss
I'm not familiar with the QNN module so I'm calling @anijain2305 for help. I would suggest opening another topic with a proper title for a new problem next time; otherwise it's easy to be ignored. --- [Visit Topic](https://discuss.tvm.ai/t/autotvm-task-extract-from-program-in-tflite/6578/8

[TVM Discuss] [Questions] Remove an attribute from IR

2020-05-05 Thread Zhao Wu via TVM Discuss
In the topi, we could get the target information during schedule using `tvm.target.Target.current()`. But we don't have `target_host` information as far as I know. But seems that you could do in `def _build_for_device` (we could add pass inside it like other passes). However, you should doub

[TVM Discuss] [Questions] Remove an attribute from IR

2020-05-05 Thread abhikran-quic via TVM Discuss
Hi @FrozenGene, In the TOPI library the target and target_host information is not available and hence the bind pipeline pass cannot be implemented. Do you think a relay pass should be implemented to take care of it ? If yes, could you please share an example codebase within tvm that i can r

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

2020-05-05 Thread Abelardo López-Lagunas via TVM Discuss
After trying multiple quantized models the schedule is finally produced. For testing purposes I am using the quantized models for MobileNetV2 from https://www.tensorflow.org/lite/guide/hosted_models However, now I get at least two kinds of errors when generating the binary: ``` an internal in

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

2020-05-05 Thread masahi via TVM Discuss
It's simple: We support only intra-operator parallelism, not inter-operator parallelism. We use threads for paralizing the outer most loop of convolution, for example. --- [Visit Topic](https://discuss.tvm.ai/t/execution-order-of-operators-at-runtime-in-tvm/6572/10) to respond. You are

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

2020-05-05 Thread Huang Hanting in XJTU via TVM Discuss
I guess the module.so can be seen as a hash map with func name as key and function implement as value. The following code can be found in graph_runtime_codegen.cc. ``` LoweredOutput Codegen(relay::Function func) { auto pf = GetPackedFunc("relay.backend.GraphPlanMemory"); storage_device

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

2020-05-05 Thread Steve via TVM Discuss
@hht - thank you again. Now it makes a kind of sense. Could you please clarify what do you mean by "Parallelism only exists in the module."? My understanding is that there is only one Module, and module contains multiple graph nodes that can run in parallel. [quote="hht, post:5, topic:657

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

2020-05-05 Thread Steve via TVM Discuss
@hht -- this is definitely interesting. In my given example, add1 and add2 are Op types, and thus, I'd expect them to be run in parallel in a HW that is capable of running two adders ("+") in parallel. [quote="hht, post:5, topic:6572"] There is no strategy to enforce parallelism to the op_e