Skip to content
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

add API coverage test #1394

Closed
wants to merge 11 commits into from
Closed

add API coverage test #1394

wants to merge 11 commits into from

Conversation

FindHao
Copy link
Member

@FindHao FindHao commented Feb 2, 2023

This PR adds the userbenchmark for PyTorch API coverage test

Command to run for a specific model:

python3 run_benchmark.py api-coverage --model resnet18  --device cuda --test train,eval

If you want to test all models, the --model should not be specified.

The testing results are stored in .userbenchmark/api-coverage/logs/. Each run will generate two log files, logs-${timestamp}.json and logs-${timestamp}.json-api_coverage.csv. The latter one is like the following format.

API coverage rate: 25/1332 = 1.88%
=====Used APIs=====
module_name,func_name
torch,flatten
torch._C._nn,linear
...
=====Missed APIs=====
module_name,func_name
,_TensorBase.acos
...

All Used and missed APIs will be listed in the csv file.

@FindHao FindHao changed the title [WIP] add API coverage test add API coverage test Feb 2, 2023
@xuzhao9
Copy link
Contributor

xuzhao9 commented Mar 2, 2023

@FindHao Can you update the PR body to the command of running the new userbenchmark and its example outputs?

@facebook-github-bot
Copy link
Contributor

@xuzhao9 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@FindHao
Copy link
Member Author

FindHao commented Mar 2, 2023

@FindHao Can you update the PR body to the command of running the new userbenchmark and its example outputs?

Done.

@FindHao
Copy link
Member Author

FindHao commented Mar 6, 2023

ping @xuzhao9

@facebook-github-bot
Copy link
Contributor

@FindHao has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@FindHao merged this pull request in 09de70c.

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