-
Notifications
You must be signed in to change notification settings - Fork 106
Support bool type for tensors #775
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
Conversation
…'t overflows than the tensor type in TENSORSET.
Codecov Report
@@ Coverage Diff @@
## master #775 +/- ##
==========================================
- Coverage 79.22% 78.92% -0.30%
==========================================
Files 50 50
Lines 7662 7721 +59
==========================================
+ Hits 6070 6094 +24
- Misses 1592 1627 +35
Continue to review full report at Codecov.
|
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
I think this PR should add the support for the appropriate backends also
…for representation.
…disAI/RedisAI into Support_BOOL_type_for_tensors
… code accordingly)
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!
@@ -51,7 +51,7 @@ RAI_Model *RAI_ModelCreateTorch(RAI_Backend backend, const char *devicestr, RAI_ | |||
dl_device = kDLCPU; | |||
break; | |||
case RAI_DEVICE_GPU: | |||
dl_device = kDLGPU; | |||
dl_device = kDLCUDA; |
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.
this is a breaking change
either introduce a new rdb encoding version or undo this change.
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.
This isn't a breaking change. dlpack renamed this in their last release: https://github.com/dmlc/dlpack/releases
but the numeric value has not changed.
We store tensor of type bool as a sequence of bits, where the minimal size is one byte (as UINT8).
Add validation that we do not overflow the size of the type of the tensor when setting new tensor.