[TVM Discuss] [Questions] [AutoTVM] Find the default optimization configuration of the kernel

2020-03-27 Thread Sunghyun Park via TVM Discuss


Thank you for the help. Here's what I've learned and found issues.

* This is what I tried inside the my custom tuner.

cfg = FallbackConfigEntity()
func_name = self.task.name  // conv2d_nchw_winograd.cuda
ref_log = autotvm.tophub.load_referernce_log( target.target_name, 
  '1080ti', func_name)
print(cfg)  // Returns 'None'

* Automatic device model selection in line 229 did not work for my case: when 
selecting alternative model, current code does not check whether it contains 
data for the workload and pick the wrong model. So, currently, I picked the 
valid model manually. 

https://github.com/apache/incubator-tvm/blob/master/python/tvm/autotvm/tophub.py#L229

* Is there any reason for *FallbackConfigEntity*  to inherit *ConfigSpace*, not 
the *ConfigEntity*? In my code, *cfg.fallback_with_reference_log* updates *cfg* 
with reference configuration but since it is not a *ConfigEntity* object,  
tuner cannot handle this object. For example, *index* field does not exist with 
*FallbackConfigEntity* although it loads the best knobs from the reference. 
When I pass this object to the tuner, it complains the runtime error with 
error_no=4.

https://github.com/apache/incubator-tvm/blob/master/python/tvm/autotvm/task/space.py#L954





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090/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/6f7ac6b4cda35cd33e8c639043e29c8a62a34473cc8cfc2de552c4500290f656).


[TVM Discuss] [Questions] [AutoTVM] Find the default optimization configuration of the kernel

2020-03-27 Thread Cody H. Yu via TVM Discuss


> Is  *fallback_with_reference_log*  the one I can use? I’m not sure since it 
> does not return any configuration. (Seems like it applies directly to the 
> kernel?)

Yes this is the one. It didn't return because it is a method of a config 
entity. What it did was copying the config map from other config enrities to 
itself, such as 
https://github.com/apache/incubator-tvm/blob/master/python/tvm/autotvm/task/space.py#L1045.

In this case, you don't need to run AutoTVM for the fallback config. When you 
build the model without calling `apply_history_best`, the fallback config will 
be used automatically.





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090/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/7cc5fe0557a979b2fc568d56ae4310e5feea7b257255c49ab5983eb2de06a597).


[TVM Discuss] [Questions] [AutoTVM] Find the default optimization configuration of the kernel

2020-03-27 Thread Sunghyun Park via TVM Discuss


Thanks for the advice. This seems like a good start.

I've been playing around with auto-tuner module and thinking that we may 
utilize the performance of the default schedule during the tuning process.

2nd approach seems more relevant for my purpose. Rather than defining a default 
configuration by myself as the 1st approach, I want to measure the performance 
of the current default configuration in the tuner model. 

Is *fallback_with_reference_log*  the one I can use? I'm not sure since it does 
not return any configuration. (Seems like it applies directly to the kernel?)

As far as I know, I need a set of optimization configurations (*config* in the 
following code) for the default setting to trigger the measurement inside the 
tuner. 

https://github.com/apache/incubator-tvm/blob/master/python/tvm/autotvm/tuner/tuner.py#L122

Thank you so much for the great advices!





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090/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/b72609ed1008689a0653c51573b3339f0372edf8e5c615733e2e9036b547a86c).


[TVM Discuss] [Questions] [AutoTVM] Find the default optimization configuration of the kernel

2020-03-27 Thread Cody H. Yu via TVM Discuss


It depends on the schedule function. For example:

1. Directly define a default configuration.

https://github.com/apache/incubator-tvm/blob/master/topi/python/topi/x86/conv2d.py#L36

2. Load the best configurations of similar workloads and make a one.

https://github.com/apache/incubator-tvm/blob/master/topi/python/topi/cuda/conv2d_direct.py#L45

https://github.com/apache/incubator-tvm/blob/master/python/tvm/autotvm/task/space.py#L1004





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090/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/c69f1b24c9e4268aed81419dcef97b01a76902b8fab61854891036dc79ad3b50).


[TVM Discuss] [Questions] [AutoTVM] Find the default optimization configuration of the kernel

2020-03-27 Thread Robert Bücs via TVM Discuss


I see! That's a very good question. I'm not sure to be honest. I wanted to look 
into it myself for measuring a performance baseline for each kernel before 
autotuning. I'll look into it the next days when I have spare time. Please let 
me know if you have found something in the meanwhile..





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090/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/84d3711bde3ffb015d09e9979a7e73ac212b698fb0c3193a5e62979352fccb53).


[TVM Discuss] [Questions] [AutoTVM] Find the default optimization configuration of the kernel

2020-03-26 Thread Sunghyun Park via TVM Discuss


Thank you for the advice!

When looking into the autotuners (python/tvm/autotvm/tuner/), they generate a 
set of optimization configurations that they want to apply to the compilation 
of each kernel.  
(If 1,000 trials are given, they will generate 1,000 configurations and pick 
the best one)

In this context, I'm wondering what is the default configuration is for each 
kernel. 
If default setting is not applying any optimization, I'm not sure how I can 
trigger compilation and measurement without any optimization inside the tuner 
module. 

Thanks!





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090/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/aa5c636759b038a2e0fb2d85074014d3befb130ffc8994a29742e31cfe7d3ce1).


[TVM Discuss] [Questions] [AutoTVM] Find the default optimization configuration of the kernel

2020-03-26 Thread Robert Bücs via TVM Discuss


Hi,

I'm not fully sure whether I understood your questions correctly. If you are 
looking for the default schedule for a selected target, TVM fetches that from 
[this](https://github.com/uwsampl/tvm-distro/tree/master/tophub) repository 
during execution time and places a copy under /home/yourusername/.tvm/tophub/

Cheers,
Robert





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090/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/6963035213cd539f10257b6f8e4db057c84e8a4a39affb8556aef93041f097f8).


[TVM Discuss] [Questions] [AutoTVM] Find the default optimization configuration of the kernel

2020-03-25 Thread Sunghyun Park via TVM Discuss


Hi, I'm trying to get the default schedule configuration for each kernel in 
tuner modules. 
e.g., [('tile_f', [-1, 64, 1, 1]), ('tile_y', [-1, 1, 1, 7]), ...]

I'm bit running out-of-time so I'm asking here to find any luck while looking 
into the code. 
Any advice or suggestion would be greatly appreciated.
Thanks!





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090/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/fd94d29eda6166f9132db0d1d07e043081f52066e0dbe09f68e50ae0c1fbf4c1).