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 support for bool, double, int32, uint32 and float32 on Tensors via TensorT #177

Merged
merged 16 commits into from
Mar 7, 2021

Conversation

axsaucedo
Copy link
Member

@axsaucedo axsaucedo commented Mar 6, 2021

Fixes #2
Fixes #144

This PR explores the approaches that could be introduced to support multiple types for tensors - it includes:

  • Conversion of top level Tensor class as just a high level container that doesn't store memory
  • TensorT class implementation that introduces abstraction to provide data in CPU with std::vector
  • All other classes can use the top level Tensor class without any modifications
  • Updated array_classification and logistic regression example showing how it works at the moment
  • Introduces kp::Tensor::TensorDataTypes which provide explicit data information

Further points to explore:

Other things to explore in separate issue / pr:

  • Exploration of validation for shaders (most probably outside of scope of PR)

@alexander-g
Copy link
Contributor

Looks good.
I am already using different data types in my project via .view('uint32'). This was quite a pain to get it working correctly, so if Kompute supports this from the beginning it would of course be nice.

@axsaucedo axsaucedo changed the title Add support for bool, double, int32, uint32 and float32 on Tensors via TensorView Add support for bool, double, int32, uint32 and float32 on Tensors via TensorT Mar 7, 2021
@axsaucedo axsaucedo merged commit 1d2d33b into master Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants