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

Add multiple dtype support #12

Closed
coreylowman opened this issue May 10, 2022 · 4 comments
Closed

Add multiple dtype support #12

coreylowman opened this issue May 10, 2022 · 4 comments
Labels
new feature New feature or request

Comments

@coreylowman
Copy link
Owner

This will be another generic parameter of all tensors. Most existing operations will likely require float generic.

Related to #9 since it involves an additional generic parameter

@coreylowman
Copy link
Owner Author

Next step for this is to make Device traits generic against dtype... first attempt ballooned into a huge number of changes in tensor though

@coreylowman
Copy link
Owner Author

Device traits are now generic against dtype. Tensor's have dtype as well, but all tensor_ops hard code Dtype=f32. Next step should be add Dtype as generic on tensor and adding Dtype: Float restrictions to most tensor ops.

@coreylowman coreylowman added the new feature New feature or request label May 26, 2022
@coreylowman coreylowman mentioned this issue May 26, 2022
@coreylowman
Copy link
Owner Author

Unclear how necessary this is. Previously the main use case I was thinking of was for class labels, but I don't think its worth supporting all the different data types in tensors just for that, especially since we can just one hot encode the class labels into f32 tensors anyway (see #19).

Now the main use cases I can think of are:

  • using f64 instead of f32, or maybe f16.
  • quantization

Both of those are pretty low priority though

@coreylowman
Copy link
Owner Author

Closing this for now since at least there are hooks to add other dtypes. If a new dtype should be added, there should be an issue created for that specific dtype

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

No branches or pull requests

1 participant