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

fix uninitialized values involving in gemm computation #123

Open
wants to merge 1 commit into
base: v2.4_for_ie_master
Choose a base branch
from

Conversation

chenhu-wang
Copy link
Collaborator

Description

fix gemm use uninitialized values involving computation

@chenhu-wang chenhu-wang changed the title fix uninitialized values involving computation fix uninitialized values involving in gemm computation Mar 28, 2022
@@ -597,6 +597,7 @@ static dnnl_status_t gemm_kernel_driver(int ithr, dim_t m, dim_t n, dim_t k,
if (mem_size > 0) {
mem = (char *)malloc(mem_size, 128);
if (!mem) return dnnl_out_of_memory;
memset(mem, 0, mem_size);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if this is actually fixes the issue.
I mean with this change we will definitely get rid of valgrind error, but this is not what we really want
Possible concerns:

  1. In general it is not required to default-initialize memory with some values (zeros in this case).
  2. After this change MVN node will read zeros from this piece of memory. Are we sure that this is ok and will not affect the computation results?
  3. That's great you have found that the root case is located in oneDNN code. We should try to check the latest oneDNN version and see if this issue is fixed there.

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.

2 participants