billishyahao commented on code in PR #11508:
URL: https://github.com/apache/tvm/pull/11508#discussion_r889062560


##########
src/runtime/contrib/dnnl/dnnl_json_runtime.cc:
##########
@@ -1084,6 +1086,47 @@ class DNNLJSONRuntime : public JSONRuntimeBase {
                          {DNNL_ARG_VARIANCE, variance_memory}});
   }
 
+  void LayerNorm(const size_t& nid) {
+    auto node = nodes_[nid];
+
+    auto data_entry = node.GetInputs()[0];
+    auto gamma_entry = node.GetInputs()[1];
+    auto beta_entry = node.GetInputs()[2];
+    
+    dnnl::memory::dims data_shape = 
nodes_[data_entry.id_].GetOpShape()[data_entry.index_];
+
+    float epsilon = 
std::stof(node.GetAttr<std::vector<std::string>>("epsilon")[0]);

Review Comment:
   I add ICHECK to this case. And will update later for supporting all other 
attributes.



-- 
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