Skip to content

[PyTorch Edge][tracing-based] Unify tracer between internal and external #64152

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

Closed
wants to merge 45 commits into from

Conversation

cccclai
Copy link
Contributor

@cccclai cccclai commented Aug 30, 2021

Stack from ghstack:

As title, introduce the file TracerRunner shared by internal/external tracer and the main function is

TracerResult trace_run(const std::string& input_module_path);

which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is

  1. the dependency on <yaml-cpp/yaml.h>.
  2. the output yaml file from internal tracer includes model_version and model_asset. These are only needed for internal.

Differential Revision: D30632224

NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!

Differential Revision: D30632224

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 30, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 55705d3 (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See GitHub Actions build win-vs2019-cuda11.3-py3 / build (1/1)

Step: "Build" (full log | diagnosis details | 🔁 rerun)

2021-10-15T04:31:09.0401002Z Catastrophic error: out of memory
2021-10-15T04:31:09.0393234Z C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include\cub\device/device_segmented_radix_sort.cuh(366): here
2021-10-15T04:31:09.0394786Z             instantiation of "cudaError_t at::cuda::detail::cub::DeviceSegmentedRadixSort::SortPairsDescending(void *, size_t &, const KeyT *, KeyT *, const ValueT *, ValueT *, int, int, OffsetIteratorT, OffsetIteratorT, int, int, cudaStream_t, __nv_bool) [with KeyT=c10::BFloat16, ValueT=int64_t, OffsetIteratorT=at::native::<unnamed>::offset_t]" 
2021-10-15T04:31:09.0396176Z C:/actions-runner/_work/pytorch/pytorch/aten/src\ATen/cuda/cub.cuh(186): here
2021-10-15T04:31:09.0397335Z             instantiation of "void at::cuda::cub::segmented_sort_pairs(const key_t *, key_t *, const value_t *, value_t *, int64_t, int64_t, OffsetIteratorT, OffsetIteratorT, __nv_bool, int64_t, int64_t) [with key_t=c10::BFloat16, value_t=int64_t, OffsetIteratorT=at::native::<unnamed>::offset_t]" 
2021-10-15T04:31:09.0398457Z C:\actions-runner\_work\pytorch\pytorch\aten\src\ATen\native\cuda\Sort.cu(424): here
2021-10-15T04:31:09.0398847Z 
2021-10-15T04:31:09.0399422Z 1 catastrophic error detected in the compilation of "C:/actions-runner/_work/pytorch/pytorch/aten/src/ATen/native/cuda/Sort.cu".
2021-10-15T04:31:09.0400077Z Compilation terminated.
2021-10-15T04:31:09.0400381Z Sort.cu
2021-10-15T04:31:09.0400658Z Retry attempt: 2
2021-10-15T04:31:09.0401002Z Catastrophic error: out of memory
2021-10-15T04:31:09.0401251Z 
2021-10-15T04:31:09.0401838Z 1 catastrophic error detected in the compilation of "C:/actions-runner/_work/pytorch/pytorch/aten/src/ATen/native/cuda/Sort.cu".
2021-10-15T04:31:09.0402473Z Compilation terminated.
2021-10-15T04:31:09.0402791Z Sort.cu
2021-10-15T04:31:09.0403068Z Retry attempt: 3
2021-10-15T04:31:09.0403373Z Sort.cu
2021-10-15T04:31:14.5678226Z [5650/6354] C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\bin\randomtemp.exe C:/actions-runner/_work/pytorch/pytorch/build/win_tmp\bin\sccache.exe C:\PROGRA~1\NVIDIA~2\CUDA\v11.3\bin\nvcc.exe -forward-unknown-to-host-compiler -DBUILD_SPLIT_CUDA -DIDEEP_USE_MKL -DMAGMA_V2 -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DTORCH_CUDA_CU_BUILD_MAIN_LIB -DUSE_C10D_GLOO -DUSE_CUDA -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -D_OPENMP_NOFORCE_MANIFEST -Dtorch_cuda_cu_EXPORTS -IC:\actions-runner\_work\pytorch\pytorch\build\aten\src -IC:\actions-runner\_work\pytorch\pytorch\aten\src -IC:\actions-runner\_work\pytorch\pytorch\build -IC:\actions-runner\_work\pytorch\pytorch -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\benchmark\include -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\cudnn_frontend\include -IC:\actions-runner\_work\pytorch\pytorch\build\caffe2\contrib\aten -IC:\actions-runner\_work\pytorch\pytorch\third_party\onnx -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\onnx -IC:\actions-runner\_work\pytorch\pytorch\third_party\foxi -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\foxi -IC:\actions-runner\_work\pytorch\pytorch\build\include -IC:\actions-runner\_work\pytorch\pytorch\build\caffe2\aten\src\TH -IC:\actions-runner\_work\pytorch\pytorch\aten\src\TH -IC:\actions-runner\_work\pytorch\pytorch\aten\src\THC -IC:\actions-runner\_work\pytorch\pytorch\aten\src\ATen\cuda -IC:\actions-runner\_work\pytorch\pytorch\build\caffe2\aten\src -IC:\actions-runner\_work\pytorch\pytorch\aten\..\third_party\catch\single_include -IC:\actions-runner\_work\pytorch\pytorch\aten\src\ATen\.. -IC:\actions-runner\_work\pytorch\pytorch\build\caffe2\aten\src\ATen -IC:\actions-runner\_work\pytorch\pytorch\c10\cuda\..\.. -IC:\actions-runner\_work\pytorch\pytorch\c10\.. -IC:\actions-runner\_work\pytorch\pytorch\torch\csrc\api -IC:\actions-runner\_work\pytorch\pytorch\torch\csrc\api\include -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\ideep\mkl-dnn\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\ideep\mkl-dnn\src\..\include -isystem=C:\actions-runner\_work\pytorch\pytorch\build\third_party\gloo -isystem=C:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\gloo -isystem=C:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\googletest\googlemock\include -isystem=C:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\googletest\googletest\include -isystem=C:\actions-runner\_work\pytorch\pytorch\third_party\protobuf\src -isystem=C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\mkl\include -isystem=C:\actions-runner\_work\pytorch\pytorch\third_party\XNNPACK\include -isystem=C:\actions-runner\_work\pytorch\pytorch\third_party -isystem=C:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\eigen -isystem=C:\Jenkins\Miniconda3\include -isystem=C:\Jenkins\Miniconda3\lib\site-packages\numpy\core\include -isystem=C:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\pybind11\include -isystem="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -isystem=C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\magma\include -isystem=C:\actions-runner\_work\pytorch\pytorch\third_party\ideep\mkl-dnn\include -isystem=C:\actions-runner\_work\pytorch\pytorch\third_party\ideep\include -isystem="C:\Program Files\NVIDIA Corporation\NvToolsExt\include" -Xcompiler /w -w -Xfatbin -compress-all -DONNX_NAMESPACE=onnx_torch --use-local-env -gencode arch=compute_70,code=sm_70 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=integer_sign_change,--diag_suppress=useless_using_declaration,--diag_suppress=set_but_not_used,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=implicit_return_from_non_void_function,--diag_suppress=unsigned_compare_with_zero,--diag_suppress=declared_but_not_referenced,--diag_suppress=bad_friend_decl --Werror cross-execution-space-call --no-host-device-move-forward --expt-relaxed-constexpr --expt-extended-lambda  -Xcompiler=/wd4819,/wd4503,/wd4190,/wd4244,/wd4251,/wd4275,/wd4522 -Wno-deprecated-gpu-targets --expt-extended-lambda -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -Xcompiler="-MD -O2 -Ob2" -DNDEBUG -Xcompiler /MD -DCAFFE2_USE_GLOO -DCUDA_HAS_FP16=1 -DUSE_GCC_GET_CPUID -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD -Xcompiler= -DTORCH_CUDA_CU_BUILD_MAIN_LIB -std=c++14 -MD -MT caffe2\CMakeFiles\torch_cuda_cu.dir\__\aten\src\ATen\native\cuda\ZetaKernel.cu.obj -MF caffe2\CMakeFiles\torch_cuda_cu.dir\__\aten\src\ATen\native\cuda\ZetaKernel.cu.obj.d -x cu -c C:\actions-runner\_work\pytorch\
2021-10-15T04:31:14.5693318Z LLVM ERROR: out of memory
2021-10-15T04:31:14.5693663Z ZetaKernel.cu
2021-10-15T04:31:14.5694025Z nvcc error   : 'cicc' died with status 0xC0000409 

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added oncall: jit Add this issue/PR to JIT oncall triage queue cla signed labels Aug 30, 2021
cccclai pushed a commit that referenced this pull request Aug 30, 2021
Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

ghstack-source-id: 136951291
Pull Request resolved: #64152
…l and external"

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

[ghstack-poisoned]
…l and external"

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

[ghstack-poisoned]
…l and external"

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Aug 30, 2021
Pull Request resolved: #64152


ghstack-source-id: 136954259

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
…l and external"

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Aug 30, 2021
Pull Request resolved: #64152


ghstack-source-id: 136957213

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
…l and external"

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

[ghstack-poisoned]
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Aug 30, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152


ghstack-source-id: 137009462

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
@cccclai cccclai added this to the 1.10.0 milestone Aug 30, 2021
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Sep 6, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152


ghstack-source-id: 137009462

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
maglimedia pushed a commit to gtedemo/demo-codespace-pytorch that referenced this pull request Oct 9, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: pytorch/pytorch#64152


ghstack-source-id: 139900294

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
maglimedia pushed a commit to gtedemo/demo-codespace-pytorch that referenced this pull request Oct 9, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: pytorch/pytorch#64152


ghstack-source-id: 139146459

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
chenlai added 3 commits October 9, 2021 12:24
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Oct 10, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152


ghstack-source-id: 140206623

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Oct 11, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152


ghstack-source-id: 140269696

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Oct 13, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152


ghstack-source-id: 140522807

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Oct 14, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152


ghstack-source-id: 140563354

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Oct 14, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152


ghstack-source-id: 140662931

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
…l and external"

As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.



Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224)

[ghstack-poisoned]
cccclai pushed a commit that referenced this pull request Oct 15, 2021
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152


ghstack-source-id: 140692467

Differential Revision: [D30632224](https://our.internmc.facebook.com/intern/diff/D30632224/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30632224/)!
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 76efbcc.

@facebook-github-bot facebook-github-bot deleted the gh/cccclai/108/head branch October 18, 2021 14:43
wconstab pushed a commit that referenced this pull request Oct 20, 2021
…nal (#64152)

Summary:
As title, introduce the file `TracerRunner` shared by internal/external tracer and the main function is
```
TracerResult trace_run(const std::string& input_module_path);
```
which basically takes the path to model file and generate the trace result. The main difference between external tracer and internal tracer is
1. the dependency on `<yaml-cpp/yaml.h>`.
2. the output yaml file from internal tracer includes `model_version` and `model_asset`. These are only needed for internal.

Pull Request resolved: #64152

ghstack-source-id: 140692467

Test Plan:
```
./build/bin/model_tracer --model_input_path "/Users/chenlai/Documents/pytorch/tracing/deeplabv3_scripted_with_bundled_input.ptl" --build_yaml_path  "/Users/chenlai/Documents/pytorch/tracing/tmp.yaml"
```
```
./fbcode/caffe2/fb/model_tracer/run_model_with_bundled_inputs.sh ~/local/notebooks/prod_models/deeplabv3_scripted_with_bundled_input.ptl
```
have the same operator output

selected_operators.yaml (P460296279)
selected_mobile_ops.h (P460296258)

Reviewed By: dhruvbird

Differential Revision: D30632224

fbshipit-source-id: eb0321dbc0f1fcf6d2e05384695eebb59ac04f8c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged oncall: jit Add this issue/PR to JIT oncall triage queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants