[AutoTVM] How to tune dense layers?


I was wondering if is possible to use AutoTVM to tune dense layers and if so could you please share or pointing me to an example on how to achieve this. My target system is x86.


1 Like

Interested too. It would be nice to suppress the warning about the dense layer missing optimization and maybe also get a little improvement in performance

Is this still not possible?

Add more ops to your tuning scripts like:



            params=params, ops=(relay.op.nn.conv2d, relay.op.nn.dense)

@jackwish Is topi dense layer registered in autotvm for x86 target?

It is: https://github.com/apache/incubator-tvm/blob/master/topi/python/topi/x86/dense.py

Sure it is.

PS. why post must be at least 20 characters…

1 Like

Thanks everyone, I’ll try it asap.

@jackwish @comaniac it does work! But tuned model performance are the same if not a bit worse than untuned one.

Sorry but I didn’t get it…

Really? What’s your workload?

workload=('dense', (1, 25088, 'float32'), (512, 25088, 'float32'), 0, 'float32')

@jackwish any clue or anything else I can try?