-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unsupportedOperator: "Equal" (and "if"?) #19
Comments
please, look at this draft - #14 - use this as a reference. Maybe you will help and make a PR to MPSX :) |
Thanks for the guidance @geor-kasapidi ! I'm trying to implement
@geor-kasapidi your input is appreciated! |
well, i took a look at the IF operator - this is kinda tricky one. Both branches, true and false, require subgraph creations - if i understand onnx spec correctly. This is not a one-line implementation and requires new logic with recursive graph creation. But you can do this: for both branches call onnx function in MPSX with local tables for tensors and return output tensors from onnx calls in MPSGraph if method closures: self.onnx(node: <#T##Onnx_NodeProto#>,
optimizedForMPS: <#T##Bool#>,
tensorsDataType: <#T##MPSDataType#>,
tensors: &<#T##[String : MPSGraphTensor]#>,
constants: &<#T##[String : Onnx_TensorProto]#>) self.if(<#T##predicateTensor: MPSGraphTensor##MPSGraphTensor#>, then: {
// onnx result for true
}, else: {
// onnx result for false
}, name: nil) try this by yourself - and i will try to help more in case you will fail with this :) |
@ronyfadel any updates here? |
Hey @geor-kasapidi , I've paused working on this for a little while because of competing priorities |
I'm trying to run inference on Silero VAD using MPSX (https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx) but it's failing with:
The text was updated successfully, but these errors were encountered: