Skip to content
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

NDArray with parametric type? #323

Open
iblislin opened this issue Nov 15, 2017 · 6 comments
Open

NDArray with parametric type? #323

iblislin opened this issue Nov 15, 2017 · 6 comments

Comments

@iblislin
Copy link
Member

Should we make NDArray be parametric like Base's Array?
One of the benefit I can tell is that it will help for multiple dispatch,
but how about the performance?

@iblislin
Copy link
Member Author

BTW, what's the pros and cons if we make NDArray as an subtype of AbstractArray?

@vchuravy
Copy link
Collaborator

I have been wanting to make NDArray parametric for quite some time. #233 was one of the points where having it not be parametric caused big performance problems.
I am not quite convinced if NDArray should be a subtype of AbstractArray, but maybe it should if we are pushing to make MXNet.jl more in line with Julia semantics.

@iblislin
Copy link
Member Author

ok, I want to make NDArray parametric first #331

@pluskid
Copy link
Member

pluskid commented Nov 22, 2017

I have no objection. What would the libmxnet function on NDArrays become? Are we going to define functions for all combinations of NDArrays or just define for the non-typed version?

@iblislin
Copy link
Member Author

some of them benifit from dispatching, e.g. https://github.com/dmlc/MXNet.jl/pull/331/files#diff-0ca423d226049cc5744ebade856d9f1bR666

And most of functions are using UnionAll (NDArray without any parameter) type

@pluskid
Copy link
Member

pluskid commented Nov 22, 2017

Thanks! This looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants