-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support for NumPy-style data types #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Just a quick q or 2.
tn.add_tensor(B, ["B", "Identity", "Real"]) | ||
tn.add_tensor(C, ["C", "Vector", "Real"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, though just a thought on mixing real and complex data types: given everything is a complex datatype on the backend, we could potentially speed-up BLAS ops for real * real, and real * complex contractions (and save memory too) by extending BLAS supports for the above types. Granted, I think this can be done later as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given everything is a complex datatype on the backend
Do you mean currently? Or will this always be the case?
we could potentially speed-up BLAS ops for real * real, and real * complex contractions (and save memory too) by extending BLAS supports for the above types.
I'm not sure about real * complex, but would adding bindings for cblas_dgemv
, cblas_dgemm
, and cblas_ddotu_sub
be enough (so that you can instantiate a Tensor<double>
)? Or are you talking about something else?
Context:
Python bindings for templated C++ classes require a unique class name for each template specialization. This introduces some boilerplate code on the C++ side and increases the verbosity of code on the Python side.
Description of the Change:
name
parameter passed to Python binding generators is now derived with the help of aType
structure.dtype
attribute.dtype
parameter are now available in thejet
Python package.dtype
parametrizations.Benefits:
Possible Drawbacks:
Tensor
class.Related GitHub Issues:
None.