Conversation
|
|
!build |
|
CI MESSAGE: [67521712]: BUILD STARTED |
|
CI MESSAGE: [67521712]: BUILD FAILED |
|
CI MESSAGE: [67521712]: BUILD PASSED |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
cb01308 to
23a81ca
Compare
|
!build |
|
CI MESSAGE: [67797265]: BUILD STARTED |
|
CI MESSAGE: [67797265]: BUILD FAILED |
23a81ca to
8281414
Compare
|
!build |
|
CI MESSAGE: [67967537]: BUILD STARTED |
|
CI MESSAGE: [67967537]: BUILD PASSED |
| ? spec.GetRepeatedArgument<int64_t>("integer_constants") | ||
| : std::vector<int64_t>{}; |
There was a problem hiding this comment.
I think this works by accident (kind of) - please also change the argument type in arithmetic.cc to DALI_INT64_VEC after #6486 is merged.
Signed-off-by: Rostan Tabet <rtabet@nvidia.com>
Signed-off-by: Rostan Tabet <rtabet@nvidia.com>
Signed-off-by: Rostan Tabet <rtabet@nvidia.com>
…e than int32 Signed-off-by: Rostan Tabet <rtabet@nvidia.com>
8281414 to
ecdd524
Compare
|
!build |
|
CI MESSAGE: [68224735]: BUILD STARTED |
|
CI MESSAGE: [68224735]: BUILD PASSED |
jantonguirao
left a comment
There was a problem hiding this comment.
LGTM. Confirmed the earlier review concerns (int64 storage, overflow check semantics, UINT32 boundary test fix, CI failure) are all resolved, and CI is green.
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
Currently, arithmetic operators pull constant integers as 32 bits signed ints. As a result, silent overflows can happen, producing wrong results without any warning nor error.
The Python binding for
OpSpec::AddArgis already registered asint64_t:DALI/dali/python/backend_impl.cc
Line 3414 in 3e40f6d
And the argument storage uses
int64_tfor all integral types anyway:DALI/dali/pipeline/operator/argument.h
Lines 32 to 37 in 3e40f6d
So we can pull the integer constants as 64 bit integers and error out if they don't fit their target dtype.
Additional information:
This allows arithmetic operators to consume more than 32 bit signed integers but throws an exception instead of silently overflowing.
Affected modules and functionalities:
Integral constants in arithmetic operators.
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A