-
Notifications
You must be signed in to change notification settings - Fork 51
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
Deep Learning Extensions #158
Comments
Not sure if relevant -- mlir-npcomp (https://github.com/llvm/mlir-npcomp) does the conversion of NumPy -> MLIR, but it doesn't feel very mature yet. |
One question I have is whether there's any kind of commonality to APIs today. Some of the ones I checked that I expected to be "simplest" are functions like |
@rgommers valid question. I think there is enough commonality for basic use cases to start standardizing. The existence of ONNX and the possibility for mapping operators from TF/PT/MX to ONNX is to some extent an evidence of that. In fact, ONNX has been focusing on intersections of operator sets from different frameworks so far so it should provide a good starting point. That said, because deep learning is newer, it's more likely to have operators across frameworks that have semantic equivalence than those having identical definition. We will likely need some more analysis and comparison to tell. I'm hoping to contribute some as soon as I have free time. |
Activation FunctionsHere I summarize a few activation functions in ONNX, PyTorch, Flax (JAX), Tensorflow, and MXNet. celu
elu
gelu
log_softmax
relu
sigmoidAll libraries have consistent definition. soft_signAll libraries have consistent definition except MXNet.
softmax
silu
|
We mentioned a few open questions in 4/15 meeting:
|
I think it's good to have them differentiable, but then all differentiable functions should be grouped in a separate module, say, |
Not sure if this is the place to comment, but |
As this proposal is without a champion, I'll go ahead and close. Should we see more ecosystem consensus, we can revisit/reopen and consider as a future specification extension. |
Hi,
Now that we have a good foundation on the core array API in the standard, it's probably a good time to start thinking about the neural network extensions. As an initial step, here are the neural network operations from a few selected deep learning frameworks:
TF: https://www.tensorflow.org/api_docs/python/tf/nn
Pytorch: https://pytorch.org/docs/stable/nn.functional.html
MXNet: https://mxnet.apache.org/versions/master/api/python/docs/api/npx/index.html
flax (jax): https://flax.readthedocs.io/en/latest/flax.linen.html#linear-modules
haiku (jax): https://dm-haiku.readthedocs.io/en/latest/api.html#common-modules
In addition, I think the array API standard can benefit from the model exchange format definition of ONNX. Here are the operators that are currently in ONNX opsets.
ONNX: https://github.com/onnx/onnx/blob/master/docs/Operators.md
Next step would be to figure out a good set of operators in the intersection and iterate through the design choices in them.
The text was updated successfully, but these errors were encountered: