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

feat: introduce CosimM to store platform features in a cache #98

Merged
merged 6 commits into from
Aug 26, 2024

Conversation

bollu
Copy link
Collaborator

@bollu bollu commented Aug 19, 2024

Closes #97 .

Description:

We implement a CosimM monad that tests platform features via platform_features.sh once. These are then used during instruction generation time. e.g. the presence/absence of SHA-512 instructions.

At least locally, I observe a modest decrease in wall clock time:

before
real 131.23
user 79.43
sys 67.27
after
real 126.06
user 75.35
sys 60.94

License:

By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.

Arm/Cosim.lean Show resolved Hide resolved
@bollu bollu marked this pull request as ready for review August 19, 2024 21:05
@bollu
Copy link
Collaborator Author

bollu commented Aug 20, 2024

@shigoel fixed parens.

shigoel added a commit that referenced this pull request Aug 21, 2024
### Description:

`x18` is not used either as a source or destination register. Moreover,
it is not expected to be preserved after a cosim test.

This is expected to clear up the bogus mismatches we see on Arm-based
Apple machines.

Another relevant PR: #98 

### Testing:

`make all` succeeds on my M3.

### License:

By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.

---------

Co-authored-by: Siddharth <[email protected]>
@bollu bollu marked this pull request as draft August 21, 2024 19:35
@bollu
Copy link
Collaborator Author

bollu commented Aug 25, 2024

@shigoel merged to synchronize with latest upstream/master. I feel this can be merged, and we can improve CosimM iteratively to save more data.

Copy link
Collaborator

@shigoel shigoel left a comment

Choose a reason for hiding this comment

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

Nice! Thanks, @bollu!

Arm/Insts/CosimM.lean Show resolved Hide resolved
@bollu bollu marked this pull request as ready for review August 26, 2024 20:51
@bollu bollu merged commit f203e58 into leanprover:main Aug 26, 2024
2 checks passed
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.

Cache Target Triple Information for Random Instruction Generation
3 participants