Skip to content

Commit

Permalink
Fix issues detected by Coverity (2024.09.30) (#5652)
Browse files Browse the repository at this point in the history
* Fix issues detected by Coverity (2024.09.30)

Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
  • Loading branch information
mzient authored Sep 30, 2024
1 parent cd080a6 commit e9aebf1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
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())
: 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

0 comments on commit e9aebf1

Please sign in to comment.