bgawrych opened a new pull request, #21065:
URL: https://github.com/apache/incubator-mxnet/pull/21065

   ## Description ##
   Fix for: https://github.com/apache/incubator-mxnet/issues/21061
   
   Assert was triggered on machines with VNNI support. Root cause of this was 
not implemented reorder primitive between format_tag::ldgoi to brgemm weights, 
   
   Also added parallelization to loop for Adjusting GRU gates from MXNet format 
to oneDNN format
   
   
![image](https://user-images.githubusercontent.com/59644968/173613911-9e1e1525-84c5-47fb-af84-18f91c04d818.png)
   
   Benchmark script:
   ```
   import mxnet as mx
   import time
   from itertools import product
   
   input_sizes = [8, 32, 64]
   hidden_sizes = [64, 128, 512]
   num_layers = [1, 2, 3, 4]
   bidirectional = [True, False]
   for hidden_size, num_layers, bidirected in product(hidden_sizes, num_layers, 
bidirectional):
       net = mx.gluon.rnn.GRU(hidden_size, num_layers=num_layers, 
bidirectional=bidirected)
       net.initialize()
       in_data = mx.nd.random.uniform(-1, 1, shape=(128, 1, hidden_size))
       tic = time.time()
       for i in range(10):
           o = net(in_data)
           o.wait_to_read()
       print(f"({hidden_size},{num_layers},{bidirected});", time.time() - tic)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to