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 42 forks source link

[MPS] Facial Landmark Detection doesn't work on MPS #969

Open Christywl opened 5 years ago

Christywl commented 5 years ago

Test Env: Chromium Version: nightly build 75.0.3739.0 (9642fde) Platform: macOS

Expected Result: Facial Landmark Detection should work.

Actual Result: After the crash issue #716 was fixed, Facial Landmark Detection doesn't work on MPS:

Screen Shot 2019-09-09 at 1 24 12 PM

How to Reproduce:

  1. Launch chromium and visit: https://intel.github.io/webml-polyfill/examples/facial_landmark_detection/
  2. Select SUSTAINED_SPEED
  3. Select one model:
    • SSD MobileNet v1
    • SSD MobileNet v2
    • SSDLite MobileNet v2
fujunwei commented 5 years ago

It's not regression but relieving symptoms after fixing crashed issue.

A node is optimized by last graph that isn't result node, so the value of temporary_mps_images[input_index] will be null, the model need to be supported above mac os 10.15 with resultImages

init?(device: MTLDevice, resultImages: [MPSNNImageNode], resultsAreNeeded areResultsNeeded: UnsafeMutablePointer?)