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

Tracking issue: Seeded Randomess #41

Open
1 of 6 tasks
patrick-rivos opened this issue Jun 23, 2023 · 0 comments
Open
1 of 6 tasks

Tracking issue: Seeded Randomess #41

patrick-rivos opened this issue Jun 23, 2023 · 0 comments

Comments

@patrick-rivos
Copy link
Contributor

patrick-rivos commented Jun 23, 2023

The current code base uses a few unseeded random.Random() calls. This causes the generated asm to be non-reproducable. Ideally we would have the user provide a seed to generate random values

Beyond the benefit of reproducible tests, this change also allows developers to see at a glance if a function uses a random value (since it will have rand: random.Random in it's function signature).

Directories with random.* calls

There might be other directories I missed, but I'll revise this issue when I discover them.

Race conditions:

  • Global variable in riscv-common/isa.py
    • This causes a race condition that manifests in label name when generating in multi-processing mode. Doesn't really matter from a correctness standpoint, but prevents comparing hashes of generated tests.
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

No branches or pull requests

1 participant