-
Notifications
You must be signed in to change notification settings - Fork 31
Add Cache Miss/Hit Test #97
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
base: main
Are you sure you want to change the base?
Add Cache Miss/Hit Test #97
Conversation
1be911b to
ad3073c
Compare
ad3073c to
fa5bd38
Compare
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
fa5bd38 to
1566583
Compare
|
bot:test |
tests/models/test_decoders.py
Outdated
| model_kwargs = _get_common_model_kwargs(is_gptq, model_path) | ||
|
|
||
| # Get the AIU model w/ the persistent model fixture | ||
| model = persistent_model.get_or_create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we are re-creating the model and validation_model when it's already being created in the fixture. Is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope! Good point, returned them both out of the fixture and deleted it from the cache hit check so that it'll be reused
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
|
bot:test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm once the duplicate lines are fixed
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
This PR builds on top of #20 and #93 to add a cache for testing using the refactored version of the test to allow some code reuse. #93 should probably be merged first (splitting this out for readability).
Summary of changes (wrt the original cache test PR)
- Makes sure gptq kwargs are passed through to the AIU model
- Makes sure
options={"sendnn.dynamic": COMPILE_DYNAMIC_SENDNN}is passed consistently- Clears the torch sendnn
.cache- the current PR can break if the cache test runs second since the cache paths aren't actually reset in torch sendnn. We reset the compiler settings and clear the directory, but don't clear the spyre cache object in the current PR, which causes alignment issues if the cache test doesn't run first- The current PR runs the check as two tests (cache miss -> cache hit); moves the cache miss test to run as a fixture to set things up so that we can just run cache hit as the test
Note that there is still some weirdness around how micro models are handled, mostly due to the way we configure common models paths / micro model usage and also check thresholds based on whether micro models exist.