This repository was archived by the owner on Aug 7, 2024. It is now read-only.
[2/x]: fix numerics integration test and test delayed vs dynamic#291
Closed
vkuzo wants to merge 2 commits intogh/vkuzo/12/basefrom
Closed
[2/x]: fix numerics integration test and test delayed vs dynamic#291vkuzo wants to merge 2 commits intogh/vkuzo/12/basefrom
vkuzo wants to merge 2 commits intogh/vkuzo/12/basefrom
Conversation
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
| IS_ROCM=$(rocm-smi --version || true) | ||
|
|
||
| pytest test/test_base.py | ||
| pytest test/test_sam.py |
Contributor
There was a problem hiding this comment.
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 |
drisspg
approved these changes
Jun 28, 2024
Contributor
drisspg
left a comment
There was a problem hiding this comment.
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
Contributor
Author
|
@vkuzo has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
This pull request has been merged in 1e71def. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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