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

Backport: cpu: fixes coverity issues #2630

Merged
merged 2 commits into from
Feb 8, 2025

Conversation

xuxinzen
Copy link
Contributor

@xuxinzen xuxinzen commented Feb 7, 2025

Backport of #2619

@xuxinzen xuxinzen requested review from a team as code owners February 7, 2025 21:32
@github-actions github-actions bot added the platform:cpu-x64 Intel64/AMD64 processors. Codeowner: @oneapi-src/onednn-cpu-x64 label Feb 7, 2025
@xuxinzen
Copy link
Contributor Author

xuxinzen commented Feb 7, 2025

make test

@@ -100,7 +100,7 @@ struct simple_sparse_reorder_impl<SIMPLE_SPARSE_REORDER_TEMPL_CALL,

static size_t get_scratchpad_size(const memory_desc_wrapper &input_d,
const memory_desc_wrapper &output_d) {
const auto nelems = static_cast<size_t>(output_d.nelems(true));
Copy link
Contributor

Choose a reason for hiding this comment

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

nelems can only return < 0 when one of the dimensions is runtime because this is how wildcard defined:

#define DNNL_RUNTIME_DIM_VAL INT64_MIN

This reorder doesn't support runtime dimensions so we return unimplemented before we can reach this place so it is safe to keep size_t.

@xuxinzen xuxinzen merged commit d723449 into rls-v3.7 Feb 8, 2025
6 of 13 checks passed
@xuxinzen xuxinzen deleted the xzeng/fixup_coverity_v2_backport branch February 8, 2025 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport platform:cpu-x64 Intel64/AMD64 processors. Codeowner: @oneapi-src/onednn-cpu-x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants