Skip to content
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

Coverity fixes 09-2024 #5633

Closed
wants to merge 2 commits into from
Closed

Coverity fixes 09-2024 #5633

wants to merge 2 commits into from

Conversation

szalpal
Copy link
Member

@szalpal szalpal commented Sep 11, 2024

Category:

Other (e.g. Documentation, Tests, Configuration)

Description:

Coverity fixes for 09-2024

Additional information:

Affected modules and functionalities:

Key points relevant for the review:

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

Signed-off-by: Michał Szołucha <[email protected]>
@szalpal
Copy link
Member Author

szalpal commented Sep 11, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18329280]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18329280]: BUILD FAILED

Signed-off-by: Michał Szołucha <[email protected]>
@szalpal
Copy link
Member Author

szalpal commented Sep 16, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18430989]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18430989]: BUILD FAILED

@@ -54,7 +54,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(adjustMatricesKernel2<<<num_blocks, threads_per_block, 0, stream>>>(wrap, bs));
Copy link
Contributor

@mzient mzient Sep 16, 2024

Choose a reason for hiding this comment

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

I don't think this would compile. A CUDA kernel invocation doesn't return a value.
Use CUDA_CALL(cudaGetLastError()); after the kernel invocation.

scratch.ToGPU(ws.stream(), pointers),
ws.NumInput() + 1,
N);
CUDA_CALL(Sum<<<div_ceil(N, 256), 256, 0, ws.stream()>>>
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise.

@mzient
Copy link
Contributor

mzient commented Sep 30, 2024

Fixes not posted. The changes are included in the replacement PR #5652

@mzient mzient closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants