You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2022/01/25 18:08:40 UTC

[GitHub] [incubator-mxnet] agrabows opened a new pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

agrabows opened a new pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846


   ## Description ##
   Binary broadcast operators such as broadcast_add are supported by oneDNN but not when inputs are of type bFloat16. Goal was to add those cases.
   
   ## Checklist ##
   ### Essentials ###
   - [x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [x] All changes have test coverage
   - [x] Code is well-documented


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows commented on a change in pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows commented on a change in pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#discussion_r797733350



##########
File path: tests/python/dnnl/test_bf16_operator.py
##########
@@ -55,20 +55,22 @@ def check_operator_accuracy(sym_fp32, sym_bf16, data_shape, num_input_data=1, bf
     etol: float
         The error rate threshold, allow a small amount of value not consistent between bf16 and fp32
     """
-    if not isinstance(data_shape, tuple):
-        data_shape = tuple(data_shape)
+    if isinstance(data_shape, tuple):
+        data_shape = {"data": data_shape}
     data_range = (0.0, 10.0)
     data_list_fp32 = list()
     data_list_bf16 = list()
-    for i in range(num_input_data):
-        data_list_fp32.append(mx.nd.random.uniform(low=data_range[0], high=data_range[1], shape=data_shape))
+    for i, obj in enumerate(data_shape):

Review comment:
       done




-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] bgawrych merged pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
bgawrych merged pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846


   


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1032409180


   Jenkins CI successfully triggered : [unix-cpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1032806476


   @mxnet-bot run ci [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] bgawrych commented on a change in pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
bgawrych commented on a change in pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#discussion_r797614635



##########
File path: tests/python/dnnl/test_bf16_operator.py
##########
@@ -55,20 +55,22 @@ def check_operator_accuracy(sym_fp32, sym_bf16, data_shape, num_input_data=1, bf
     etol: float
         The error rate threshold, allow a small amount of value not consistent between bf16 and fp32
     """
-    if not isinstance(data_shape, tuple):
-        data_shape = tuple(data_shape)
+    if isinstance(data_shape, tuple):
+        data_shape = {"data": data_shape}
     data_range = (0.0, 10.0)
     data_list_fp32 = list()
     data_list_bf16 = list()
-    for i in range(num_input_data):
-        data_list_fp32.append(mx.nd.random.uniform(low=data_range[0], high=data_range[1], shape=data_shape))
+    for i, obj in enumerate(data_shape):

Review comment:
       replace obj with name/key or use items() to iterate over values in dict




-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1032408703


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1032806568


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1023382639


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1022410242


   @mxnet-bot run ci [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows removed a comment on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows removed a comment on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1032720132


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1027944875


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1022410302


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1027944777


   @mxnet-bot run ci [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1032720132


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1032409130


   @mxnet-bot run ci [unix-cpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1032408642


   @mxnet-bot run ci [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] agrabows commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1023382483


   @mxnet-bot run ci [windows-gpu]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20846: [Feature] Add bfloat to oneDNN version of binary broadcast operators.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#issuecomment-1021468014


   Hey @agrabows , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [windows-cpu, centos-cpu, unix-cpu, windows-gpu, centos-gpu, clang, website, edge, unix-gpu, sanity, miscellaneous]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org