-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Update README.md in oss
#43893
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
Update README.md in oss
#43893
Conversation
…pytorch#43800) Summary: Pull Request resolved: pytorch#43800 1. Move fbcode related coverage code to fb/ folder and add TARGETS so that we can use buck run to run the tool and solved the import probelm. 2. Write `README.md` to give users guidance about the tool Test Plan: On devserver: ``` buck run //caffe2/fb/code_coverage/tool:coverage -- //caffe2/c10: ``` More examples in README.md Differential Revision: D23404988 fbshipit-source-id: e41791d42ddade79c2dc35b085245558ed9be63b
Summary:
Check the result of GCC coverage in OSS is reasonable and ready to ship.
The amount of executable lines are not the same between `gcc` and `clang` because of the following reasons:
* Lines following are counted in `clang` but not in `gcc`:
1. empty line or line with only “{” or “}”
3. some comments are counted in clang but not in gcc
5. `#define ...` -- not supported by gcc according to official documentation
* Besides, a statement that explains to more than one line will be counted as only one executable line in gcc, but several lines in clang
## Advantage of `gcc` coverage
1. Much faster
- code coverage tool runtime is onle **4 min** (*ammazzzing!!*) by `gcc`, compared to **3 hours!!** by `clang`, to analyze all the tests' artifacts
2. Use less disk
- `Clang`'s artifacts will take as large as 170G, but `GCC` is 980M
Besides, also update `README.md`.
Test Plan:
Compare the result in OSS `clang` and OSS `gcc` with the same command:
```
python oss_coverage.py --run-only atest test_nn.py --interested-folder=aten
```
----
# GCC
**Summary**
> time: 0:15:45
summary percentage: 44.85%
**Report and Log**
[File Coverage Report](P140825162)
[Line Coverage Report](P140825196)
[Log](P140825385)
------
# CLANG
**Summary**
> time: 0:21:35
summary percentage: 44.08%
**Report and Log**
[File Coverage Report](P140825845)
[Line Coverage Report](P140825923)
[Log](P140825950)
Differential Revision: D23416772
fbshipit-source-id: a2993cd87c42516638f40bf9f3cec4bb8cf5e45e
…onsistent with other arguments Summary: 1. rename input argunment `interested-folder` to `interest-only` -- be consistent with `run-only`, `coverage-only` and be shorted Test Plan: Test on devserver and linux docker. Differential Revision: D23417338 fbshipit-source-id: 51c609e9cb319253a4ffec3e32db2371c1714c69
Summary: set `gcc` as default compiler type in oss, and `clang` as default compiler type in fbcode Differential Revision: D23420034 fbshipit-source-id: ab0b18a56cd9882e47408a2225728e36c011c89a
Summary: Set default pytorch folder since now we know the tool is located in `pytorch/tools/code_coverage`. Ease user's burden to set it themself. Test Plan: Test locally Differential Revision: D23420162 fbshipit-source-id: 6896e87837e8639cd7b84a3b34fa748696e1cab3
Summary: Update `README.md` in oss, provide more examples, start from the most common use to specified use. Make `README.md` be more friendly and more specific. Test Plan: `README.md` doesn't need test. Differential Revision: D23420203 fbshipit-source-id: 9c15179dedfd19fb81bc2c6b9f8990c8b3ca8b2e
|
This pull request was exported from Phabricator. Differential Revision: D23420203 |
💊 CI failures summary and remediationsAs of commit a4fab86 (more details on the Dr. CI page):
🚧 6 fixed upstream failures:These were probably caused by upstream breakages that were already fixed.
Please rebase on the
|
|
This pull request has been merged in 93fbbaa. |
1 similar comment
|
This pull request has been merged in 93fbbaa. |
Summary: Update
README.mdin oss, provide more examples, start from the most common use to specified use. MakeREADME.mdbe more friendly and more specific.Test Plan:
README.mddoesn't need test.Differential Revision: D23420203