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 special device mapping #1752

Closed
wants to merge 3 commits into from
Closed

Add special device mapping #1752

wants to merge 3 commits into from

Conversation

FindHao
Copy link
Member

@FindHao FindHao commented Jul 6, 2023

To reuse the inference batch sizes already set in models' meta.yaml file for different kind of devices like AMD GPUs, this PR adds a SPECIAL_DEVICE_MAPPING and got the corresponding batch size when executes determine_batch_size ()

Run

You can use the following command to run model resnet18 inference by this userbenchmark.

python run_benchmark.py rocm-test  -t eval -m resnet18 

You can run all models without -m resnet18.

Results

The result json file is generated in the location benchmark/.userbenchmark/rocm-test/metrics-20230706XX.json. The content is like the following.

{
    "name": "rocm-test",
    "environ": {
        "pytorch_git_version": "e9ebda29d87ce0916ab08c06ab26fd3766a870e5",
        "device": "AMD Instinct MI210"
    },
    "metrics": {
        "test_eval[resnet18-cuda-eager]_latency": 23.336431
    }
}

Acknowlegement

This userbenchmark's code is mostly copied from userbenchmark/torch-nightly, some functionalities may not be available even though there are related codes.

@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.

@xuzhao9
Copy link
Contributor

xuzhao9 commented Jul 6, 2023

Can we have an example command and result json in the PR body? For example, the result of just running a single model.

@FindHao
Copy link
Member Author

FindHao commented Jul 6, 2023

Can we have an example command and result json in the PR body? For example, the result of just running a single model.

updated.

Copy link
Contributor

@xuzhao9 xuzhao9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@facebook-github-bot
Copy link
Contributor

@FindHao merged this pull request in 9df5215.

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