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

Bugfix in digital core #15

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

Bugfix in digital core #15

wants to merge 1 commit into from

Conversation

maartenvds
Copy link
Collaborator

It seems that with realistic weights and biases, the DIANA digital accelerator gives different results compared to simulation on x86. This can already be proven through executing a single conv2d layer. This issue was not yet discovered since we were testing with very large random biases. Due to their size, small mistakes in the convolution result itself were covered and not reveald earlier. This issue was discovered by testing with realistic trained weights and biases. In the latter case, the biases were much smaller and differences in computed results between x86 and DIANA were uncovered.

This PR starts with adding a new test case test_conv2d_reproduce_bug in test.py to reproduce the problem. The test case sets the random generated biases to zero and runs 3 tests with different kernel sizes (1, 3 and 5).

The cause of this problem is not yet discovered and needs investigation.

Two other modifications were made to fix the other test cases when running on diana:

  • removed -layout_transform=0 in driver() function. We need the layout transform to have correct behaviour of diana.
  • create_demo_file() removes processed entries from the params dict (where the key starts with g_). This is unwanted in some cases so now we work with a copy of that dict in create_demo_file().

Run test `test_conv2d_reproduce_bug` to reproduce.
Other mods:
* removed -layout_transform=0 in driver() function. We need the
  layout transform to have correct behaviour of diana.
* create_demo_file() removes processed entries from the params dict
  (where the key starts with `g_`). This is unwanted in some cases
  so now we work with a copy of that dict in create_demo_file().
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.

1 participant