-
Notifications
You must be signed in to change notification settings - Fork 640
Enable more Python types to be supported by the DALI python function #5598
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
!build |
CI MESSAGE: [17252244]: BUILD STARTED |
CI MESSAGE: [17252244]: BUILD FAILED |
- adds support to DALI to and from DLPack conversion - extends types support for fn.ones, fn.full to include int8, uin32, uint64 - adds tests Signed-off-by: Janusz Lisiecki <[email protected]>
0bf3570
to
5c24338
Compare
!build |
CI MESSAGE: [17256060]: BUILD STARTED |
CI MESSAGE: [17256060]: BUILD PASSED |
dali/pipeline/data/types.h
Outdated
@@ -636,6 +636,12 @@ inline std::ostream &operator<<(std::ostream &os, DALIDataType dtype) { | |||
{__VA_ARGS__} \ | |||
} \ | |||
break; \ | |||
case DALI_INT8: \ |
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.
Food for thought:
This macro is used only once - I'd remove it, add some definition of tensor-compatible types and use TYPE_SWITCH
instead.
#define DALI_INTEGRAL_TYPES uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t
#define DALI_NUMERIC_TYPES DALI_INTEGRAL_TYPES, float, double
#define DALI_NUMERIC_TYPES_FP16 DALI_NUMERIC_TYPES, float16
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.
Done
include/dali/core/common.h
Outdated
// Common types | ||
using uint8 = uint8_t; | ||
using uint16 = uint16_t; | ||
using int16 = int16_t; | ||
using int64 = int64_t; | ||
using uint32 = uint32_t; | ||
using uint64 = uint64_t; | ||
using int8 = int8_t; | ||
using int16 = int16_t; | ||
using int32 = int32_t; | ||
using uint32 = uint32_t; | ||
using int64 = int64_t; |
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.
Can we remove those instead? They're not used that much and many places in the code use the standard names anyway.
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.
Removed all the types and converted all the occurrence to *_t
.
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.
Approved, but I'm not happy about extending proliferating vestigial features.
124b92c
to
e71eac3
Compare
!build |
CI MESSAGE: [17295335]: BUILD STARTED |
CI MESSAGE: [17295335]: BUILD FAILED |
Signed-off-by: Janusz Lisiecki <[email protected]>
e71eac3
to
9fcf8fd
Compare
!build |
CI MESSAGE: [17311969]: BUILD STARTED |
CI MESSAGE: [17311969]: BUILD PASSED |
int8, uin32, uint64
Category:
Other (e.g. Documentation, Tests, Configuration)
Description:
int8, uin32, uint64
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A