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

Various small fixes #814

Merged
merged 5 commits into from
Jul 14, 2023
Merged

Various small fixes #814

merged 5 commits into from
Jul 14, 2023

Conversation

nkoppel
Copy link
Contributor

@nkoppel nkoppel commented Jul 13, 2023

A tiny pr that resolves multiple issues too small to deserve their own pr. It makes the following changes:

  • Re-exports half::f16 in shapes/mod.rs, which resolves Re-export half::f16 in lib.rs if f16 feature is enabled #810.
  • Makes Gradients::get_or_alloc_mut public, which resolves Make Gradients::get_or_alloc_mut pub #809.
  • Allows get_or_alloc_mut and Gradients::get to work with any implementer of TensorLike.
  • Makes Gradients::try_alloc_for public
  • Makes Tensor::ghost public (GhostTensor was already public, there just wasn't any way to construct it)
  • Fixes multiple clippy warning, which may be new as of nightly rust 1.73.0

Comment on lines 74 to 81
cp as *mut gemm::f16,
cp,
cstr[1] as isize,
cstr[0] as isize,
accum,
ap as *const gemm::f16,
ap,
astr[1] as isize,
astr[0] as isize,
bp as *const gemm::f16,
bp,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need these - internally gemm does a TypeId check against the type. So if gemm is using a different version of the half crate than dfdx, this will fail.

Copy link
Owner

@coreylowman coreylowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the gemm stuff

Copy link
Owner

@coreylowman coreylowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@coreylowman coreylowman merged commit fa67f5a into coreylowman:main Jul 14, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

Re-export half::f16 in lib.rs if f16 feature is enabled Make Gradients::get_or_alloc_mut pub
2 participants