diff --git a/docs/src/verification.md b/docs/src/verification.md index c60dc1e31..b5383e91b 100644 --- a/docs/src/verification.md +++ b/docs/src/verification.md @@ -60,7 +60,7 @@ def test_add(): ## Verify Config Overview -Currently through `VerifyConfig` you can disable/enable: +If `VerifyConfig` isn't passed as a param, default one will be used. Currently through `VerifyConfig` you can disable/enable: | Feature | Enabled (default) | |-----------------------------------|:-----------------:| | Verification as a method | `True` | @@ -68,7 +68,30 @@ Currently through `VerifyConfig` you can disable/enable: | Output type check | `True` | | Output shape check | `True` | -For more information about `VerifyConfig` you can check `forge/forge/verify/config.py` +For more information about `VerifyConfig` you can check `forge/forge/verify/config.py`. + +**Example of usage** +```python +def test_add(): + + class Add(nn.Module): + def __init__(self): + super().__init__() + + def forward(self, a, b): + return a + b + + + inputs = [torch.rand(2, 32, 32), torch.rand(2, 32, 32)] + + framework_model = Add() + compiled_model = forge.compile(framework_model, sample_inputs=inputs) + + fw_out = framework_model(*inputs) + co_out = compiled_model(*inputs) + + verify(inputs, framework_model, compiled_model, VerifyConfig(verify_dtype=False)) +```
Besides that, config also includes value checker. There are 3 types of checker: @@ -76,6 +99,8 @@ Besides that, config also includes value checker. There are 3 types of checker: - `AllCloseValueChecker` - `FullValueChecker` +For more information about **Checkers** you can look at `forge/forge/verify/value_checkers.py`. +