-
Notifications
You must be signed in to change notification settings - Fork 607
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
Improve handling of "dtype" arguments in OpSchema/OpSpec #3981
Conversation
…ck ambiguous overload of AddOptionalArg with a static_assert. Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Don't pass "dtype" to warp_affine when it's the same as input - let the operator infer the type. Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
CI MESSAGE: [5072940]: BUILD STARTED |
CI MESSAGE: [5072940]: BUILD FAILED |
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
CI MESSAGE: [5073962]: BUILD STARTED |
CI MESSAGE: [5073962]: BUILD FAILED |
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@@ -244,7 +261,7 @@ def test_gpu_vs_cpu(): | |||
inv_map=inv_map) | |||
gpu_pipeline.build() | |||
|
|||
compare(cpu_pipeline, gpu_pipeline, 1) | |||
compare(cpu_pipeline, gpu_pipeline, 1.0001) |
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.
The new fill value results in max differences slightly >1 (rounding + some error accumulation, likely result of using fma on GPU and plain mul/add on CPU).
CI MESSAGE: [5079728]: BUILD STARTED |
CI MESSAGE: [5079728]: BUILD PASSED |
out_of_bounds_policy_(GetOutOfBoundsPolicy(spec)) { | ||
spec.TryGetArgument(output_type_, "dtype"); |
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.
Have you checked there's a default?
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.
Yeah, line 93.
Signed-off-by: Michał Zientkiewicz mzient@gmail.com
Category:
Bug fix (non-breaking change which fixes an issue)
Refactoring (Redesign of existing code that doesn't affect functionality)
Description:
Bug:
removing a default value from
AddOptionalArg("name", "doc", value, TYPE_ID)
resulted in adding an argument of type DALIDataType and the default value TYPE_ID. This happened in "fill_value" argument to WarpAttr. This PR fixes that.Refactoring:
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Existing tests: all over the place
New tests: test_operator_warp - added floating point fill value
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A