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

Dl/quantization/passes for splitted graphs #25

Open
wants to merge 55 commits into
base: dl/conv_layer_attrs_update
Choose a base branch
from

Conversation

daniil-lyakhov
Copy link
Owner

Changes

Reason for changes

Related tickets

Tests

daniil-lyakhov and others added 3 commits November 15, 2023 13:48
### Changes

Fixed output text in the ptq onnx example

### Reason for changes

Incorrect output text in the ptq onnx example

### Related tickets

N/A

### Tests

test_examples
@daniil-lyakhov daniil-lyakhov force-pushed the dl/quantization/passes_for_splitted_graphs branch 6 times, most recently from 27899b0 to 81ad932 Compare November 16, 2023 10:34
@daniil-lyakhov daniil-lyakhov force-pushed the dl/quantization/passes_for_splitted_graphs branch from c3efc6a to 4a244f3 Compare November 16, 2023 11:10
@daniil-lyakhov daniil-lyakhov force-pushed the dl/quantization/passes_for_splitted_graphs branch 2 times, most recently from d27a7f3 to 03e3faa Compare November 16, 2023 19:32
@daniil-lyakhov daniil-lyakhov force-pushed the dl/quantization/passes_for_splitted_graphs branch 4 times, most recently from 07becc6 to f3da495 Compare November 16, 2023 20:51
ljaljushkin and others added 9 commits November 24, 2023 19:19
### Changes

According to
https://docs.openvino.ai/2023.1/openvino_docs_OV_UG_lpt.html
Placement FQ nodes like in OV backend.


### Related tickets

124839
### Changes

- As stated in the title.

### Related tickets

- 125654
### Changes
Strip traced tensors when exit from the tracing context

### Reason for changes

`nncf_model_input` patched `torch.Tensor` with `TracedTensor` which does
not support deepcopy.

### Related tickets

125357

### Tests
test_wrap_model_with_example_input
e2e 506
test_examples 154
### Changes

- Migrated to openvino.convert_model(...)
- Upgraded OpenVINO version to 2023.2 in PTQ TensorFlow example 

### Reason for changes

Aligned examples with the OpenVINO 2023.2

### Related tickets

125257

### Tests

test_examples 157
### Changes

- Add models_hub_tests to check `wrap_model`, like
https://github.com/openvinotoolkit/openvino/tree/master/tests/model_hub_tests/torch_tests
- Add `Model Hub` github action to manual run 

### Related tickets

124852

### Tests

tests/torch/models_hub_test
### Changes

Fix `do_copy` option for `strip` function

### Reason for changes

Does not make a copy of the quantized model by PTQ in `strip` function.
### Changes

- Changed references for the LSTM model because of
openvinotoolkit/openvino#20368.
- Changed references for the `yolo-v4-tiny-tf` model due to layers name
changing.
- Fixed bug with the in-place layer insertion.

### Reason for changes

- Updated initialization for ReadValue layers (for now not only zeroes
can be set as the initial value).
- Probably MO frontend (TF) changed that led to layer name changes in
models.

### Related tickets

- 125066

### Tests

- openvino recommit with nightly - 24

---------

Co-authored-by: Daniil Lyakhov <[email protected]>
…penvinotoolkit#2290)

### Changes

* Post hooks inputs are being unwrapped from `torch.return_type` types
to `torch.tensor` type.
* Pre hooks outputs are being wrapped from `torch.tensor` to
`torch.return_type` in case torch input were wrapped in the first place.

### Reason for changes

To enable post hook insertion after torch operations which return
`torch.tensor_type` values instead of `torch.tensor` values.
 
### Related tickets



### Tests

* tests/torch/test_nncf_network.py is updated
* tests/torch/test_return_types.py is introduced
@github-actions github-actions bot added documentation Improvements or additions to documentation dependencies NNCF TF experimental labels Nov 30, 2023
daniil-lyakhov and others added 8 commits November 30, 2023 13:50
### Changes

- Update torch examples, added argument `--export-model-path` instead of
`--to-onnx` that select output type by suffix '.xml' or '.onnx'.
- Update tests to use Command to run examples.
- Remove tests of q_dq export path.
- Remove code to make html report, now metrics dumps in `results.csv`.
- Added "build url" in `results.csv`.
- Actualize reference metrics. 
- Move normalization of input to accuracy cheker configs.
- Use `target_ov` and `target_pt` to define reference metrics for
backends.
- Skip test `unet_mapillary_int8` and
`unet_mapillary_magnitude_sparsity_int8` models by 123448.
- Skip `resnet18_imagenet_binarization_dorefa` model by 22543.

Updates in CI:
- Update script to report `final e2e_result.html` for e2e tests.
- Now if any test falls trigger_job will be fails.

After merge requires update ci-pipelines.

### Related tickets

117885

### Tests

tests/torch/test_sota_checkpoints.py

### TODO
- update metrics after merge
openvinotoolkit#2227
- check metrics after openvinotoolkit#2211
…kit#2245)

### Changes

Adjusted codecov.yml for a project coverage target of 90%, set up paths
for per-component flags (i.e. TORCH, TENSORFLOW etc.) so that the
per-component test coverage could be calculated correctly. Made codecov
post their trademark "Reach" graph for visual cues to coverage
differences. Codecov will now wait for all CI checks to pass before
posting the first version of the comment.

### Reason for changes
Should preserve the good coverage we have right now - the target checks
are informational at the moment, may want to make them blocking in the
future. Should evaluate the reach graph to see whether it is helpful in
estimating the coverage impact of a given PR.

### Related tickets
N/A

### Tests
Existing precommit tests
…inotoolkit#2047)

Added a warning when starting training object detection model without
provided weights

#### Tickets
116938
…oolkit#2082)

### Changes

1) Introduce Layout parameters for Convolutional / MM layers for OV
backend
2) Refactor ChannelAlignment/SmoothQuant/MinMax/Wegihts compression
algorithms to use layout parameters from layer attributes
3) Fix `get_matmul_channel_axes` from openvino node utils

### Reason for changes

1-2) To separate weights layout collection code in layer attributes
instead of separate collection in each algorithm
3) To work properly with 1d constants in PTQ algorithms

### Related tickets

114328
114583

### Tests

* tests/openvino/native/test_layer_attributes.py are updated
* tests/openvino/native/quantization/test_channel_alignment.py
* tests/openvino/native/test_smooth_quant.py
* tests/openvino/native/test_node_utils.py
### Changes

- Patch missed magic function 

```
['__ixor__', '__itruediv__', '__rtruediv__', '__abs__', '__ror__', '__ior__', '__rdiv__', '__rxor__', '__iand__', '__neg__',  '__ipow__', '__rpow__', '__invert__', '__rand__']
```
- Update functions names for metatypes. 
- New metatype `PTNegativeMetatype` for `-tensor` and `tensor.neg()`
operations.

### Related tickets

124852

### Tests

test_patch_magic_functions
test_op_for_patch_magic_functions

models_hub_test
 - Was `91 failed, 602 passed`, after `83 failed, 610 passed`
### Changes

Replace node name only if node id is string (it can also be `int` like
in patterns)

### Reason for changes

```python
        for original_name in nx_graph.nodes():
>           dot_name = original_name.replace(__CHARACTER_REPLACE_FROM, __CHARACTER_REPLACE_TO)
E           AttributeError: 'int' object has no attribute 'replace'

nncf/common/utils/dot_file_rw.py:104: AttributeError
```

### Tests

tests/common/graph/test_graph_pattern.py::test_dump
@daniil-lyakhov daniil-lyakhov force-pushed the dl/quantization/passes_for_splitted_graphs branch from 24cbc33 to 4266ed6 Compare December 6, 2023 13:15
daniil-lyakhov and others added 6 commits December 6, 2023 14:18
…#2288)

### Changes

Added `INT8_SYM` compression mode

### Reason for changes

`INT8_SYM` mode can provide a better performance and required for
dynamic quantization

### Related tickets

124823

### Tests

Updated tests/openvino/native/quantization/test_weights_compression.py
### Changes

Update reference of metrics according last weekly tests
### Changes

- incorrect use of `map` function, as result
`any(is_input_mask_empty_map)` condition always `False`
- fix node type comparing with list
### Changes

- As stated in the title.
@daniil-lyakhov daniil-lyakhov force-pushed the dl/quantization/passes_for_splitted_graphs branch from 10e286e to 127ae4e Compare December 8, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants