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

benchdnn: binary: update filling (maybe fixed MFDNN-12857) #2333

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dzarukin
Copy link
Contributor

@dzarukin dzarukin commented Jan 2, 2025

MFDNN-12857

Make src1 input integer only to avoid potential cancellation in sdpa patterns.

Make src1 input integer only to avoid potential cancellation in sdpa
patterns.
@dzarukin dzarukin requested a review from a team as a code owner January 2, 2025 18:45
@github-actions github-actions bot added the component:tests Codeowner: @oneapi-src/onednn-arch label Jan 2, 2025
@dzarukin
Copy link
Contributor Author

dzarukin commented Jan 2, 2025

make test
enable benchdnn_nightly
disable benchdnn_all
enable benchdnn_binary
enable benchdnn_graph

// Remove zeroes in src1 to avoid division by zero
if (input_idx == 1 && value == 0.0f) value = 1.0f;
mem_fp.set_elem(i, round_to_nearest_representable(dt, value));
int min_val = MAX2(-8, static_cast<int>(lowest_dt(mem_dt.dt())));
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems:

  • older code path would generate random data between [0; 16] for unsigned types whereas the patch generates data between [0; 8], is that expected?
  • not specific to this patch: why use a fixed interval of 16 values instead of mem_dt range?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:tests Codeowner: @oneapi-src/onednn-arch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants