pytorch
260b716c - [Mobile Tracer] Allow tracing multiple input models at once (#84833)

Commit
3 years ago
[Mobile Tracer] Allow tracing multiple input models at once (#84833) Summary: For practical usage, folks may want to custom build PyTorch for support with multiple models. The current tracer allows tracing just one model. There are multiple way to address this limitation: 1. Provide a tool to merge multiple YAML files produced by each of these runs. Each run corresponds to a YAML file for a single model. 2. Allow the tracer to run multiple models at once. This PR implements the solution [2] above. Test Plan: Build the tracer using: `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` Run with 1 input file: `./build/bin/model_tracer --model_input_path /tmp/path_to_model.ptl --build_yaml_path /tmp/selected_ops.yaml` Run with multiple input files: `./build/bin/model_tracer --model_input_path /tmp/path_to_model.ptl,/tmp/path_to_model.ptl --build_yaml_path /tmp/selected_ops.yaml` Both runs completed successfully. Pull Request resolved: https://github.com/pytorch/pytorch/pull/84833 Approved by: https://github.com/JacobSzwejbka
Author
Committer
Parents
Loading