intel / webml-polyfill

Deprecated, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill
Apache License 2.0
161 stars 46 forks source link

[MPS] The output values are incorrect for ADD operation with RELU/RELU1/RELU6 #289

Closed Christywl closed 5 years ago

Christywl commented 5 years ago

Test Env: Chromium Version: nightly build 70.0.3503.0 (b7ce158) Platform: Mac OS 10.13.6

Expected Result: The test should pass.

Actual Result: The output values are incorrect for ADD operation with RELU/RELU1/RELU6: For example: Test for RELU input1 = [1.0, 2.0]; input2 = [-3.0, 4.0]; expected: [0, 6.0] actual: [-2, 6]

How to Reproduce:

  1. Launch chromium and enable WebML flag
  2. Visit https://brucedai.github.io/nt/test/add-relu.html?backend=mps:

    • check result for Add relu example
    • check result for Add relu1 example
    • check result for Add relu6 example
Christywl commented 5 years ago

This issue has fixed on nightly build 8e6c6d1.