Skip to content

Fix issues detected by Coverity (2024.09.30) #5652

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

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dali/operators/image/remap/cvcuda/matrix_adjust.cu
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void adjustMatrices(nvcv::Tensor &matrices, cudaStream_t stream) {
int num_blocks = div_ceil(bs, 256);
int threads_per_block = std::min(bs, 256);
adjustMatricesKernel2<<<num_blocks, threads_per_block, 0, stream>>>(wrap, bs);
CUDA_CALL(cudaGetLastError());
}

} // namespace warp_perspective
Expand Down
2 changes: 1 addition & 1 deletion dali/operators/image/remap/cvcuda/warp_perspective.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class WarpPerspective : public nvcvop::NVCVSequenceOperator<StatelessOperator> {
NVCVBorderType border_mode_ = NVCV_BORDER_CONSTANT;
NVCVInterpolationType interp_type_ = NVCV_INTERP_NEAREST;
std::vector<float> fill_value_arg_{0, 0, 0, 0};
float4 fill_value_;
float4 fill_value_{};
bool inverse_map_ = false;
bool ocv_pixel_ = true;
std::optional<cvcuda::WarpPerspective> warp_perspective_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class ResizeOpImplCvCuda : public ResizeBase<GPUBackend>::Impl {

TensorListShape<frame_ndim> in_shape_, out_shape_;
std::vector<int> frame_idx_; // map of absolute frame indices in the input TensorList
int total_frames_; // number of non-empty frames
int total_frames_ = 0; // number of non-empty frames
std::vector<ResamplingParamsND<spatial_ndim>> params_;

cvcuda::HQResize resize_op_{};
Expand Down
2 changes: 1 addition & 1 deletion dali/pipeline/executor/executor2/exec2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class Executor2::Impl {
auto stream_idx = assignment[&node];

node.env.order = stream_idx.has_value()
? AccessOrder(streams_[*stream_idx])
? AccessOrder(streams_[*stream_idx].get())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is required by Coverity, whose C++ front-end cannot resolve the function overload.

: AccessOrder::host();
}
}
Expand Down
1 change: 1 addition & 0 deletions dali/pipeline/executor/executor2/exec2_ops_for_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void DummyOpGPU::RunImpl(Workspace &ws) {
scratch.ToGPU(ws.stream(), pointers),
ws.NumInput() + 1,
N);
CUDA_CALL(cudaGetLastError());
}


Expand Down
1 change: 1 addition & 0 deletions dali/pipeline/executor/executor2/exec_node_task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ void OpTask::RunOp() {
ResetInputLayouts();
PropagateSourceInfo(*ws_);
}
assert(ws_->GetIterationData());
if (auto cpt = ws_->GetIterationData()->checkpoint) {
node_->op->SaveState(cpt->GetOpCheckpoint(node_->instance_name), ws_->output_order());
}
Expand Down
Loading