There's no change for nn.dense because it doesn't have the version you want, as 
you already pointed out.

If you're using BYOC, then there is a trick you can play at this moment. Since 
the preprocess still maintains the type, you cannot simply transpose the weight 
from `[N, C]` to `[C, N]`. On the other hand, BYOC allows you to manipulate 
constants when initializing the runtime engine. As a result, you can inverse 
the weight layout in tensor data but pretend its shape is still `[N, C]`. In 
short, it looks like the following in runtime:

1. When initializing the engine, you transpose the weight order to be `[C, N]`.
2. TVM host module runs to the `nn.dense`, which input shaps is still `[N, C]` 
in the graph.
3. Since `nn.dense` has been offloaded to your module, TVM host module calls 
your module with the input data entry IDs.
4. The data order in the data entry for the weight is already `[C, N]`, so you 
can access it correctly.





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/best-way-to-deal-with-kernel-layout/9576/7)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/6c44c83b37712846b09736869ed3312c5b72c47246435842739c583eaa376b8c).

Reply via email to