You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by Tianming Xu via TVM Discuss <no...@discuss.tvm.ai> on 2020/08/25 03:11:23 UTC

[TVM Discuss] [Questions] How to further improve the performance of given schedule?


Dear developers,
I am tuning a Conv1D - CNN model on intel x86 platform. I wrote my own schedule and autotvm tuning template. 

How could I further improve the performance of my schedule ??
I tried tvm debugger but it only displayed the performance of single operator.
![image|690x134](upload://mVbfvnktWM7gtUbKt8UZtIdJytb.png) 
I want to further perf the "fused_nn_conv1d_add_nn_relu".





---
[Visit Topic](https://discuss.tvm.ai/t/how-to-further-improve-the-performance-of-given-schedule/7711/1) 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/0a652176acb68a9a33135ed054e034b154adf889cd95a51cc1e93a39521f916a).

[TVM Discuss] [Questions] How to further improve the performance of given schedule?

Posted by Zhao Wu via TVM Discuss <no...@discuss.tvm.ai>.

Yes, if you really want to improve, you need to analyze deeper. Like what kind of instruction effects lower performance then you should try to avoid it (Like using tensorize). I think your current performance is good enough now.





---
[Visit Topic](https://discuss.tvm.ai/t/how-to-further-improve-the-performance-of-given-schedule/7711/8) 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/42a91739e4bf480e81f0ee9c2cd9d09b6a575ca357ae2201e264d85cc4bc4add).

[TVM Discuss] [Questions] How to further improve the performance of given schedule?

Posted by Tianming Xu via TVM Discuss <no...@discuss.tvm.ai>.

@FrozenGene  As for the cpu efficiency,
![image|614x342](upload://xub5DUQWSs2BAXQpRA9l6Xcl9kn.png) 

I noticed that vtune reported above 93% cpu utilization. (I only use single thread single cpu core.)
Does it mean there is not much room for improvement?





---
[Visit Topic](https://discuss.tvm.ai/t/how-to-further-improve-the-performance-of-given-schedule/7711/7) 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/db2b07b9ecbc2c9e20d1f99a6d97d2225f4924229e49beabbc7c2662a761e6fa).

[TVM Discuss] [Questions] How to further improve the performance of given schedule?

Posted by Zhao Wu via TVM Discuss <no...@discuss.tvm.ai>.

CPI rate is a little high. One reason is maybe we generate too many redundancy instructions. So tensorize GEMM core part maybe is one solution.  As you have performed better than oneDNN, you could compute the efficiency of CPU (like 60%, 70% or ...), if you have reached like 98% efficiency, you maybe hardly to improve next.





---
[Visit Topic](https://discuss.tvm.ai/t/how-to-further-improve-the-performance-of-given-schedule/7711/6) 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/91c7de136b2013764f2e9771749637c6ee2b2b11d883f786827edc79b7f33fcb).

[TVM Discuss] [Questions] How to further improve the performance of given schedule?

Posted by Tianming Xu via TVM Discuss <no...@discuss.tvm.ai>.

![image|489x500](upload://uFYebvHM1JihXfCgB1UZByTMTcO.png)





---
[Visit Topic](https://discuss.tvm.ai/t/how-to-further-improve-the-performance-of-given-schedule/7711/5) 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/fe08d760bec4a3c0a33798dc80c15fdbdbfaac027cceccec78c43f5d31bf1502).

[TVM Discuss] [Questions] How to further improve the performance of given schedule?

Posted by Tianming Xu via TVM Discuss <no...@discuss.tvm.ai>.

@FrozenGene @tqchen Thanks for your advices.
I have written my own schedule and autotvm template. I also tried Intel OneDNN according to the BYOC tutorial. Currently I have outperformed OneDNN by about 0.4 ms on single cpu core.

I tried to perf it with VTune and collected hotspots report.
![image|690x314](upload://k0KC0YOjn9H53lk6CZSmYaifdPf.jpeg) 

The schedule performed unrolling and tiling a lot. It seemed that there were no obvious bottleneck.
1. Do you have any further suggestions about VTune ?
2. `__dlopen` appears on top. Why ?





---
[Visit Topic](https://discuss.tvm.ai/t/how-to-further-improve-the-performance-of-given-schedule/7711/4) 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/379a0eaad1f1c4050e318bd7ef673dc89cc9c5f1994baec09d0b0a880cfcbed6).

[TVM Discuss] [Questions] How to further improve the performance of given schedule?

Posted by Zhao Wu via TVM Discuss <no...@discuss.tvm.ai>.

For Intel x86 target, firstly, we should read the doc : https://tvm.apache.org/docs/tutorials/optimize/opt_gemm.html, which covers important aspects of tvm schedule primitives and its effect. Secondly, recommend to reading https://tvm.apache.org/docs/tutorials/autotvm/tune_simple_template.html, which tells us how to combine auto tvm and schedule to improve performance. Thirdly, we could enable Intel VTune to analyze what is the bottleneck of our program (LOAD occupies too much time or something else). Fourthly, we could refer some good libraries to learn what they do to improve performance, for example Intel oneDNN. Then we could try to implement the same mechanism using tvm (even tensorize). These are my experiences and suggestions.





---
[Visit Topic](https://discuss.tvm.ai/t/how-to-further-improve-the-performance-of-given-schedule/7711/3) 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/7694af142977158874bfacf4721039ae6b151b74282e0dab2dbeaefd18bf53fb).

[TVM Discuss] [Questions] How to further improve the performance of given schedule?

Posted by tqchen via TVM Discuss <no...@discuss.tvm.ai>.

cc @FrozenGene who might have some past experience in perf investigation





---
[Visit Topic](https://discuss.tvm.ai/t/how-to-further-improve-the-performance-of-given-schedule/7711/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/unsubscribe/66c61d77d906d6578606e585c8df9181d711a7ff6c5a41d901aa7a36473268de).