This repository was archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
[2/x]: fix numerics integration test and test delayed vs dynamic #291
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: 1. the SAM test wasn't easy to use because it had real weights and hence required real data for useful testing, which is not convenient from an integration test. Switched to LLaMa FFN with random weights, and made all the thresholds tight to actually check numerics are close. 2. extended numerics test to check all combinations of delayed vs dynamic 3. to be able to do (2), extended the module swap utility to configure delayed vs dynamic on a model level, for now without an option to customize further Test Plan: ``` pytest test/test_numerics_integration.py -s -x ``` Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
vkuzo
added a commit
that referenced
this pull request
Jun 28, 2024
Summary: 1. the SAM test wasn't easy to use because it had real weights and hence required real data for useful testing, which is not convenient from an integration test. Switched to LLaMa FFN with random weights, and made all the thresholds tight to actually check numerics are close. 2. extended numerics test to check all combinations of delayed vs dynamic 3. to be able to do (2), extended the module swap utility to configure delayed vs dynamic on a model level, for now without an option to customize further Test Plan: ``` pytest test/test_numerics_integration.py -s -x ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 954ce82 Pull Request resolved: #291
drisspg
reviewed
Jun 28, 2024
@@ -5,8 +5,8 @@ set -e | |||
IS_ROCM=$(rocm-smi --version || true) | |||
|
|||
pytest test/test_base.py | |||
pytest test/test_sam.py |
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.
love it, this test has been annoying
drisspg
reviewed
Jun 28, 2024
model_fp8_out.sum().backward() | ||
|
||
out_sqnr = compute_error(model_ref_out, model_fp8_out) | ||
assert out_sqnr > 20.0 |
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.
nit: maybe a message
drisspg
approved these changes
Jun 28, 2024
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.
great clean up, love it!
…ynamic" Summary: 1. the SAM test wasn't easy to use because it had real weights and hence required real data for useful testing, which is not convenient from an integration test. Switched to LLaMa FFN with random weights, and made all the thresholds tight to actually check numerics are close. 2. extended numerics test to check all combinations of delayed vs dynamic 3. to be able to do (2), extended the module swap utility to configure delayed vs dynamic on a model level, for now without an option to customize further Test Plan: ``` pytest test/test_numerics_integration.py -s -x ./test/test_everything.sh ``` Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced Jul 1, 2024
@vkuzo has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request has been merged in 1e71def. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Summary:
required real data for useful testing, which is not convenient from
an integration test. Switched to LLaMa FFN with random weights, and
made all the thresholds tight to actually check numerics are close.
dynamic
delayed vs dynamic on a model level, for now without an option to
customize further
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D59305796