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
Fix missing layouts in operators #2136
Conversation
CI MESSAGE: [1484144]: BUILD STARTED |
CI MESSAGE: [1484144]: BUILD FAILED |
36500a7
to
c2ec34e
Compare
CI MESSAGE: [1484169]: BUILD STARTED |
CI MESSAGE: [1484169]: BUILD FAILED |
CI MESSAGE: [1484472]: BUILD STARTED |
CI MESSAGE: [1484472]: BUILD FAILED |
bbf281e
to
cce4c93
Compare
@@ -66,7 +66,7 @@ void Flip<CPUBackend>::RunImpl(Workspace<CPUBackend> &ws) { | |||
auto _horizontal = GetHorizontal(ws, ws.data_idx()); | |||
auto _vertical = GetVertical(ws, ws.data_idx()); | |||
auto _depthwise = GetDepthwise(ws, ws.data_idx()); | |||
if (!_horizontal && !_vertical) { | |||
if (!_horizontal && !_vertical && !_depthwise) { |
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 bonus bugfix
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.
👍
dali/pipeline/operator/operator.h
Outdated
if (ws.NumInput() > 0 && ws.NumOutput() > 0) { | ||
auto &in = ws.template InputRef<GPUBackend>(0); | ||
auto &out = ws.template OutputRef<GPUBackend>(0); | ||
auto in_layout = in.GetLayout(); |
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.
to remove
CI MESSAGE: [1487706]: BUILD STARTED |
CI MESSAGE: [1487706]: BUILD FAILED |
f3ce661
to
60f6a1c
Compare
CI MESSAGE: [1487727]: BUILD STARTED |
CI MESSAGE: [1487727]: BUILD FAILED |
60f6a1c
to
2bb7cea
Compare
CI MESSAGE: [1489879]: BUILD FAILED |
CI MESSAGE: [1489879]: BUILD STARTED |
2bb7cea
to
cf1d70c
Compare
CI MESSAGE: [1490840]: BUILD STARTED |
CI MESSAGE: [1490840]: BUILD FAILED |
CI MESSAGE: [1491086]: BUILD STARTED |
CI MESSAGE: [1491086]: BUILD FAILED |
7ecad79
to
bf494da
Compare
include/dali/core/tensor_layout.h
Outdated
@@ -193,6 +193,15 @@ class TensorLayout { | |||
DALI_HOST_DEV | |||
constexpr bool empty() const noexcept { return size() == 0; } | |||
|
|||
void resize(size_t new_size, char value = '?') noexcept { |
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.
permuting tensor layout was broken because of missing resize function
CI MESSAGE: [1493265]: BUILD STARTED |
@@ -96,6 +96,7 @@ void ColorSpaceConversion<GPUBackend>::RunImpl(DeviceWorkspace &ws) { | |||
DALI_ENFORCE(IsType<uint8_t>(input.type()), | |||
"Color space conversion accept only uint8 tensors"); | |||
auto &output = ws.Output<GPUBackend>(0); | |||
output.SetLayout(input.GetLayout()); |
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.
output.SetLayout(input.GetLayout()); | |
output.SetLayout(InputLayout(ws, 0)); |
…t number of inputs Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
!build |
CI MESSAGE: [1500962]: BUILD STARTED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
2c0385f
to
acb8d28
Compare
!build |
CI MESSAGE: [1501066]: BUILD STARTED |
CI MESSAGE: [1501066]: BUILD FAILED |
!build |
CI MESSAGE: [1505083]: BUILD STARTED |
CI MESSAGE: [1505083]: BUILD FAILED |
985180c
to
3de7be3
Compare
!build |
CI MESSAGE: [1507491]: BUILD STARTED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
3de7be3
to
a9bce35
Compare
!build |
CI MESSAGE: [1507729]: BUILD STARTED |
CI MESSAGE: [1507729]: BUILD FAILED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
!build |
CI MESSAGE: [1508081]: BUILD STARTED |
CI MESSAGE: [1508081]: BUILD PASSED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
CI MESSAGE: [1508762]: BUILD STARTED |
CI MESSAGE: [1508762]: BUILD FAILED |
CI MESSAGE: [1508762]: BUILD PASSED |
Signed-off-by: Joaquin Anton janton@nvidia.com
Why we need this PR?
Pick one, remove the rest
What happened in this PR?
Fill relevant points, put NA otherwise. Replace anything inside []
SetLayout in a few operators that didn't
Added a
resize
function to TensorLayout (permute didn't work properly without it)TensorVector::GetLayout will check the sample layouts if the layout for the whole TensorVector was not set
Several operators, TensorLayout, TensorVector
Correctness of output layouts, Implementation of TensorLayout::resize and TensorVector::GetLayout
TensorLayout::resize tests added
N/A
JIRA TASK: [DALI-1517]