[dmlc/tvm] [RFC][Relay][HalideIR] Automatically generate the AST (#3501)

2019-07-05 Thread Jared Roesch
I have begun to experiment with writing a new library called `astgen` to replace the large quantity of boilerplate required by the AST today, and enable us to more flexibly evolve the node system, and its APIs. The first version of this tool will take a Python file like this: ```python import as

Re: [dmlc/tvm] [RFC][Quantization] Support quantized models from TensorflowLite (#2351)

2019-07-05 Thread Zhao Wu
@tqchen, if we use avg_pool2d , we also need to modify it. But the modified code is not much. For example, we should make the sum UInt8 result be Int16 to avoid overflow. In our internal implementation, we use q_avg_pool2d to distinguish avg_pool2d. Relu shouldn’t be modified. However, if we hav

Re: [dmlc/tvm] [RFC][Quantization] Support quantized models from TensorflowLite (#2351)

2019-07-05 Thread Tianqi Chen
Can we elaborate a bit if avg_pool2d, relu is necessary or if they are more of a direct mapping to the standard ops? Do we allow mix of standard ops and qnn ones? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://gith

Re: [dmlc/tvm] [RFC][Quantization] Support quantized models from TensorflowLite (#2351)

2019-07-05 Thread Animesh Jain
@tqchen What are your thoughts? Seems like we are agreeing on the proposed design abstraction. There is a concern of not being able to achieve the best schedule performance. We can try to tackle it with fusion and schedule_tagging. -- You are receiving this because you are subscribed to this t

Re: [dmlc/tvm] [RFC][Quantization] Support quantized models from TensorflowLite (#2351)

2019-07-05 Thread Animesh Jain
@jnorwood Yes, I understand your point. We can use the clip to saturate the values even if Relu was not fused. It fits in the design and the proposed abstractions. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://git

Re: [dmlc/tvm] [RFC][ARITH] Introduce FloorDiv/Mod for Context-Independent Simplifications (#3478)

2019-07-05 Thread Yizhi Liu
+0.5 to floordiv given the familarity and the usage in isl and MLIR. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dmlc/tvm/issues/3478#issuecomment-508878526

Re: [dmlc/tvm] [RFC][ARITH] Introduce FloorDiv/Mod for Context-Independent Simplifications (#3478)

2019-07-05 Thread Tianqi Chen
To summarize the discussion so far. I think everyone agrees that we should introduce one of FloorDiv or EuclideanDiv, and this is a pretty close call (see the technical summary above). @derisavi @sgrechanik-h suggested eucildean div for the reason of being consistent with Halide smt-libs. My un

[TVM Discuss] [Development] Quantization broken due to PR #3135

2019-07-05 Thread Thierry via TVM Discuss
Thank you for the catch @zhiics. I believe this stresses the importance of extended unit test coverage for quantization passes. Do you want to go ahead and issue a PR fix? If VTA quantization is broken, it will be caught when we build the sphinx gallery. --- [Visit Topic](https://discuss

Re: [dmlc/tvm] [RFC][Quantization] Support quantized models from TensorflowLite (#2351)

2019-07-05 Thread ds-jnorwood
I just want to point out, again, that the output_activation_min and output_activation_max are required even if there is no specified activation operation, since they provide saturation to the quantization range ... avoiding overflow error. Also, if you fuse activation operations during train

Re: [dmlc/tvm] [RFC][ARITH] Introduce FloorDiv/Mod for Context-Independent Simplifications (#3478)

2019-07-05 Thread Tianqi Chen
Thanks, @derisavi @sgrechanik-h for putting in your thoughts. Let me try to summarize the trade-offs dimensions so far. ## Power of simplification - They are going to be similar because in most cases divisors are positive. - Floordiv and euclidean div are the same when divisors are positive. ##

Re: [dmlc/tvm] [RFC][Quantization] Support quantized models from TensorflowLite (#2351)

2019-07-05 Thread Animesh Jain
@FrozenGene Thanks for the quick feedback on the design. I understand the performance concern. Let's try to tackle them in fusion. Fusion already performs compute_inline to bring the computation at right location. Hopefully, with some tagging and with some arm-twisting, we can achieve same tens

[TVM Discuss] [Development] Quantization broken due to PR #3135

2019-07-05 Thread tico via TVM Discuss
Looking forward for the updates on this! --- [Visit Topic](https://discuss.tvm.ai/t/quantization-broken-due-to-pr-3135/3237/2) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscrib

Re: [dmlc/tvm] [RFC][ARITH] Introduce FloorDiv/Mod for Context-Independent Simplifications (#3478)

2019-07-05 Thread Salem Derisavi
Not sure whether the decision has already been done but I'll put my two cents here. You have covered all the tradeoffs. Since in most cases, the divisor is positive, I believe the important move was to add one of floordiv or euclideandiv (which you are doing now). The difference between floordi

Re: [dmlc/tvm] [RFC][Quantization] Support quantized models from TensorflowLite (#2351)

2019-07-05 Thread Zhao Wu
@anijain2305 Generally Good. About the performance of HW, let us say ARM CPU, For the depthwise convolution, we even could optimize without tensorize. After some work of optimization for int8 using pure TVM schedule without tensorize, we could also beat QNNPACK (some workload we test we even cou