Skip to content

Conversation

scintiller
Copy link
Contributor

Summary: set gcc as default compiler type in oss, and clang as default compiler type in fbcode

Test Plan: test locally

Differential Revision: D23420034

yujunzhao@devvm1621.atn0.facebook.com and others added 4 commits August 31, 2020 11:21
…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: 61d6b48904a1e0db9fd262bdfac0890cea951762
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: 475099fddfba8967f88b51a5653639b6c2fac335
…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: 454aad06929550325468236d70671ba889ef2b8e
Summary: set `gcc` as default compiler type in oss, and `clang` as default compiler type in fbcode

Test Plan: test locally

Differential Revision: D23420034

fbshipit-source-id: 7e3c3231dbfeadd3c6e08d165be45d25b0f22ecc
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D23420034

@dr-ci
Copy link

dr-ci bot commented Aug 31, 2020

💊 CI failures summary and remediations

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


  • 1/7 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)
  • 6/7 broken upstream at merge base 1390cad since Aug 31

🚧 1 ongoing upstream failure:

These were probably caused by upstream breakages that are not fixed yet:


🚧 5 fixed upstream failures:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is newer than viable/strict, you can try basing on an older, stable commit:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase --onto FETCH_HEAD $(git merge-base origin/master HEAD)

If your commit is older than viable/strict:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

Check out the recency history of this "viable master" tracking branch.


Extra GitHub checks: 1 failed


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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 6 times.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 49e979b.

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.

3 participants