Skip to content

Commit 5dac1c6

Browse files
authored
Generate input tensor constraints (#401)
* support checking model redundancy * revert change of vision_model_test * reformat python code. * reformat bert_model_test.py and utils.py * minor fix * fix failed check by comparing directories after os.path.realpath() * fix bugs in check_validate.sh * set dynamic=False in single_device_runner.py * reset graph hash * add robustness code for generating input tensor constraints * Introduce input_tensor_constraints.py using shape propagation logic. * support dimension generalization for torch.Tensor.view and torch.Tensor.reshape * 1) support dimension generalization for torch.Tensor.expand(); 2) fix bugs in generalization for torch.Tensor.view and torch.Tensor.reshape * dimension_generalization_passes * Refactored DimensionGeneralizationPass.__init__ to accept argument dim_axes_pairs, enabling targeted configuration for specific use cases * save dimension generalization pass names into graph_net.json * Generalize sequence dimension * more dimension generalization passes for token dimension * refactor parse_sole_graph_module * Enhance the performance of the input_tensor_constraints.py file generation process. * minor fix * more dimension generalization pass * fix some hint bugs * generate input_tensor_constraints.py
1 parent ad4b5da commit 5dac1c6

File tree

3,822 files changed

+3023596
-26661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,822 files changed

+3023596
-26661
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
rev: v0.14.4
1010
hooks:
1111
- id: ruff-check
12-
args: [--fix, --exit-non-zero-on-fix, --no-cache]
12+
args: [--fix, --exit-non-zero-on-fix, --no-cache, --exclude=samples]
1313

1414
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
1515
rev: v1.5.1
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
{
2-
"framework": "torch",
3-
"num_devices_required": 1,
4-
"num_nodes_required": 1,
5-
"dynamic": false,
6-
"source": "cosyvoice",
7-
"heuristic_tag": "audio"
8-
}
1+
{"framework": "torch", "num_devices_required": 1, "num_nodes_required": 1, "dynamic": false, "source": "cosyvoice", "heuristic_tag": "audio", "dimension_generalization_passes": ["naive_call_method_view_pass", "naive_call_method_reshape_pass", "naive_call_method_expand_pass", "non_batch_call_method_expand_pass", "non_batch_call_function_arange_pass", "non_batch_call_function_getitem_slice_pass", "non_batch_call_function_full_pass", "non_batch_call_function_full_plus_one_pass", "non_batch_call_function_zeros_pass", "non_batch_call_function_arange_plus_one_pass"]}

0 commit comments

Comments
 (0)